2 # Copyright (c) 2017 Amdocs, Bell Canada
3 # Modifications Copyright (c) 2018 AT&T
4 # Modifications Copyright (c) 2020 Nokia
5 # Modifications Copyright © 2023 Nordix Foundation
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
22 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
24 selector: {{- include "common.selectors" . | nindent 4 }}
25 replicas: {{ .Values.replicaCount }}
27 type: {{ .Values.updateStrategy.type }}
28 {{- if (eq "RollingUpdate" .Values.updateStrategy.type) }}
30 maxUnavailable: {{ .Values.updateStrategy.maxUnavailable }}
31 maxSurge: {{ .Values.updateStrategy.maxSurge }}
34 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
47 fieldPath: metadata.namespace
48 image: {{ include "repositoryGenerator.image.readiness" . }}
49 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
50 name: {{ include "common.name" . }}-readiness
59 - name: {{ include "common.name" . }}
60 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
61 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
67 echo "*** actual launch of AAI Sparky BE"
68 /opt/app/sparky/bin/start.sh
70 - mountPath: /etc/localtime
73 - mountPath: {{ .Values.log.path }}
75 - mountPath: /opt/app/sparky/config/application.properties
77 subPath: application.properties
78 - mountPath: /opt/app/sparky/config/application-resources.properties
80 subPath: application-resources.properties
81 - mountPath: /opt/app/sparky/config/application-ssl.properties
83 subPath: application-ssl.properties
84 - mountPath: /opt/app/sparky/config/application-oxm-default.properties
86 subPath: application-oxm-default.properties
87 - mountPath: /opt/app/sparky/config/application-oxm-override.properties
89 subPath: application-oxm-override.properties
90 - mountPath: /opt/app/sparky/config/application-oxm-schema-prod.properties
92 subPath: application-oxm-schema-prod.properties
93 - mountPath: /opt/app/sparky/config/roles.config
96 - mountPath: /opt/app/sparky/config/users.config
99 - mountPath: /opt/app/sparky/config/logging/logback.xml
102 ports: {{ include "common.containerPorts" . | nindent 10 }}
103 # disable liveness probe when breakpoints set in debugger
104 # so K8s doesn't restart unresponsive container
105 {{- if eq .Values.liveness.enabled true }}
108 port: {{ .Values.service.internalPort }}
109 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
110 periodSeconds: {{ .Values.liveness.periodSeconds }}
114 port: {{ .Values.service.internalPort }}
115 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
116 periodSeconds: {{ .Values.readiness.periodSeconds }}
117 resources: {{ include "common.resources" . | nindent 10 }}
118 {{- if .Values.nodeSelector }}
120 {{ toYaml .Values.nodeSelector | indent 8 }}
122 {{- if .Values.affinity }}
124 {{ toYaml .Values.affinity | indent 8 }}
127 # side car containers
128 {{ include "common.log.sidecar" . | nindent 6 }}
129 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
136 name: {{ include "common.fullname" . }}
139 {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
142 restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
144 - name: "{{ include "common.namespace" . }}-docker-registry-key"