aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/so/components/so-sdc-controller/templates
diff options
context:
space:
mode:
authorefiacor <fiachra.corcoran@est.tech>2022-11-23 12:13:26 +0000
committerFiachra Corcoran <fiachra.corcoran@est.tech>2023-01-09 08:42:18 +0000
commit8d3ff807180b3721ce2551842ec963eff2554404 (patch)
tree1507a9cc5ef146eb509240fa9e3380a262b1d679 /kubernetes/so/components/so-sdc-controller/templates
parente3529a28a1fa8b48b1a8d013be01cfdcb9bb905e (diff)
[SO-SDC-DIST] Updgrade sdc-controller to kafka native
Update sdc-controller to use new sdc-dist client Add sdc-controller KafkaUser for SDC topic auth Signed-off-by: efiacor <fiachra.corcoran@est.tech> Change-Id: I7969bb79a2b329d1140eacc953b40dd487456bcb Issue-ID: DMAAP-1815
Diffstat (limited to 'kubernetes/so/components/so-sdc-controller/templates')
-rwxr-xr-xkubernetes/so/components/so-sdc-controller/templates/deployment.yaml6
-rw-r--r--kubernetes/so/components/so-sdc-controller/templates/so-sdc-dist-kakfa-user.yaml36
2 files changed, 42 insertions, 0 deletions
diff --git a/kubernetes/so/components/so-sdc-controller/templates/deployment.yaml b/kubernetes/so/components/so-sdc-controller/templates/deployment.yaml
index 55493f7c42..0d1977beff 100755
--- a/kubernetes/so/components/so-sdc-controller/templates/deployment.yaml
+++ b/kubernetes/so/components/so-sdc-controller/templates/deployment.yaml
@@ -71,6 +71,12 @@ spec:
{{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-admin-creds" "key" "login") | indent 10 }}
- name: DB_ADMIN_PASSWORD
{{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-admin-creds" "key" "password") | indent 10 }}
+ - name: SECURITY_PROTOCOL
+ value: {{ .Values.config.kafka.securityProtocol }}
+ - name: SASL_MECHANISM
+ value: {{ .Values.config.kafka.saslMechanism }}
+ - name: SASL_JAAS_CONFIG
+ {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "so-sdc-kafka-secret" "key" "sasl.jaas.config") | indent 10 }}
{{ include "so.certificates.env" . | indent 8 | trim }}
envFrom:
- configMapRef:
diff --git a/kubernetes/so/components/so-sdc-controller/templates/so-sdc-dist-kakfa-user.yaml b/kubernetes/so/components/so-sdc-controller/templates/so-sdc-dist-kakfa-user.yaml
new file mode 100644
index 0000000000..4619c8ebc0
--- /dev/null
+++ b/kubernetes/so/components/so-sdc-controller/templates/so-sdc-dist-kakfa-user.yaml
@@ -0,0 +1,36 @@
+{{/*
+# Copyright © 2022 Nordix Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+*/}}
+apiVersion: kafka.strimzi.io/v1beta2
+kind: KafkaUser
+metadata:
+ name: {{ include "common.release" . }}-{{ .Values.global.soSdcListenerKafkaUser }}
+ labels:
+ strimzi.io/cluster: {{ include "common.release" . }}-strimzi
+spec:
+ authentication:
+ type: {{ .Values.config.kafka.saslMechanism | lower }}
+ authorization:
+ type: {{ .Values.config.kafka.authType }}
+ acls:
+ - resource:
+ type: group
+ name: {{ .Values.config.kafka.sdcTopic.consumerGroup }}
+ operation: All
+ - resource:
+ type: topic
+ patternType: prefix
+ name: {{ .Values.config.kafka.sdcTopic.pattern }}
+ operation: All