blob: c17fda1108bf5aa2b75b2e4b7ab74b7e2432d5a6 [file] [log] [blame]
pramodad6382f2018-03-28 22:32:00 +00001# Copyright © 2017 Amdocs, Bell Canada
Durgpal7ad40692018-08-03 07:28:36 +00002# Modifications Copyright © 2018 AT&T
pramodad6382f2018-03-28 22:32:00 +00003#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
Sylvain Desbureauxbe728882020-03-06 08:58:23 +010015
16apiVersion: apps/v1
sunil unnavab96a3912018-12-06 09:50:39 -050017kind: StatefulSet
Sylvain Desbureauxbe728882020-03-06 08:58:23 +010018metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
pramodad6382f2018-03-28 22:32:00 +000019spec:
Sylvain Desbureauxbe728882020-03-06 08:58:23 +010020 selector: {{- include "common.selectors" . | nindent 4 }}
21 serviceName: {{ include "common.servicename" . }}
pramodad6382f2018-03-28 22:32:00 +000022 replicas: {{ .Values.replicaCount }}
23 template:
Sylvain Desbureauxbe728882020-03-06 08:58:23 +010024 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
pramodad6382f2018-03-28 22:32:00 +000025 spec:
26 initContainers:
27 - command:
28 - /root/ready.py
29 args:
30 - --container-name
Dominic Lunanuova1ba2b252018-04-30 19:01:31 +000031 - {{ .Values.kafka.name }}
pramodad6382f2018-03-28 22:32:00 +000032 - --container-name
Dominic Lunanuova1ba2b252018-04-30 19:01:31 +000033 - {{ .Values.zookeeper.name }}
pramodad6382f2018-03-28 22:32:00 +000034 env:
35 - name: NAMESPACE
36 valueFrom:
37 fieldRef:
38 apiVersion: v1
39 fieldPath: metadata.namespace
40 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
41 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
42 name: {{ include "common.name" . }}-readiness
43 containers:
44 - name: {{ include "common.name" . }}
45 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
46 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Sylvain Desbureauxbe728882020-03-06 08:58:23 +010047 ports: {{ include "common.containerPorts" . | nindent 10 }}
pramodad6382f2018-03-28 22:32:00 +000048 {{- if eq .Values.liveness.enabled true }}
49 livenessProbe:
50 tcpSocket:
Sylvain Desbureauxbe728882020-03-06 08:58:23 +010051 port: {{ .Values.liveness.port }}
pramodad6382f2018-03-28 22:32:00 +000052 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
53 periodSeconds: {{ .Values.liveness.periodSeconds }}
su622b8b763cd2019-10-14 15:37:37 -040054 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
pramodad6382f2018-03-28 22:32:00 +000055 {{ end -}}
56 readinessProbe:
57 tcpSocket:
Sylvain Desbureauxbe728882020-03-06 08:58:23 +010058 port: {{ .Values.readiness.port }}
pramodad6382f2018-03-28 22:32:00 +000059 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
60 periodSeconds: {{ .Values.readiness.periodSeconds }}
su622b8b763cd2019-10-14 15:37:37 -040061 timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
sunil unnava49aa92d2018-10-17 16:25:50 -040062 env:
63 - name: enableCadi
efiacore62958b2019-09-27 16:54:36 +010064 value: "{{ .Values.global.aafEnabled }}"
pramodad6382f2018-03-28 22:32:00 +000065 volumeMounts:
66 - mountPath: /etc/localtime
67 name: localtime
68 readOnly: true
69 - mountPath: /appl/dmaapMR1/bundleconfig/etc/appprops/MsgRtrApi.properties
70 subPath: MsgRtrApi.properties
71 name: appprops
su622bfdce6592019-08-08 00:28:29 -040072 - mountPath: /appl/dmaapMR1/bundleconfig/etc/logback.xml
73 subPath: logback.xml
74 name: logback
pramodad6382f2018-03-28 22:32:00 +000075 - mountPath: /appl/dmaapMR1/etc/cadi.properties
76 subPath: cadi.properties
77 name: cadi
78 - mountPath: /appl/dmaapMR1/etc/keyfile
79 subPath: mykey
80 name: mykey
Sylvain Desbureauxbe728882020-03-06 08:58:23 +010081 resources: {{ include "common.resources" . | nindent 12 }}
pramodad6382f2018-03-28 22:32:00 +000082 volumes:
83 - name: localtime
84 hostPath:
85 path: /etc/localtime
86 - name: appprops
87 configMap:
88 name: {{ include "common.fullname" . }}-msgrtrapi-prop-configmap
su622bfdce6592019-08-08 00:28:29 -040089 - name: logback
90 configMap:
91 name: {{ include "common.fullname" . }}-logback-xml-configmap
pramodad6382f2018-03-28 22:32:00 +000092 - name: cadi
93 configMap:
94 name: {{ include "common.fullname" . }}-cadi-prop-configmap
95 - name: mykey
96 secret:
97 secretName: {{ include "common.fullname" . }}-secret
98 imagePullSecrets:
99 - name: "{{ include "common.namespace" . }}-docker-registry-key"