Add standalone R3 RIC platform helm charts and deployment scripts.
[ric-plt/ric-dep.git] / helm / infrastructure / subcharts / kong / templates / controller-rbac-cluster-role-binding.yaml
diff --git a/helm/infrastructure/subcharts/kong/templates/controller-rbac-cluster-role-binding.yaml b/helm/infrastructure/subcharts/kong/templates/controller-rbac-cluster-role-binding.yaml
new file mode 100755 (executable)
index 0000000..2e4e752
--- /dev/null
@@ -0,0 +1,19 @@
+{{- if and .Values.ingressController.rbac.create .Values.ingressController.enabled -}}
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: ClusterRoleBinding
+metadata:
+  name:  {{ template "kong.fullname" . }}
+  labels:
+    app: {{ template "kong.name" . }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    release: "{{ .Release.Name }}"
+    heritage: "{{ .Release.Service }}"
+roleRef:
+  apiGroup: rbac.authorization.k8s.io
+  kind: ClusterRole
+  name:  {{ template "kong.fullname" . }}
+subjects:
+  - kind: ServiceAccount
+    name: {{ template "kong.serviceAccountName" . }}
+    namespace: {{ .Release.Namespace }}
+{{- end -}}