blob: bb42561cbeff28606ad3164ed49937447d9d8811 [file] [log] [blame]
Jakub Latusek67f4e8d2020-10-21 13:36:29 +02001{{/*
pramodad6382f2018-03-28 22:32:00 +00002# Copyright © 2017 Amdocs, Bell Canada
Durgpal7ad40692018-08-03 07:28:36 +00003# Modifications Copyright © 2018 AT&T
efiacorfe8f8c92022-03-15 15:36:48 +00004# Modifications Copyright © 2021-2022 Nordix Foundation
pramodad6382f2018-03-28 22:32:00 +00005#
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
Jakub Latusek67f4e8d2020-10-21 13:36:29 +020017*/}}
Sylvain Desbureauxbe728882020-03-06 08:58:23 +010018
19apiVersion: apps/v1
sunil unnavab96a3912018-12-06 09:50:39 -050020kind: StatefulSet
Sylvain Desbureauxbe728882020-03-06 08:58:23 +010021metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
pramodad6382f2018-03-28 22:32:00 +000022spec:
Sylvain Desbureauxbe728882020-03-06 08:58:23 +010023 selector: {{- include "common.selectors" . | nindent 4 }}
24 serviceName: {{ include "common.servicename" . }}
efiacor2123fec2022-12-09 13:40:55 +000025 replicas: 1
pramodad6382f2018-03-28 22:32:00 +000026 template:
Sylvain Desbureauxbe728882020-03-06 08:58:23 +010027 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
pramodad6382f2018-03-28 22:32:00 +000028 spec:
pramodad6382f2018-03-28 22:32:00 +000029 containers:
30 - name: {{ include "common.name" . }}
Sylvain Desbureaux6b096542020-11-21 22:51:24 +010031 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
pramodad6382f2018-03-28 22:32:00 +000032 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Sylvain Desbureauxbe728882020-03-06 08:58:23 +010033 ports: {{ include "common.containerPorts" . | nindent 10 }}
pramodad6382f2018-03-28 22:32:00 +000034 {{- if eq .Values.liveness.enabled true }}
35 livenessProbe:
36 tcpSocket:
Sylvain Desbureauxbe728882020-03-06 08:58:23 +010037 port: {{ .Values.liveness.port }}
pramodad6382f2018-03-28 22:32:00 +000038 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
39 periodSeconds: {{ .Values.liveness.periodSeconds }}
su622b8b763cd2019-10-14 15:37:37 -040040 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
Sylvain Desbureaux8fade992021-12-06 11:33:11 +010041 successThreshold: {{ .Values.liveness.successThreshold }}
42 failureThreshold: {{ .Values.liveness.failureThreshold }}
43 {{ end }}
pramodad6382f2018-03-28 22:32:00 +000044 readinessProbe:
45 tcpSocket:
Sylvain Desbureauxbe728882020-03-06 08:58:23 +010046 port: {{ .Values.readiness.port }}
pramodad6382f2018-03-28 22:32:00 +000047 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
48 periodSeconds: {{ .Values.readiness.periodSeconds }}
su622b8b763cd2019-10-14 15:37:37 -040049 timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
Sylvain Desbureaux8fade992021-12-06 11:33:11 +010050 successThreshold: {{ .Values.readiness.successThreshold }}
51 failureThreshold: {{ .Values.readiness.failureThreshold }}
52 startupProbe:
53 tcpSocket:
54 port: {{ .Values.startup.port }}
55 initialDelaySeconds: {{ .Values.startup.initialDelaySeconds }}
56 periodSeconds: {{ .Values.startup.periodSeconds }}
57 timeoutSeconds: {{ .Values.startup.timeoutSeconds }}
58 successThreshold: {{ .Values.startup.successThreshold }}
59 failureThreshold: {{ .Values.startup.failureThreshold }}
sunil unnava49aa92d2018-10-17 16:25:50 -040060 env:
efiacorfe8f8c92022-03-15 15:36:48 +000061 - name: JAASLOGIN
efiacor2123fec2022-12-09 13:40:55 +000062 valueFrom:
63 secretKeyRef:
64 name: strimzi-kafka-admin
65 key: sasl.jaas.config
efiacorfe8f8c92022-03-15 15:36:48 +000066 - name: SASLMECH
efiacor57901a92022-11-14 16:17:15 +000067 value: scram-sha-512
sunil unnava49aa92d2018-10-17 16:25:50 -040068 - name: enableCadi
efiacor2123fec2022-12-09 13:40:55 +000069 value: "true"
efiacorb66260d2022-09-26 10:28:43 +010070 - name: useZkTopicStore
71 value: "false"
efiacor2123fec2022-12-09 13:40:55 +000072 volumeMounts:
73 - mountPath: /etc/localtime
74 name: localtime
75 readOnly: true
76 - mountPath: /appl/dmaapMR1/bundleconfig/etc/appprops/MsgRtrApi.properties
77 subPath: MsgRtrApi.properties
78 name: appprops
79 - mountPath: /appl/dmaapMR1/bundleconfig/etc/logback.xml
80 subPath: logback.xml
81 name: logback
82 resources:
83{{ include "common.resources" . }}
84 - name: {{ .Values.zkTunnelService.name }}
85 image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.zkTunnelService.image }}
86 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
87 command:
88 - /opt/stunnel/stunnel_run.sh
89 ports:
90 - containerPort: {{ .Values.zkTunnelService.internalPort }}
91 name: {{ .Values.zkTunnelService.portName }}
92 protocol: {{ .Values.zkTunnelService.protocol }}
93 env:
94 - name: LOG_LEVEL
95 value: {{ .Values.zkTunnelService.logLevel }}
96 - name: STRIMZI_ZOOKEEPER_CONNECT
97 value: '{{ include "common.release" . }}-strimzi-zookeeper-client:{{ .Values.zkTunnelService.internalPort }}'
98 livenessProbe:
99 exec:
100 command:
101 - /opt/stunnel/stunnel_healthcheck.sh
102 - '{{ .Values.zkTunnelService.internalPort }}'
103 failureThreshold: 3
104 initialDelaySeconds: 15
105 periodSeconds: 10
106 successThreshold: 1
107 timeoutSeconds: 5
108 readinessProbe:
109 exec:
110 command:
111 - /opt/stunnel/stunnel_healthcheck.sh
112 - '{{ .Values.zkTunnelService.internalPort }}'
113 failureThreshold: 3
114 initialDelaySeconds: 15
115 periodSeconds: 10
116 successThreshold: 1
117 timeoutSeconds: 5
118 volumeMounts:
119 - mountPath: /etc/cluster-operator-certs/
120 name: cluster-operator-certs
121 - mountPath: /etc/cluster-ca-certs/
122 name: cluster-ca-certs
farida azmy13388ba2021-03-17 11:33:28 +0200123 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
efiacor2123fec2022-12-09 13:40:55 +0000124 volumes:
pramodad6382f2018-03-28 22:32:00 +0000125 - name: localtime
126 hostPath:
127 path: /etc/localtime
128 - name: appprops
129 configMap:
130 name: {{ include "common.fullname" . }}-msgrtrapi-prop-configmap
su622bfdce6592019-08-08 00:28:29 -0400131 - name: logback
132 configMap:
133 name: {{ include "common.fullname" . }}-logback-xml-configmap
efiacorfe8f8c92022-03-15 15:36:48 +0000134 - name: cluster-operator-certs
135 secret:
136 defaultMode: 288
137 secretName: {{ include "common.release" . }}-strimzi-cluster-operator-certs
138 - name: cluster-ca-certs
139 secret:
140 defaultMode: 288
141 secretName: {{ include "common.release" . }}-strimzi-cluster-ca-cert
pramodad6382f2018-03-28 22:32:00 +0000142 imagePullSecrets:
143 - name: "{{ include "common.namespace" . }}-docker-registry-key"
efiacorfe8f8c92022-03-15 15:36:48 +0000144---
145apiVersion: networking.k8s.io/v1
146kind: NetworkPolicy
147metadata:
148 name: {{ include "common.fullname" . }}-zk-network-policy
149 namespace: {{ include "common.namespace" . }}
150spec:
151 podSelector:
152 matchLabels:
153 strimzi.io/name: {{ include "common.release" . }}-strimzi-zookeeper
154 ingress:
155 - from:
156 - podSelector:
157 matchLabels:
158 app.kubernetes.io/name: {{ include "common.name" . }}
159 ports:
efiacor2123fec2022-12-09 13:40:55 +0000160 - port: {{ .Values.zkTunnelService.internalPort }}
161 protocol: {{ .Values.zkTunnelService.protocol }}
efiacorfe8f8c92022-03-15 15:36:48 +0000162 policyTypes:
Andreas Geisslere7d56872022-06-22 11:23:11 +0200163 - Ingress