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 serviceName: {{ include "common.servicename" . }}
25 replicas: {{ index .Values.replicaCount }}
26 selector: {{- include "common.selectors" . | nindent 4 }}
29 labels: {{- include "common.labels" . | nindent 8 }}
32 - name: "{{ include "common.namespace" . }}-docker-registry-key"
34 - name: {{ include "common.name" . }}-bootstrap-config
35 image: {{ include "repositoryGenerator.image.envsubst" . }}
36 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
45 envsubst <${PFILE} >/config/${PFILE}
46 chmod o+w /config/${PFILE}
48 cat /config/application.yaml
50 - name: A1CONTROLLER_USER
51 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "controller-secret" "key" "login") | indent 10 }}
52 - name: A1CONTROLLER_PASSWORD
53 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "controller-secret" "key" "password") | indent 10 }}
55 - mountPath: /config-input
56 name: {{ include "common.fullname" . }}-policy-conf-input
60 - name: {{ include "common.name" . }}-update-config
61 image: {{ include "repositoryGenerator.image.envsubst" . }}
62 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
64 runAsGroup: {{ .Values.groupID }}
65 runAsUser: {{ .Values.userID }}
70 - /tmp/scripts/daemon.sh
72 - name: A1CONTROLLER_USER
73 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "controller-secret" "key" "login") | indent 10 }}
74 - name: A1CONTROLLER_PASSWORD
75 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "controller-secret" "key" "password") | indent 10 }}
77 - mountPath: /tmp/scripts
78 name: {{ include "common.fullname" . }}-envsubst-scripts
79 - mountPath: /config-input
80 name: {{ include "common.fullname" . }}-policy-conf-input
83 - name: {{ include "common.name" . }}
84 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
85 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
86 ports: {{ include "common.containerPorts" . | nindent 10 }}
89 port: {{ .Values.readiness.port }}
90 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
91 periodSeconds: {{ .Values.liveness.periodSeconds }}
95 port: {{ .Values.liveness.port }}
97 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
98 periodSeconds: {{ .Values.liveness.periodSeconds }}
101 mountPath: /opt/app/policy-agent/data/application_configuration.json
102 subPath: application_configuration.json
104 mountPath: /opt/app/policy-agent/config/application.yaml
105 subPath: application.yaml
106 - name: {{ include "common.fullname" . }}
107 mountPath: "/var/policy-management-service/database"
108 resources: {{ include "common.resources" . | nindent 10 }}
109 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
111 - name: {{ include "common.fullname" . }}-policy-conf-input
113 name: {{ include "common.fullname" . }}-policy-conf
114 - name: {{ include "common.fullname" . }}-envsubst-scripts
116 name: {{ include "common.fullname" . }}-envsubst-scripts
121 {{- if not .Values.persistence.enabled }}
122 - name: {{ include "common.fullname" . }}
125 volumeClaimTemplates:
126 - {{include "common.PVCTemplate" . | indent 6 | trim }}