2 #============LICENSE_START========================================================
3 # ================================================================================
4 # Copyright (c) 2021 ZTE Intellectual Property. All rights reserved.
5 # ================================================================================
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
10 # http://www.apache.org/licenses/LICENSE-2.0
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.
17 # ============LICENSE_END=========================================================
22 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
25 selector: {{- include "common.selectors" . | nindent 4 }}
27 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
29 initContainers: {{- include "common.certInitializer.initContainer" . | nindent 6 }}
31 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.consulLoaderImage }}
32 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
35 - holmes-rule-mgmt|/hrmconfigs/cfy.json
38 - mountPath: /hrmconfigs
39 name: {{ include "common.fullname" . }}-config
40 - name: {{ include "common.name" . }}-env-config
41 image: {{ include "repositoryGenerator.image.envsubst" . }}
42 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
47 - "cd /hrmconfig && for PFILE in `find . -type f -not -name '*.json'`; do envsubst < ${PFILE} > /config/${PFILE##*/}; done"
50 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "login") | indent 10 }}
52 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "password") | indent 10 }}
54 value: {{ .Values.config.pgConfig.dbName }}
56 value: {{ .Values.config.pgConfig.dbHost }}
58 value: "{{ .Values.config.pgConfig.dbPort }}"
60 - mountPath: /hrmconfig
61 name: {{ include "common.fullname" . }}-config
63 name: {{ include "common.fullname" . }}-env-config
65 - name: {{ include "common.name" . }}
66 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
67 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
68 ports: {{ include "common.containerPorts" . | nindent 8 }}
69 volumeMounts: {{- include "common.certInitializer.volumeMount" . | nindent 8 }}
70 - name: {{ include "common.fullname" . }}-env-config
71 mountPath: /opt/hrmconfig
72 # disable liveness probe when breakpoints set in debugger
73 # so K8s doesn't restart unresponsive container
74 {{- if eq .Values.liveness.enabled true }}
77 path: {{ .Values.liveness.path }}
78 port: {{ .Values.liveness.port }}
79 scheme: {{ .Values.liveness.scheme }}
80 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
81 periodSeconds: {{ .Values.liveness.periodSeconds }}
85 path: {{ .Values.readiness.path }}
86 port: {{ .Values.readiness.port }}
87 scheme: {{ .Values.readiness.scheme }}
88 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
89 periodSeconds: {{ .Values.readiness.periodSeconds }}
95 value: consul-server.{{ include "common.namespace" . }}
96 - name: CONFIG_BINDING_SERVICE
97 value: config-binding-service
104 fieldPath: status.podIP
106 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "password") | indent 10 }}
107 - name: JDBC_USERNAME
108 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "login") | indent 10 }}
109 - name: JDBC_PASSWORD
110 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "password") | indent 10 }}
112 value: {{ .Values.config.pgConfig.dbName }}
114 value: {{ .Values.config.pgConfig.dbHost }}
116 value: "{{ .Values.config.pgConfig.dbPort }}"
117 volumes: {{ include "common.certInitializer.volumes" . | nindent 6 }}
118 - name: {{ include "common.fullname" . }}-config
121 name: {{ include "common.fullname" . }}
122 - name: {{ include "common.fullname" . }}-env-config
126 - name: "{{ include "common.namespace" . }}-docker-registry-key"