Set namespace to null for clusterwide resources and generate manifests

This commit is contained in:
Francesco Ciocchetti
2022-01-04 10:03:14 +01:00
parent 9d4ba547b8
commit f7738d7434
3 changed files with 6 additions and 4 deletions

View File

@@ -146,7 +146,9 @@ function(params) {
clusterRole: {
apiVersion: 'rbac.authorization.k8s.io/v1',
kind: 'ClusterRole',
metadata: p._metadata,
metadata: p._metadata {
namespace:: null,
},
rules: [
{
apiGroups: [''],
@@ -194,7 +196,9 @@ function(params) {
clusterRoleBinding: {
apiVersion: 'rbac.authorization.k8s.io/v1',
kind: 'ClusterRoleBinding',
metadata: p._metadata,
metadata: p._metadata {
namespace:: null,
},
roleRef: {
apiGroup: 'rbac.authorization.k8s.io',
kind: 'ClusterRole',

View File

@@ -8,7 +8,6 @@ metadata:
app.kubernetes.io/part-of: kube-prometheus
app.kubernetes.io/version: 2.32.1
name: prometheus-k8s
namespace: monitoring
rules:
- apiGroups:
- ""

View File

@@ -8,7 +8,6 @@ metadata:
app.kubernetes.io/part-of: kube-prometheus
app.kubernetes.io/version: 2.32.1
name: prometheus-k8s
namespace: monitoring
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole