3 # ============LICENSE_START=======================================================
5 # ================================================================================
6 # Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
7 # Copyright (c) 2020 Nokia Intellectual Property. All rights reserved.
8 # Copyright (c) 2020-2021 Orange Intellectual Property. All rights reserved.
9 # Modifications Copyright © 2023 Nordix Foundation
10 # ================================================================================
11 # Licensed under the Apache License, Version 2.0 (the "License");
12 # you may not use this file except in compliance with the License.
13 # You may obtain a copy of the License at
15 # http://www.apache.org/licenses/LICENSE-2.0
17 # Unless required by applicable law or agreed to in writing, software
18 # distributed under the License is distributed on an "AS IS" BASIS,
19 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 # See the License for the specific language governing permissions and
21 # limitations under the License.
22 # ============LICENSE_END=========================================================
27 name: {{ include "common.fullname" . }}
28 namespace: {{ include "common.namespace" . }}
30 app: {{ include "common.name" . }}
31 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
32 release: {{ include "common.release" . }}
33 heritage: {{ .Release.Service }}
35 replicas: {{ .Values.replicaCount }}
36 minReadySeconds: {{ .Values.minReadySeconds }}
38 type: {{ .Values.updateStrategy.type }}
40 maxUnavailable: {{ .Values.updateStrategy.maxUnavailable }}
41 maxSurge: {{ .Values.updateStrategy.maxSurge }}
44 app: {{ include "common.name" . }}
48 app: {{ include "common.name" . }}
49 release: {{ include "common.release" . }}
50 name: {{ include "common.name" . }}
52 checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
54 hostname: aai-graphadmin
55 terminationGracePeriodSeconds: {{ .Values.service.terminationGracePeriodSeconds }}
56 {{ if .Values.global.initContainers.enabled }}
59 {{ if .Values.global.jobs.migration.enabled }}
63 - {{ include "common.release" . }}-aai-graphadmin-migration
64 {{ else if .Values.global.jobs.createSchema.enabled }}
68 - {{ include "common.release" . }}-aai-graphadmin-create-db-schema
73 {{- if .Values.global.cassandra.localCluster }}
86 fieldPath: metadata.namespace
87 image: {{ include "repositoryGenerator.image.readiness" . }}
88 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
89 name: {{ include "common.name" . }}-readiness
92 - name: {{ include "common.name" . }}
93 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
94 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
97 value: {{ .Values.securityContext.user_id | quote }}
98 - name: LOCAL_GROUP_ID
99 value: {{ .Values.securityContext.group_id | quote }}
100 - name: INTERNAL_PORT_1
101 value: {{ .Values.service.internalPort | quote }}
102 - name: INTERNAL_PORT_2
103 value: {{ .Values.service.internalPort2 | quote }}
104 - name: INTERNAL_PORT_3
105 value: {{ .Values.service.internalPort3 | quote }}
107 - mountPath: /etc/localtime
110 - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/janusgraph-realtime.properties
112 subPath: janusgraph-realtime.properties
113 - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/janusgraph-cached.properties
115 subPath: janusgraph-cached.properties
116 - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/aaiconfig.properties
118 subPath: aaiconfig.properties
119 - mountPath: /opt/aai/logroot/AAI-RES
121 - mountPath: /opt/app/aai-graphadmin/resources/logback.xml
124 - mountPath: /opt/app/aai-graphadmin/resources/localhost-access-logback.xml
126 subPath: localhost-access-logback.xml
127 - mountPath: /opt/app/aai-graphadmin/resources/etc/auth/realm.properties
129 subPath: realm.properties
130 - mountPath: /opt/app/aai-graphadmin/resources/application.properties
132 subPath: application.properties
134 - containerPort: {{ .Values.service.internalPort }}
135 - containerPort: {{ .Values.service.internalPort2 }}
136 - containerPort: {{ .Values.service.internalPort3 }}
138 # wait for active requests (long-running tasks) to be finished
139 # Before the SIGTERM is invoked, Kubernetes exposes a preStop hook in the Pod.
146 while (netstat -an | grep ESTABLISHED | grep -e $INTERNAL_PORT_1 -e $INTERNAL_PORT_2)
149 # disable liveness probe when breakpoints set in debugger
150 # so K8s doesn't restart unresponsive container
151 {{ if .Values.liveness.enabled }}
154 port: {{ .Values.service.internalPort }}
155 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
156 periodSeconds: {{ .Values.liveness.periodSeconds }}
160 port: {{ .Values.service.internalPort }}
161 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
162 periodSeconds: {{ .Values.readiness.periodSeconds }}
163 resources: {{ include "common.resources" . | nindent 10 }}
164 {{- if .Values.nodeSelector }}
166 {{ toYaml .Values.nodeSelector | indent 8 }}
168 {{- if .Values.affinity }}
170 {{ toYaml .Values.affinity | indent 8 }}
173 # side car containers
174 {{ include "common.log.sidecar" . | nindent 6 }}
175 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
182 {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
185 name: {{ include "common.fullname" . }}
188 name: {{ include "common.fullname" . }}-properties
189 restartPolicy: {{ .Values.restartPolicy }}
191 - name: {{ include "common.namespace" . }}-docker-registry-key