blob: 3483eb38e8eaa5535744f297c0cf060d1229e77e [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:
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020028 - /app/ready.py
pramodad6382f2018-03-28 22:32:00 +000029 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
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020040 image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
pramodad6382f2018-03-28 22:32:00 +000041 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
42 name: {{ include "common.name" . }}-readiness
43 containers:
su622ba3865652020-03-25 17:26:51 -040044 {{- if .Values.prometheus.jmx.enabled }}
45 - name: prometheus-jmx-exporter
46 image: "{{ .Values.prometheus.jmx.imageRepository }}/{{ .Values.prometheus.jmx.image }}:{{ .Values.prometheus.jmx.imageTag }}"
47 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
48 command:
49 - java
50 - -XX:+UnlockExperimentalVMOptions
51 - -XX:+UseCGroupMemoryLimitForHeap
52 - -XX:MaxRAMFraction=1
53 - -XshowSettings:vm
54 - -jar
55 - jmx_prometheus_httpserver.jar
56 - {{ .Values.prometheus.jmx.port | quote }}
57 - /etc/jmx-kafka/jmx-mrservice-prometheus.yml
58 ports:
59 - containerPort: {{ .Values.prometheus.jmx.port }}
60 resources:
61 volumeMounts:
62 - name: jmx-config
63 mountPath: /etc/jmx-kafka
64 {{- end }}
pramodad6382f2018-03-28 22:32:00 +000065 - name: {{ include "common.name" . }}
66 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
67 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Sylvain Desbureauxbe728882020-03-06 08:58:23 +010068 ports: {{ include "common.containerPorts" . | nindent 10 }}
pramodad6382f2018-03-28 22:32:00 +000069 {{- if eq .Values.liveness.enabled true }}
70 livenessProbe:
71 tcpSocket:
Sylvain Desbureauxbe728882020-03-06 08:58:23 +010072 port: {{ .Values.liveness.port }}
pramodad6382f2018-03-28 22:32:00 +000073 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
74 periodSeconds: {{ .Values.liveness.periodSeconds }}
su622b8b763cd2019-10-14 15:37:37 -040075 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
pramodad6382f2018-03-28 22:32:00 +000076 {{ end -}}
77 readinessProbe:
78 tcpSocket:
Sylvain Desbureauxbe728882020-03-06 08:58:23 +010079 port: {{ .Values.readiness.port }}
pramodad6382f2018-03-28 22:32:00 +000080 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
81 periodSeconds: {{ .Values.readiness.periodSeconds }}
su622b8b763cd2019-10-14 15:37:37 -040082 timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
sunil unnava49aa92d2018-10-17 16:25:50 -040083 env:
84 - name: enableCadi
efiacore62958b2019-09-27 16:54:36 +010085 value: "{{ .Values.global.aafEnabled }}"
pramodad6382f2018-03-28 22:32:00 +000086 volumeMounts:
87 - mountPath: /etc/localtime
88 name: localtime
89 readOnly: true
90 - mountPath: /appl/dmaapMR1/bundleconfig/etc/appprops/MsgRtrApi.properties
91 subPath: MsgRtrApi.properties
92 name: appprops
su622bfdce6592019-08-08 00:28:29 -040093 - mountPath: /appl/dmaapMR1/bundleconfig/etc/logback.xml
94 subPath: logback.xml
95 name: logback
pramodad6382f2018-03-28 22:32:00 +000096 - mountPath: /appl/dmaapMR1/etc/cadi.properties
97 subPath: cadi.properties
98 name: cadi
99 - mountPath: /appl/dmaapMR1/etc/keyfile
100 subPath: mykey
101 name: mykey
Sylvain Desbureauxbe728882020-03-06 08:58:23 +0100102 resources: {{ include "common.resources" . | nindent 12 }}
pramodad6382f2018-03-28 22:32:00 +0000103 volumes:
104 - name: localtime
105 hostPath:
106 path: /etc/localtime
107 - name: appprops
108 configMap:
109 name: {{ include "common.fullname" . }}-msgrtrapi-prop-configmap
su622bfdce6592019-08-08 00:28:29 -0400110 - name: logback
111 configMap:
112 name: {{ include "common.fullname" . }}-logback-xml-configmap
pramodad6382f2018-03-28 22:32:00 +0000113 - name: cadi
114 configMap:
115 name: {{ include "common.fullname" . }}-cadi-prop-configmap
su622ba3865652020-03-25 17:26:51 -0400116 {{- if .Values.prometheus.jmx.enabled }}
117 - name: jmx-config
118 configMap:
119 name: {{ include "common.fullname" . }}-prometheus-configmap
120 {{- end }}
pramodad6382f2018-03-28 22:32:00 +0000121 - name: mykey
122 secret:
123 secretName: {{ include "common.fullname" . }}-secret
124 imagePullSecrets:
125 - name: "{{ include "common.namespace" . }}-docker-registry-key"