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: {{ .Values.log.path }}
72 - mountPath: /opt/app/sparky/config/application.properties
74 subPath: application.properties
75 - mountPath: /opt/app/sparky/config/application-resources.properties
77 subPath: application-resources.properties
78 - mountPath: /opt/app/sparky/config/application-ssl.properties
80 subPath: application-ssl.properties
81 - mountPath: /opt/app/sparky/config/application-oxm-default.properties
83 subPath: application-oxm-default.properties
84 - mountPath: /opt/app/sparky/config/application-oxm-override.properties
86 subPath: application-oxm-override.properties
87 - mountPath: /opt/app/sparky/config/application-oxm-schema-prod.properties
89 subPath: application-oxm-schema-prod.properties
90 - mountPath: /opt/app/sparky/config/roles.config
93 - mountPath: /opt/app/sparky/config/users.config
96 - mountPath: /opt/app/sparky/config/logging/logback.xml
99 ports: {{ include "common.containerPorts" . | nindent 10 }}
100 # disable liveness probe when breakpoints set in debugger
101 # so K8s doesn't restart unresponsive container
102 {{- if eq .Values.liveness.enabled true }}
105 port: {{ .Values.service.internalPort }}
106 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
107 periodSeconds: {{ .Values.liveness.periodSeconds }}
111 port: {{ .Values.service.internalPort }}
112 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
113 periodSeconds: {{ .Values.readiness.periodSeconds }}
114 resources: {{ include "common.resources" . | nindent 10 }}
115 {{- if .Values.nodeSelector }}
117 {{ toYaml .Values.nodeSelector | indent 8 }}
119 {{- if .Values.affinity }}
121 {{ toYaml .Values.affinity | indent 8 }}
124 # side car containers
125 {{ include "common.log.sidecar" . | nindent 6 }}
126 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
130 name: {{ include "common.fullname" . }}
133 {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
136 restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
137 {{- include "common.imagePullSecrets" . | nindent 6 }}