helm.crd-role-binding-template.yaml Maven / Gradle / Ivy
{{ if eq $.Values.watchNamespaces "JOSDK_WATCH_CURRENT" }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {reconciler-name}-role-binding
namespace: {{ $.Release.Namespace }}
labels:
app.kubernetes.io/name: {{ .Chart.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/managed-by: quarkus
roleRef:
kind: ClusterRole
apiGroup: rbac.authorization.k8s.io
name: {reconciler-name}-cluster-role
subjects:
- kind: ServiceAccount
name: {{ $.Chart.Name }}
namespace: {{ $.Release.Namespace }}
{{ else if eq $.Values.watchNamespaces "JOSDK_ALL_NAMESPACES" }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {reconciler-name}-role-binding
labels:
app.kubernetes.io/name: {{ .Chart.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/managed-by: quarkus
roleRef:
kind: ClusterRole
apiGroup: rbac.authorization.k8s.io
name: {reconciler-name}-cluster-role
subjects:
- kind: ServiceAccount
name: {{ $.Chart.Name }}
namespace: {{ $.Release.Namespace }}
{{ else }}
{{ range $anamespace := ( split "," $.Values.watchNamespaces ) }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {reconciler-name}-role-binding
namespace: {{ $anamespace }}
labels:
app.kubernetes.io/name: {{ .Chart.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/managed-by: quarkus
roleRef:
kind: ClusterRole
apiGroup: rbac.authorization.k8s.io
name: {reconciler-name}-cluster-role
subjects:
- kind: ServiceAccount
name: {{ $.Chart.Name }}
namespace: {{ $.Release.Namespace }}
---
{{- end }}
{{- end }}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy