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 ################################################################################
22 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
24 replicas: {{ index .Values.replicaCount }}
25 selector: {{- include "common.selectors" . | nindent 4 }}
28 labels: {{- include "common.labels" . | nindent 8 }}
31 - name: {{ include "common.name" . }}-bootstrap-config
32 image: {{ include "repositoryGenerator.image.envsubst" . }}
33 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
38 - "cd /config-input && for PFILE in `ls -1`; do envsubst <${PFILE} >/config/${PFILE}; chmod o+w /config/${PFILE}; done"
40 - name: A1CONTROLLER_USER
41 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "controller-secret" "key" "login") | indent 10 }}
42 - name: A1CONTROLLER_PASSWORD
43 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "controller-secret" "key" "password") | indent 10 }}
45 - mountPath: /config-input
46 name: {{ include "common.fullname" . }}-policy-conf-input
50 - name: {{ include "common.name" . }}-update-config
51 image: "{{ .Values.global.envsubstImage }}"
52 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
54 runAsGroup: {{ .Values.groupID }}
55 runAsUser: {{ .Values.userID }}
60 - /tmp/scripts/daemon.sh
62 - name: A1CONTROLLER_USER
63 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "controller-secret" "key" "login") | indent 10 }}
64 - name: A1CONTROLLER_PASSWORD
65 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "controller-secret" "key" "password") | indent 10 }}
67 - mountPath: /tmp/scripts
68 name: {{ include "common.fullname" . }}-envsubst-scripts
69 - mountPath: /config-input
70 name: {{ include "common.fullname" . }}-policy-conf-input
73 - name: {{ include "common.name" . }}
74 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
75 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
76 ports: {{ include "common.containerPorts" . | nindent 10 }}
79 port: {{ .Values.readiness.port }}
80 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
81 periodSeconds: {{ .Values.liveness.periodSeconds }}
85 port: {{ .Values.liveness.port }}
86 scheme: {{ if (include "common.needTLS" .) }}HTTPS{{ else }}HTTP{{ end }}
87 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
88 periodSeconds: {{ .Values.liveness.periodSeconds }}
91 mountPath: /opt/app/policy-agent/data
92 resources: {{ include "common.resources" . | nindent 10 }}
94 - name: {{ include "common.fullname" . }}-policy-conf-input
96 name: {{ include "common.fullname" . }}-policy-conf
98 - name: {{ include "common.fullname" . }}-envsubst-scripts
100 name: {{ include "common.fullname" . }}-envsubst-scripts