github.com/khulnasoft-lab/defsec@v1.0.5-0.20230827010352-5e9f46893d95/pkg/scanners/helm/test/mysql/templates/rolebinding.yaml (about) 1 {{- if and .Values.serviceAccount.create .Values.rbac.create }} 2 kind: RoleBinding 3 apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} 4 metadata: 5 name: {{ include "common.names.fullname" . }} 6 namespace: {{ .Release.Namespace }} 7 labels: {{- include "common.labels.standard" . | nindent 4 }} 8 {{- if .Values.commonLabels }} 9 {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} 10 {{- end }} 11 {{- if .Values.commonAnnotations }} 12 annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} 13 {{- end }} 14 subjects: 15 - kind: ServiceAccount 16 name: {{ include "mysql.serviceAccountName" . }} 17 roleRef: 18 apiGroup: rbac.authorization.k8s.io 19 kind: Role 20 name: {{ include "common.names.fullname" . -}} 21 {{- end }}