blob: e936ed2fb69ddbea8b5de2c2c2e525f6c80db10d [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
pramodad6382f2018-03-28 22:32:00 +00004#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
Jakub Latusek67f4e8d2020-10-21 13:36:29 +020016*/}}
Sylvain Desbureauxbe728882020-03-06 08:58:23 +010017
18apiVersion: apps/v1
sunil unnavab96a3912018-12-06 09:50:39 -050019kind: StatefulSet
Sylvain Desbureauxbe728882020-03-06 08:58:23 +010020metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
pramodad6382f2018-03-28 22:32:00 +000021spec:
Sylvain Desbureauxbe728882020-03-06 08:58:23 +010022 selector: {{- include "common.selectors" . | nindent 4 }}
23 serviceName: {{ include "common.servicename" . }}
pramodad6382f2018-03-28 22:32:00 +000024 replicas: {{ .Values.replicaCount }}
25 template:
Sylvain Desbureauxbe728882020-03-06 08:58:23 +010026 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
pramodad6382f2018-03-28 22:32:00 +000027 spec:
28 initContainers:
29 - command:
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020030 - /app/ready.py
pramodad6382f2018-03-28 22:32:00 +000031 args:
32 - --container-name
Dominic Lunanuova1ba2b252018-04-30 19:01:31 +000033 - {{ .Values.kafka.name }}
pramodad6382f2018-03-28 22:32:00 +000034 - --container-name
Dominic Lunanuova1ba2b252018-04-30 19:01:31 +000035 - {{ .Values.zookeeper.name }}
pramodad6382f2018-03-28 22:32:00 +000036 env:
37 - name: NAMESPACE
38 valueFrom:
39 fieldRef:
40 apiVersion: v1
41 fieldPath: metadata.namespace
Sylvain Desbureaux6b096542020-11-21 22:51:24 +010042 image: {{ include "repositoryGenerator.image.readiness" . }}
pramodad6382f2018-03-28 22:32:00 +000043 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
44 name: {{ include "common.name" . }}-readiness
45 containers:
su622ba3865652020-03-25 17:26:51 -040046 {{- if .Values.prometheus.jmx.enabled }}
47 - name: prometheus-jmx-exporter
Sylvain Desbureaux6b096542020-11-21 22:51:24 +010048 image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.prometheus.jmx.image }}:{{ .Values.prometheus.jmx.imageTag }}
su622ba3865652020-03-25 17:26:51 -040049 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
50 command:
51 - java
52 - -XX:+UnlockExperimentalVMOptions
53 - -XX:+UseCGroupMemoryLimitForHeap
54 - -XX:MaxRAMFraction=1
55 - -XshowSettings:vm
56 - -jar
57 - jmx_prometheus_httpserver.jar
58 - {{ .Values.prometheus.jmx.port | quote }}
59 - /etc/jmx-kafka/jmx-mrservice-prometheus.yml
60 ports:
61 - containerPort: {{ .Values.prometheus.jmx.port }}
62 resources:
63 volumeMounts:
64 - name: jmx-config
65 mountPath: /etc/jmx-kafka
66 {{- end }}
pramodad6382f2018-03-28 22:32:00 +000067 - name: {{ include "common.name" . }}
Sylvain Desbureaux6b096542020-11-21 22:51:24 +010068 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
pramodad6382f2018-03-28 22:32:00 +000069 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Sylvain Desbureauxbe728882020-03-06 08:58:23 +010070 ports: {{ include "common.containerPorts" . | nindent 10 }}
pramodad6382f2018-03-28 22:32:00 +000071 {{- if eq .Values.liveness.enabled true }}
72 livenessProbe:
73 tcpSocket:
Sylvain Desbureauxbe728882020-03-06 08:58:23 +010074 port: {{ .Values.liveness.port }}
pramodad6382f2018-03-28 22:32:00 +000075 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
76 periodSeconds: {{ .Values.liveness.periodSeconds }}
su622b8b763cd2019-10-14 15:37:37 -040077 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
pramodad6382f2018-03-28 22:32:00 +000078 {{ end -}}
79 readinessProbe:
80 tcpSocket:
Sylvain Desbureauxbe728882020-03-06 08:58:23 +010081 port: {{ .Values.readiness.port }}
pramodad6382f2018-03-28 22:32:00 +000082 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
83 periodSeconds: {{ .Values.readiness.periodSeconds }}
su622b8b763cd2019-10-14 15:37:37 -040084 timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
sunil unnava49aa92d2018-10-17 16:25:50 -040085 env:
86 - name: enableCadi
efiacore62958b2019-09-27 16:54:36 +010087 value: "{{ .Values.global.aafEnabled }}"
pramodad6382f2018-03-28 22:32:00 +000088 volumeMounts:
89 - mountPath: /etc/localtime
90 name: localtime
91 readOnly: true
92 - mountPath: /appl/dmaapMR1/bundleconfig/etc/appprops/MsgRtrApi.properties
93 subPath: MsgRtrApi.properties
94 name: appprops
su622bfdce6592019-08-08 00:28:29 -040095 - mountPath: /appl/dmaapMR1/bundleconfig/etc/logback.xml
96 subPath: logback.xml
97 name: logback
pramodad6382f2018-03-28 22:32:00 +000098 - mountPath: /appl/dmaapMR1/etc/cadi.properties
99 subPath: cadi.properties
100 name: cadi
101 - mountPath: /appl/dmaapMR1/etc/keyfile
102 subPath: mykey
103 name: mykey
Sylvain Desbureauxbe728882020-03-06 08:58:23 +0100104 resources: {{ include "common.resources" . | nindent 12 }}
pramodad6382f2018-03-28 22:32:00 +0000105 volumes:
106 - name: localtime
107 hostPath:
108 path: /etc/localtime
109 - name: appprops
110 configMap:
111 name: {{ include "common.fullname" . }}-msgrtrapi-prop-configmap
su622bfdce6592019-08-08 00:28:29 -0400112 - name: logback
113 configMap:
114 name: {{ include "common.fullname" . }}-logback-xml-configmap
pramodad6382f2018-03-28 22:32:00 +0000115 - name: cadi
116 configMap:
117 name: {{ include "common.fullname" . }}-cadi-prop-configmap
su622ba3865652020-03-25 17:26:51 -0400118 {{- if .Values.prometheus.jmx.enabled }}
119 - name: jmx-config
120 configMap:
121 name: {{ include "common.fullname" . }}-prometheus-configmap
122 {{- end }}
pramodad6382f2018-03-28 22:32:00 +0000123 - name: mykey
124 secret:
125 secretName: {{ include "common.fullname" . }}-secret
126 imagePullSecrets:
127 - name: "{{ include "common.namespace" . }}-docker-registry-key"