2 ################################################################################
3 # Copyright (c) 2020 Nordix Foundation. #
4 # Copyright © 2020 Samsung Electronics, Modifications #
6 # Licensed under the Apache License, Version 2.0 (the "License"); #
7 # you may not use this file except in compliance with the License. #
8 # You may obtain a copy of the License at #
10 # http://www.apache.org/licenses/LICENSE-2.0 #
12 # Unless required by applicable law or agreed to in writing, software #
13 # distributed under the License is distributed on an "AS IS" BASIS, #
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
15 # See the License for the specific language governing permissions and #
16 # limitations under the License. #
17 ################################################################################
23 name: {{ include "common.fullname" . }}
24 namespace: {{ include "common.namespace" . }}
26 app: {{ include "common.name" . }}
27 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
28 release: "{{ include "common.release" . }}"
29 heritage: "{{ .Release.Service }}"
31 replicas: {{ index .Values.replicaCount }}
32 selector: {{- include "common.selectors" . | nindent 4 }}
35 labels: {{- include "common.labels" . | nindent 8 }}
37 initContainers: {{ include "common.certInitializer.initContainer" . | nindent 6 }}
38 - name: {{ include "common.name" . }}-bootstrap-config
39 image: {{ include "repositoryGenerator.image.envsubst" . }}
40 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
46 export $(cat {{ .Values.certInitializer.credsPath }}/mycreds.prop\
51 envsubst <${PFILE} >/config/${PFILE}
52 chmod o+w /config/${PFILE}
54 cat /config/application.yaml
56 - name: A1CONTROLLER_USER
57 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "controller-secret" "key" "login") | indent 10 }}
58 - name: A1CONTROLLER_PASSWORD
59 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "controller-secret" "key" "password") | indent 10 }}
60 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 8 }}
61 - mountPath: /config-input
62 name: {{ include "common.fullname" . }}-policy-conf-input
66 - name: {{ include "common.name" . }}-update-config
67 image: "{{ .Values.global.envsubstImage }}"
68 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
70 runAsGroup: {{ .Values.groupID }}
71 runAsUser: {{ .Values.userID }}
76 - /tmp/scripts/daemon.sh
78 - name: A1CONTROLLER_USER
79 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "controller-secret" "key" "login") | indent 10 }}
80 - name: A1CONTROLLER_PASSWORD
81 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "controller-secret" "key" "password") | indent 10 }}
83 - mountPath: /tmp/scripts
84 name: {{ include "common.fullname" . }}-envsubst-scripts
85 - mountPath: /config-input
86 name: {{ include "common.fullname" . }}-policy-conf-input
89 - name: {{ include "common.name" . }}
90 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
91 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
92 ports: {{ include "common.containerPorts" . | nindent 10 }}
95 port: {{ .Values.readiness.port }}
96 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
97 periodSeconds: {{ .Values.liveness.periodSeconds }}
101 port: {{ .Values.liveness.port }}
102 scheme: {{ if (include "common.needTLS" .) }}HTTPS{{ else }}HTTP{{ end }}
103 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
104 periodSeconds: {{ .Values.liveness.periodSeconds }}
105 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 8 }}
107 mountPath: /opt/app/policy-agent/data/application_configuration.json
108 subPath: application_configuration.json
110 mountPath: /opt/app/policy-agent/config/application.yaml
111 subPath: application.yaml
113 mountPath: "/var/policy-management-service/database"
114 resources: {{ include "common.resources" . | nindent 10 }}
115 volumes: {{ include "common.certInitializer.volumes" . | nindent 8 }}
116 - name: {{ include "common.fullname" . }}-policy-conf-input
118 name: {{ include "common.fullname" . }}-policy-conf
119 - name: {{ include "common.fullname" . }}-envsubst-scripts
121 name: {{ include "common.fullname" . }}-envsubst-scripts
127 persistentVolumeClaim:
128 claimName: {{ include "common.fullname" . }}