diff --git a/charts/istio-authorizer/Chart.yaml b/charts/istio-authorizer/Chart.yaml index de2c5a5a..b35a1393 100644 --- a/charts/istio-authorizer/Chart.yaml +++ b/charts/istio-authorizer/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: istio-authorizer description: A Helm chart for istio-authorizer type: application -version: 2.21.0 +version: 2.21.1 appVersion: "2.21.0" diff --git a/charts/istio-authorizer/templates/clusterrole.yaml b/charts/istio-authorizer/templates/clusterrole.yaml index 0efc8d0f..b9f336c7 100644 --- a/charts/istio-authorizer/templates/clusterrole.yaml +++ b/charts/istio-authorizer/templates/clusterrole.yaml @@ -1,3 +1,4 @@ +{{- if .Values.discovery.enabled }} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: @@ -21,3 +22,4 @@ rules: - "deployments" verbs: - "list" +{{- end }} \ No newline at end of file diff --git a/charts/istio-authorizer/templates/clusterrolebinding.yaml b/charts/istio-authorizer/templates/clusterrolebinding.yaml index da6f54b6..545417eb 100644 --- a/charts/istio-authorizer/templates/clusterrolebinding.yaml +++ b/charts/istio-authorizer/templates/clusterrolebinding.yaml @@ -1,3 +1,4 @@ +{{- if .Values.discovery.enabled }} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: @@ -17,23 +18,4 @@ subjects: - kind: ServiceAccount name: {{ include "istio-authorizer.serviceAccountName" . }} namespace: {{ .Release.Namespace }} ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ include "istio-authorizer.serviceAccountName" . }}-auth-delegator - namespace: default - labels: - {{- include "istio-authorizer.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: system:auth-delegator -subjects: -- kind: ServiceAccount - name: {{ include "istio-authorizer.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} +{{- end }} \ No newline at end of file