2 # ============LICENSE_START=======================================================
4 # ================================================================================
5 # Copyright © 2018 AT&T Intellectual Property. All rights reserved.
6 # ================================================================================
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.
18 # ============LICENSE_END=========================================================
19 apiVersion: extensions/v1beta1
22 name: {{ include "common.fullname" . }}
23 namespace: {{ include "common.namespace" . }}
25 app: {{ include "common.name" . }}
26 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
27 release: {{ .Release.Name }}
28 heritage: {{ .Release.Service }}
30 replicas: {{ .Values.replicaCount }}
33 app: {{ include "common.name" . }}
37 app: {{ include "common.name" . }}
38 release: {{ .Release.Name }}
39 name: {{ include "common.name" . }}
41 checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
43 hostname: aai-graphadmin
44 {{ if .Values.global.initContainers.enabled }}
47 {{ if .Values.global.jobs.migration.enabled }}
48 - /root/job_complete.py
51 - {{ .Release.Name }}-aai-graphadmin-migration
52 {{ else if .Values.global.jobs.createSchema.enabled }}
53 - /root/job_complete.py
56 - {{ .Release.Name }}-aai-graphadmin-create-db-schema
61 {{- if .Values.global.cassandra.localCluster }}
74 fieldPath: metadata.namespace
75 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
76 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
77 name: {{ include "common.name" . }}-readiness
80 - name: {{ include "common.name" . }}
81 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
82 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
85 value: {{ .Values.global.config.userId | quote }}
86 - name: LOCAL_GROUP_ID
87 value: {{ .Values.global.config.groupId | quote }}
89 - mountPath: /etc/localtime
92 - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/janusgraph-realtime.properties
93 name: {{ include "common.fullname" . }}-config
94 subPath: janusgraph-realtime.properties
95 - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/janusgraph-cached.properties
96 name: {{ include "common.fullname" . }}-config
97 subPath: janusgraph-cached.properties
98 - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/aaiconfig.properties
99 name: {{ include "common.fullname" . }}-config
100 subPath: aaiconfig.properties
101 - mountPath: /opt/aai/logroot/AAI-RES
102 name: {{ include "common.fullname" . }}-logs
103 - mountPath: /opt/app/aai-graphadmin/resources/logback.xml
104 name: {{ include "common.fullname" . }}-config
106 - mountPath: /opt/app/aai-graphadmin/resources/localhost-access-logback.xml
107 name: {{ include "common.fullname" . }}-config
108 subPath: localhost-access-logback.xml
109 - mountPath: /opt/app/aai-graphadmin/resources/etc/auth/realm.properties
110 name: {{ include "common.fullname" . }}-config
111 subPath: realm.properties
112 - mountPath: /opt/app/aai-graphadmin/resources/application.properties
113 name: {{ include "common.fullname" . }}-config
114 subPath: application.properties
116 {{ range $job := .Values.global.config.auth.files }}
117 - mountPath: /opt/app/aai-graphadmin/resources/etc/auth/{{ . }}
118 name: {{ include "common.fullname" $global }}-auth-truststore-sec
122 - containerPort: {{ .Values.service.internalPort }}
123 - containerPort: {{ .Values.service.internalPort2 }}
124 # disable liveness probe when breakpoints set in debugger
125 # so K8s doesn't restart unresponsive container
126 {{ if .Values.liveness.enabled }}
129 port: {{ .Values.service.internalPort }}
130 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
131 periodSeconds: {{ .Values.liveness.periodSeconds }}
135 port: {{ .Values.service.internalPort }}
136 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
137 periodSeconds: {{ .Values.readiness.periodSeconds }}
139 {{ include "common.resources" . }}
140 {{- if .Values.nodeSelector }}
142 {{ toYaml .Values.nodeSelector | indent 8 }}
144 {{- if .Values.affinity }}
146 {{ toYaml .Values.affinity | indent 8 }}
149 # side car containers
150 - name: filebeat-onap
151 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
152 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
154 - mountPath: /usr/share/filebeat/filebeat.yml
155 subPath: filebeat.yml
157 - mountPath: /var/log/onap
158 name: {{ include "common.fullname" . }}-logs
159 - mountPath: /usr/share/filebeat/data
160 name: {{ include "common.fullname" . }}-filebeat
166 - name: filebeat-conf
169 - name: {{ include "common.fullname" . }}-logs
171 - name: {{ include "common.fullname" . }}-filebeat
173 - name: {{ include "common.fullname" . }}-config
175 name: {{ include "common.fullname" . }}-configmap
176 - name: {{ include "common.fullname" . }}-auth-truststore-sec
178 secretName: aai-common-truststore
180 {{ range $job := .Values.global.config.auth.files }}
184 restartPolicy: {{ .Values.restartPolicy }}
186 - name: "{{ include "common.namespace" . }}-docker-registry-key"