Skip to content

Commit

Permalink
Merge pull request #1566 from primeroz/fix/do-not-add-namespace-to-cl…
Browse files Browse the repository at this point in the history
…usterwide-resources

Hide namespace for prometheus clusterRole and clusterRolebinding
  • Loading branch information
philipgough authored Jan 10, 2022
2 parents 6ce05e2 + f7738d7 commit f2559e0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
8 changes: 6 additions & 2 deletions jsonnet/kube-prometheus/components/prometheus.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -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: [''],
Expand Down Expand Up @@ -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',
Expand Down
1 change: 0 additions & 1 deletion manifests/prometheus-clusterRole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
- ""
Expand Down
1 change: 0 additions & 1 deletion manifests/prometheus-clusterRoleBinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f2559e0

Please sign in to comment.