You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by si...@apache.org on 2020/04/21 05:56:44 UTC

[pulsar-helm-chart] 05/34: Option to not to use rbac in helm deployment (#3082)

This is an automated email from the ASF dual-hosted git repository.

sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-helm-chart.git

commit 53ce119519ed53a320a72c98bec6e68458699f0e
Author: Yifan Zhang <fr...@gmail.com>
AuthorDate: Fri Nov 30 07:39:47 2018 +0300

    Option to not to use rbac in helm deployment (#3082)
    
    * option to not to use rbac
    
    * default value to match previous settings
---
 pulsar/templates/prometheus-deployment.yaml | 2 ++
 pulsar/templates/prometheus-rbac.yaml       | 2 ++
 pulsar/values-mini.yaml                     | 2 ++
 pulsar/values.yaml                          | 2 ++
 4 files changed, 8 insertions(+)

diff --git a/pulsar/templates/prometheus-deployment.yaml b/pulsar/templates/prometheus-deployment.yaml
index 58a143d..e722993 100644
--- a/pulsar/templates/prometheus-deployment.yaml
+++ b/pulsar/templates/prometheus-deployment.yaml
@@ -55,7 +55,9 @@ spec:
       tolerations:
 {{ toYaml .Values.prometheus.tolerations | indent 8 }}
     {{- end }}
+    {{- if .Values.prometheus_rbac }}
       serviceAccount: "{{ template "pulsar.fullname" . }}-{{ .Values.prometheus.component }}"
+    {{- end }}
       terminationGracePeriodSeconds: {{ .Values.prometheus.gracePeriod }}
       containers:
       - name: "{{ template "pulsar.fullname" . }}-{{ .Values.prometheus.component }}"
diff --git a/pulsar/templates/prometheus-rbac.yaml b/pulsar/templates/prometheus-rbac.yaml
index 04c1b43..a25bbb9 100644
--- a/pulsar/templates/prometheus-rbac.yaml
+++ b/pulsar/templates/prometheus-rbac.yaml
@@ -18,6 +18,7 @@
 #
 
 {{- if .Values.extra.monitoring }}
+{{- if .Values.prometheus_rbac }}
 apiVersion: rbac.authorization.k8s.io/v1beta1
 kind: ClusterRole
 metadata:
@@ -55,3 +56,4 @@ subjects:
   name: "{{ template "pulsar.fullname" . }}-{{ .Values.prometheus.component }}"
   namespace: {{ .Values.namespace }}
 {{- end }}
+{{- end }}
diff --git a/pulsar/values-mini.yaml b/pulsar/values-mini.yaml
index 94a5bc3..e8977ce 100644
--- a/pulsar/values-mini.yaml
+++ b/pulsar/values-mini.yaml
@@ -31,6 +31,8 @@ persistence: no
 ## will be deployed with emptyDir
 prometheus_persistence: no
 
+prometheus_rbac: yes
+
 ## which extra components to deploy
 extra:
   # Pulsar proxy
diff --git a/pulsar/values.yaml b/pulsar/values.yaml
index fe237e8..982f095 100644
--- a/pulsar/values.yaml
+++ b/pulsar/values.yaml
@@ -31,6 +31,8 @@ persistence: no
 ## will be deployed with emptyDir
 prometheus_persistence: yes
 
+prometheus_rbac: yes
+
 ## which extra components to deploy
 extra:
   # Pulsar proxy