summaryrefslogtreecommitdiffstats
path: root/kubernetes/cds/charts/cds-blueprints-processor/templates/deployment.yaml
diff options
context:
space:
mode:
authorSebastien Premont-Tendland <sebastien.premont@bell.ca>2020-02-17 11:32:15 -0500
committerSebastien Premont-Tendland <sebastien.premont@bell.ca>2020-02-18 18:49:56 +0000
commitb679d7bfa1ff3bdba9d70fee6beecdbf9f45d015 (patch)
tree1f33b8602a3ec2b00ce211730018d28e39840b69 /kubernetes/cds/charts/cds-blueprints-processor/templates/deployment.yaml
parent6e61631cd701db5f31559b7c065ddea3d85bd426 (diff)
Cluster Distributed lock service integration with OOM.
Disabled by default. In order to enable cluster replicaCount should be higher than 2 and useScriptCompileCache is set to false. We need to disable script compile cache otherwise there is issue with updating CBA when running multiple replicas of blueprint processor. Issue-ID: CCSDK-2011 Signed-off-by: Sebastien Premont-Tendland <sebastien.premont@bell.ca> Change-Id: I6f6071556eb499832f9a765ba4c27100497c6e88
Diffstat (limited to 'kubernetes/cds/charts/cds-blueprints-processor/templates/deployment.yaml')
-rwxr-xr-xkubernetes/cds/charts/cds-blueprints-processor/templates/deployment.yaml31
1 files changed, 31 insertions, 0 deletions
diff --git a/kubernetes/cds/charts/cds-blueprints-processor/templates/deployment.yaml b/kubernetes/cds/charts/cds-blueprints-processor/templates/deployment.yaml
index a90e4d7b68..749e9a4637 100755
--- a/kubernetes/cds/charts/cds-blueprints-processor/templates/deployment.yaml
+++ b/kubernetes/cds/charts/cds-blueprints-processor/templates/deployment.yaml
@@ -24,6 +24,18 @@ metadata:
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
+ strategy:
+ type: RollingUpdate
+ rollingUpdate:
+ # This allow a new pod to be ready before terminating the old one
+ # causing no downtime when replicas is set to 1
+ maxUnavailable: 0
+
+ # maxSurge to 1 is very important for the hazelcast integration
+ # we only want one pod at a time to restart not multiple
+ # and break the hazelcast cluster. We should not use % maxSurge value
+ # ref : https://hazelcast.com/blog/rolling-upgrade-hazelcast-imdg-on-kubernetes/
+ maxSurge: 1
template:
metadata:
labels:
@@ -56,9 +68,23 @@ spec:
env:
- name: APP_CONFIG_HOME
value: {{ .Values.config.appConfigDir }}
+ - name: USE_SCRIPT_COMPILE_CACHE
+ value: {{ .Values.config.useScriptCompileCache | quote }}
+ # Cluster should only be enabled when replicaCount is more than 2 and useScriptCompileCache is set to false otherwise it won't work properly
+ - name: CLUSTER_ENABLED
+ value: {{ if and (gt (int (.Values.replicaCount)) 2) (not .Values.config.useScriptCompileCache) }} {{ .Values.cluster.enabled | quote }} {{ else }} "false" {{ end }}
+ - name: CLUSTER_ID
+ value: {{ .Values.cluster.clusterName }}
+ - name: CLUSTER_NODE_ID
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.name
+ - name: CLUSTER_CONFIG_FILE
+ value: {{ .Values.config.appConfigDir }}/hazelcast.yaml
ports:
- containerPort: {{ .Values.service.http.internalPort }}
- containerPort: {{ .Values.service.grpc.internalPort }}
+ - containerPort: {{ .Values.service.cluster.internalPort }}
# disable liveness probe when breakpoints set in debugger
# so K8s doesn't restart unresponsive container
{{ if .Values.liveness.enabled }}
@@ -93,6 +119,9 @@ spec:
- mountPath: {{ .Values.config.appConfigDir }}/logback.xml
name: {{ include "common.fullname" . }}-config
subPath: logback.xml
+ - mountPath: {{ .Values.config.appConfigDir }}/hazelcast.yaml
+ name: {{ include "common.fullname" . }}-config
+ subPath: hazelcast.yaml
- mountPath: {{ .Values.config.appConfigDir }}/ONAP_RootCA.cer
name: {{ include "common.fullname" . }}-config
@@ -122,6 +151,8 @@ spec:
path: application.properties
- key: logback.xml
path: logback.xml
+ - key: hazelcast.yaml
+ path: hazelcast.yaml
- key: ONAP_RootCA.cer
path: ONAP_RootCA.cer
- name: {{ include "common.fullname" . }}-blueprints