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
52 - name: {{ include "common.name" . }}
53 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
54 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
60 echo "*** actual launch of AAI Sparky BE"
61 /opt/app/sparky/bin/start.sh
63 - mountPath: /etc/localtime
66 - mountPath: {{ .Values.log.path }}
68 - mountPath: /opt/app/sparky/config/application.properties
70 subPath: application.properties
71 - mountPath: /opt/app/sparky/config/application-resources.properties
73 subPath: application-resources.properties
74 - mountPath: /opt/app/sparky/config/application-ssl.properties
76 subPath: application-ssl.properties
77 - mountPath: /opt/app/sparky/config/application-oxm-default.properties
79 subPath: application-oxm-default.properties
80 - mountPath: /opt/app/sparky/config/application-oxm-override.properties
82 subPath: application-oxm-override.properties
83 - mountPath: /opt/app/sparky/config/application-oxm-schema-prod.properties
85 subPath: application-oxm-schema-prod.properties
86 - mountPath: /opt/app/sparky/config/roles.config
89 - mountPath: /opt/app/sparky/config/users.config
92 - mountPath: /opt/app/sparky/config/logging/logback.xml
95 ports: {{ include "common.containerPorts" . | nindent 10 }}
96 # disable liveness probe when breakpoints set in debugger
97 # so K8s doesn't restart unresponsive container
98 {{- if eq .Values.liveness.enabled true }}
101 port: {{ .Values.service.internalPort }}
102 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
103 periodSeconds: {{ .Values.liveness.periodSeconds }}
107 port: {{ .Values.service.internalPort }}
108 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
109 periodSeconds: {{ .Values.readiness.periodSeconds }}
110 resources: {{ include "common.resources" . | nindent 10 }}
111 {{- if .Values.nodeSelector }}
113 {{ toYaml .Values.nodeSelector | indent 8 }}
115 {{- if .Values.affinity }}
117 {{ toYaml .Values.affinity | indent 8 }}
120 # side car containers
121 {{ include "common.log.sidecar" . | nindent 6 }}
122 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
129 name: {{ include "common.fullname" . }}
132 {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
135 restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
137 - name: "{{ include "common.namespace" . }}-docker-registry-key"