1 # Copyright (c) 2019 IBM, Bell Canada
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 apiVersion: extensions/v1beta1
18 name: {{ include "common.fullname" . }}
19 namespace: {{ include "common.namespace" . }}
21 app: {{ include "common.name" . }}
22 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
23 release: {{ include "common.release" . }}
24 heritage: {{ .Release.Service }}
26 replicas: {{ .Values.replicaCount }}
30 # This allow a new pod to be ready before terminating the old one
31 # causing no downtime when replicas is set to 1
34 # maxSurge to 1 is very important for the hazelcast integration
35 # we only want one pod at a time to restart not multiple
36 # and break the hazelcast cluster. We should not use % maxSurge value
37 # ref : https://hazelcast.com/blog/rolling-upgrade-hazelcast-imdg-on-kubernetes/
42 app: {{ include "common.name" . }}
43 release: {{ include "common.release" . }}
51 {{- if .Values.dmaapEnabled }}
60 fieldPath: metadata.namespace
61 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
62 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
63 name: {{ include "common.name" . }}-readiness
65 - name: {{ include "common.name" . }}
66 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
67 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
69 - name: APP_CONFIG_HOME
70 value: {{ .Values.config.appConfigDir }}
71 - name: USE_SCRIPT_COMPILE_CACHE
72 value: {{ .Values.config.useScriptCompileCache | quote }}
73 # Cluster should only be enabled when replicaCount is more than 2 and useScriptCompileCache is set to false otherwise it won't work properly
74 - name: CLUSTER_ENABLED
75 value: {{ if and (gt (int (.Values.replicaCount)) 2) (not .Values.config.useScriptCompileCache) }} {{ .Values.cluster.enabled | quote }} {{ else }} "false" {{ end }}
77 value: {{ .Values.cluster.clusterName }}
78 - name: CLUSTER_NODE_ID
81 fieldPath: metadata.name
82 - name: CLUSTER_CONFIG_FILE
83 value: {{ .Values.config.appConfigDir }}/hazelcast.yaml
85 - containerPort: {{ .Values.service.http.internalPort }}
86 - containerPort: {{ .Values.service.grpc.internalPort }}
87 - containerPort: {{ .Values.service.cluster.internalPort }}
88 # disable liveness probe when breakpoints set in debugger
89 # so K8s doesn't restart unresponsive container
90 {{ if .Values.liveness.enabled }}
93 path: /api/v1/execution-service/health-check
94 port: {{ .Values.service.http.internalPort }}
97 value: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==
98 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
99 periodSeconds: {{ .Values.liveness.periodSeconds }}
100 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
104 path: /api/v1/execution-service/health-check
105 port: {{ .Values.service.http.internalPort }}
107 - name: Authorization
108 value: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==
109 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
110 periodSeconds: {{ .Values.readiness.periodSeconds }}
111 timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
113 - mountPath: /etc/localtime
116 - mountPath: {{ .Values.config.appConfigDir }}/application.properties
117 name: {{ include "common.fullname" . }}-config
118 subPath: application.properties
119 - mountPath: {{ .Values.config.appConfigDir }}/logback.xml
120 name: {{ include "common.fullname" . }}-config
122 - mountPath: {{ .Values.config.appConfigDir }}/hazelcast.yaml
123 name: {{ include "common.fullname" . }}-config
124 subPath: hazelcast.yaml
126 - mountPath: {{ .Values.config.appConfigDir }}/ONAP_RootCA.cer
127 name: {{ include "common.fullname" . }}-config
128 subPath: ONAP_RootCA.cer
130 - mountPath: {{ .Values.persistence.deployedBlueprint }}
131 name: {{ include "common.fullname" . }}-blueprints
133 {{ include "common.resources" . | indent 12 }}
134 {{- if .Values.nodeSelector }}
136 {{ toYaml .Values.nodeSelector | indent 10 }}
138 {{- if .Values.affinity }}
140 {{ toYaml .Values.affinity | indent 10 }}
146 - name: {{ include "common.fullname" . }}-config
148 name: {{ include "common.fullname" . }}-configmap
150 - key: application.properties
151 path: application.properties
154 - key: hazelcast.yaml
156 - key: ONAP_RootCA.cer
157 path: ONAP_RootCA.cer
158 - name: {{ include "common.fullname" . }}-blueprints
159 persistentVolumeClaim:
160 claimName: {{ include "common.release" . }}-cds-blueprints
162 - name: "{{ include "common.namespace" . }}-docker-registry-key"