Code Review
/
oom.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "[DCAEGEN2] Update PM-Mapper image to 1.7.1"
[oom.git]
/
kubernetes
/
aai
/
components
/
aai-graphadmin
/
templates
/
deployment.yaml
diff --git
a/kubernetes/aai/components/aai-graphadmin/templates/deployment.yaml
b/kubernetes/aai/components/aai-graphadmin/templates/deployment.yaml
index
5e6f2bc
..
6102900
100644
(file)
--- a/
kubernetes/aai/components/aai-graphadmin/templates/deployment.yaml
+++ b/
kubernetes/aai/components/aai-graphadmin/templates/deployment.yaml
@@
-32,6
+32,12
@@
metadata:
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
+ minReadySeconds: {{ .Values.minReadySeconds }}
+ strategy:
+ type: {{ .Values.updateStrategy.type }}
+ rollingUpdate:
+ maxUnavailable: {{ .Values.updateStrategy.maxUnavailable }}
+ maxSurge: {{ .Values.updateStrategy.maxSurge }}
selector:
matchLabels:
app: {{ include "common.name" . }}
selector:
matchLabels:
app: {{ include "common.name" . }}
@@
-45,6
+51,7
@@
spec:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
spec:
hostname: aai-graphadmin
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
spec:
hostname: aai-graphadmin
+ terminationGracePeriodSeconds: {{ .Values.service.terminationGracePeriodSeconds }}
{{ if .Values.global.initContainers.enabled }}
initContainers:
- command:
{{ if .Values.global.initContainers.enabled }}
initContainers:
- command:
@@
-89,6
+96,10
@@
spec:
value: {{ .Values.global.config.userId | quote }}
- name: LOCAL_GROUP_ID
value: {{ .Values.global.config.groupId | quote }}
value: {{ .Values.global.config.userId | quote }}
- name: LOCAL_GROUP_ID
value: {{ .Values.global.config.groupId | quote }}
+ - name: INTERNAL_PORT_1
+ value: {{ .Values.service.internalPort | quote }}
+ - name: INTERNAL_PORT_2
+ value: {{ .Values.service.internalPort2 | quote }}
volumeMounts:
- mountPath: /etc/localtime
name: localtime
volumeMounts:
- mountPath: /etc/localtime
name: localtime
@@
-125,6
+136,18
@@
spec:
ports:
- containerPort: {{ .Values.service.internalPort }}
- containerPort: {{ .Values.service.internalPort2 }}
ports:
- containerPort: {{ .Values.service.internalPort }}
- containerPort: {{ .Values.service.internalPort2 }}
+ lifecycle:
+ # wait for active requests (long-running tasks) to be finished
+ # Before the SIGTERM is invoked, Kubernetes exposes a preStop hook in the Pod.
+ preStop:
+ exec:
+ command:
+ - sh
+ - -c
+ - |
+ while (netstat -an | grep ESTABLISHED | grep -e $INTERNAL_PORT_1 -e $INTERNAL_PORT_2)
+ do sleep 10
+ done
# disable liveness probe when breakpoints set in debugger
# so K8s doesn't restart unresponsive container
{{ if .Values.liveness.enabled }}
# disable liveness probe when breakpoints set in debugger
# so K8s doesn't restart unresponsive container
{{ if .Values.liveness.enabled }}
@@
-162,7
+185,7
@@
spec:
name: {{ include "common.fullname" . }}-logs
- mountPath: /usr/share/filebeat/data
name: {{ include "common.fullname" . }}-filebeat
name: {{ include "common.fullname" . }}-logs
- mountPath: /usr/share/filebeat/data
name: {{ include "common.fullname" . }}-filebeat
-
+ serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
volumes:
- name: localtime
hostPath:
volumes:
- name: localtime
hostPath:
@@
-187,4
+210,4
@@
spec:
{{ end }}
restartPolicy: {{ .Values.restartPolicy }}
imagePullSecrets:
{{ end }}
restartPolicy: {{ .Values.restartPolicy }}
imagePullSecrets:
- - name:
"{{ include "common.namespace" . }}-docker-registry-key"
+ - name:
{{ include "common.namespace" . }}-docker-registry-key