pramod | ad6382f | 2018-03-28 22:32:00 +0000 | [diff] [blame] | 1 | # Copyright © 2017 Amdocs, Bell Canada |
Durgpal | 7ad4069 | 2018-08-03 07:28:36 +0000 | [diff] [blame] | 2 | # Modifications Copyright © 2018 AT&T |
pramod | ad6382f | 2018-03-28 22:32:00 +0000 | [diff] [blame] | 3 | # |
| 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 Desbureaux | be72888 | 2020-03-06 08:58:23 +0100 | [diff] [blame] | 15 | |
| 16 | apiVersion: apps/v1 |
sunil unnava | b96a391 | 2018-12-06 09:50:39 -0500 | [diff] [blame] | 17 | kind: StatefulSet |
Sylvain Desbureaux | be72888 | 2020-03-06 08:58:23 +0100 | [diff] [blame] | 18 | metadata: {{- include "common.resourceMetadata" . | nindent 2 }} |
pramod | ad6382f | 2018-03-28 22:32:00 +0000 | [diff] [blame] | 19 | spec: |
Sylvain Desbureaux | be72888 | 2020-03-06 08:58:23 +0100 | [diff] [blame] | 20 | selector: {{- include "common.selectors" . | nindent 4 }} |
| 21 | serviceName: {{ include "common.servicename" . }} |
pramod | ad6382f | 2018-03-28 22:32:00 +0000 | [diff] [blame] | 22 | replicas: {{ .Values.replicaCount }} |
| 23 | template: |
Sylvain Desbureaux | be72888 | 2020-03-06 08:58:23 +0100 | [diff] [blame] | 24 | metadata: {{- include "common.templateMetadata" . | nindent 6 }} |
pramod | ad6382f | 2018-03-28 22:32:00 +0000 | [diff] [blame] | 25 | spec: |
| 26 | initContainers: |
| 27 | - command: |
| 28 | - /root/ready.py |
| 29 | args: |
| 30 | - --container-name |
Dominic Lunanuova | 1ba2b25 | 2018-04-30 19:01:31 +0000 | [diff] [blame] | 31 | - {{ .Values.kafka.name }} |
pramod | ad6382f | 2018-03-28 22:32:00 +0000 | [diff] [blame] | 32 | - --container-name |
Dominic Lunanuova | 1ba2b25 | 2018-04-30 19:01:31 +0000 | [diff] [blame] | 33 | - {{ .Values.zookeeper.name }} |
pramod | ad6382f | 2018-03-28 22:32:00 +0000 | [diff] [blame] | 34 | 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: |
su622b | a386565 | 2020-03-25 17:26:51 -0400 | [diff] [blame^] | 44 | {{- 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 }} |
pramod | ad6382f | 2018-03-28 22:32:00 +0000 | [diff] [blame] | 65 | - name: {{ include "common.name" . }} |
| 66 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
| 67 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
Sylvain Desbureaux | be72888 | 2020-03-06 08:58:23 +0100 | [diff] [blame] | 68 | ports: {{ include "common.containerPorts" . | nindent 10 }} |
pramod | ad6382f | 2018-03-28 22:32:00 +0000 | [diff] [blame] | 69 | {{- if eq .Values.liveness.enabled true }} |
| 70 | livenessProbe: |
| 71 | tcpSocket: |
Sylvain Desbureaux | be72888 | 2020-03-06 08:58:23 +0100 | [diff] [blame] | 72 | port: {{ .Values.liveness.port }} |
pramod | ad6382f | 2018-03-28 22:32:00 +0000 | [diff] [blame] | 73 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 74 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
su622b | 8b763cd | 2019-10-14 15:37:37 -0400 | [diff] [blame] | 75 | timeoutSeconds: {{ .Values.liveness.timeoutSeconds }} |
pramod | ad6382f | 2018-03-28 22:32:00 +0000 | [diff] [blame] | 76 | {{ end -}} |
| 77 | readinessProbe: |
| 78 | tcpSocket: |
Sylvain Desbureaux | be72888 | 2020-03-06 08:58:23 +0100 | [diff] [blame] | 79 | port: {{ .Values.readiness.port }} |
pramod | ad6382f | 2018-03-28 22:32:00 +0000 | [diff] [blame] | 80 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 81 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
su622b | 8b763cd | 2019-10-14 15:37:37 -0400 | [diff] [blame] | 82 | timeoutSeconds: {{ .Values.readiness.timeoutSeconds }} |
sunil unnava | 49aa92d | 2018-10-17 16:25:50 -0400 | [diff] [blame] | 83 | env: |
| 84 | - name: enableCadi |
efiacor | e62958b | 2019-09-27 16:54:36 +0100 | [diff] [blame] | 85 | value: "{{ .Values.global.aafEnabled }}" |
pramod | ad6382f | 2018-03-28 22:32:00 +0000 | [diff] [blame] | 86 | 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 |
su622b | fdce659 | 2019-08-08 00:28:29 -0400 | [diff] [blame] | 93 | - mountPath: /appl/dmaapMR1/bundleconfig/etc/logback.xml |
| 94 | subPath: logback.xml |
| 95 | name: logback |
pramod | ad6382f | 2018-03-28 22:32:00 +0000 | [diff] [blame] | 96 | - 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 Desbureaux | be72888 | 2020-03-06 08:58:23 +0100 | [diff] [blame] | 102 | resources: {{ include "common.resources" . | nindent 12 }} |
pramod | ad6382f | 2018-03-28 22:32:00 +0000 | [diff] [blame] | 103 | volumes: |
| 104 | - name: localtime |
| 105 | hostPath: |
| 106 | path: /etc/localtime |
| 107 | - name: appprops |
| 108 | configMap: |
| 109 | name: {{ include "common.fullname" . }}-msgrtrapi-prop-configmap |
su622b | fdce659 | 2019-08-08 00:28:29 -0400 | [diff] [blame] | 110 | - name: logback |
| 111 | configMap: |
| 112 | name: {{ include "common.fullname" . }}-logback-xml-configmap |
pramod | ad6382f | 2018-03-28 22:32:00 +0000 | [diff] [blame] | 113 | - name: cadi |
| 114 | configMap: |
| 115 | name: {{ include "common.fullname" . }}-cadi-prop-configmap |
su622b | a386565 | 2020-03-25 17:26:51 -0400 | [diff] [blame^] | 116 | {{- if .Values.prometheus.jmx.enabled }} |
| 117 | - name: jmx-config |
| 118 | configMap: |
| 119 | name: {{ include "common.fullname" . }}-prometheus-configmap |
| 120 | {{- end }} |
pramod | ad6382f | 2018-03-28 22:32:00 +0000 | [diff] [blame] | 121 | - name: mykey |
| 122 | secret: |
| 123 | secretName: {{ include "common.fullname" . }}-secret |
| 124 | imagePullSecrets: |
| 125 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |