From 592a37676f737ebdfa00cda516550571576febea Mon Sep 17 00:00:00 2001 From: Kubernetes Prow Robot Date: Thu, 5 Mar 2020 01:46:38 -0800 Subject: [PATCH] [stable/kube-state-metrics] Only create PSP RBAC if rbac.create is true. (#19986) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Cédric de Saint Martin --- stable/kube-state-metrics/Chart.yaml | 2 +- stable/kube-state-metrics/README.md | 2 +- stable/kube-state-metrics/templates/psp-clusterrole.yaml | 2 +- stable/kube-state-metrics/templates/psp-clusterrolebinding.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/stable/kube-state-metrics/Chart.yaml b/stable/kube-state-metrics/Chart.yaml index 08172fcc53..69c07eae7c 100644 --- a/stable/kube-state-metrics/Chart.yaml +++ b/stable/kube-state-metrics/Chart.yaml @@ -6,7 +6,7 @@ keywords: - monitoring - prometheus - kubernetes -version: 2.8.0 +version: 2.8.1 appVersion: 1.9.5 home: https://github.com/kubernetes/kube-state-metrics/ sources: diff --git a/stable/kube-state-metrics/README.md b/stable/kube-state-metrics/README.md index 8811d4b0e4..9038c5f25e 100644 --- a/stable/kube-state-metrics/README.md +++ b/stable/kube-state-metrics/README.md @@ -28,7 +28,7 @@ $ helm install stable/kube-state-metrics | `serviceAccount.create` | If true, create & use serviceAccount | `true` | | `serviceAccount.name` | If not set & create is true, use template fullname | | | `serviceAccount.imagePullSecrets` | Specify image pull secrets field | `[]` | -| `podSecurityPolicy.enabled` | If true, create & use PodSecurityPolicy resources | `false` | +| `podSecurityPolicy.enabled` | If true, create & use PodSecurityPolicy resources. Note that related RBACs are created only if `rbac.enabled` is `true. | `false` | | `podSecurityPolicy.annotations` | Specify pod annotations in the pod security policy | {} | | `securityContext.enabled` | Enable security context | `true` | | `securityContext.fsGroup` | Group ID for the container | `65534` | diff --git a/stable/kube-state-metrics/templates/psp-clusterrole.yaml b/stable/kube-state-metrics/templates/psp-clusterrole.yaml index dcd65e13e4..a28fcef98f 100644 --- a/stable/kube-state-metrics/templates/psp-clusterrole.yaml +++ b/stable/kube-state-metrics/templates/psp-clusterrole.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.podSecurityPolicy.enabled -}} +{{- if and .Values.podSecurityPolicy.enabled .Values.rbac.enabled -}} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: diff --git a/stable/kube-state-metrics/templates/psp-clusterrolebinding.yaml b/stable/kube-state-metrics/templates/psp-clusterrolebinding.yaml index a206e640d9..16141b420c 100644 --- a/stable/kube-state-metrics/templates/psp-clusterrolebinding.yaml +++ b/stable/kube-state-metrics/templates/psp-clusterrolebinding.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.podSecurityPolicy.enabled -}} +{{- if and .Values.podSecurityPolicy.enabled .Values.rbac.enabled -}} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: