aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/policy/components/policy-opa-pdp/templates/deployment.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/policy/components/policy-opa-pdp/templates/deployment.yaml')
-rwxr-xr-xkubernetes/policy/components/policy-opa-pdp/templates/deployment.yaml42
1 files changed, 7 insertions, 35 deletions
diff --git a/kubernetes/policy/components/policy-opa-pdp/templates/deployment.yaml b/kubernetes/policy/components/policy-opa-pdp/templates/deployment.yaml
index 6c25bac01c..90ff759bb8 100755
--- a/kubernetes/policy/components/policy-opa-pdp/templates/deployment.yaml
+++ b/kubernetes/policy/components/policy-opa-pdp/templates/deployment.yaml
@@ -29,29 +29,7 @@ spec:
spec:
{{ include "common.podSecurityContext" . | indent 6 | trim }}
initContainers:
- - command:
- - /bin/sh
- args:
- - -c
- - |
- echo "*** set right permissions to the different folders"
- chown -R {{ .Values.permissions.uid }}:{{ .Values.permissions.gid }} /var/log;
- chmod -R 755 /var/log
- chown -R {{ .Values.permissions.uid }}:{{ .Values.permissions.gid }} /opt/;
- chmod -R 755 /opt/*
- tar -xvf /tmp/policies/policy-data.tar.gz -C /opt/
- image: {{ include "repositoryGenerator.image.busybox" . }}
- imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
- {{ include "common.containerSecurityContext" . | indent 8 | trim }}
- name: {{ include "common.name" . }}-readiness
- volumeMounts:
- - name: logs
- mountPath: /var/log
- - name: tmp-policies-data
- mountPath: /tmp/policies
- - name : opa-policies-data
- mountPath: /opt/
-
+ {{ include "common.readinessCheck.waitFor" . | nindent 8 }}
containers:
- name: {{ include "common.name" . }}
{{ include "common.containerSecurityContext" . | indent 10 | trim }}
@@ -65,8 +43,12 @@ spec:
value: "{{ .Values.kafka.useSASL }}"
- name: KAFKA_URL
value: {{ include "common.release" . }}-{{ .Values.global.kafkaBootstrap }}
+ - name: POD_UID
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.uid
- name: GROUPID
- value: "{{ .Values.kafka.groupid }}"
+ value: "{{ .Values.groupIdPrefix }}-$(POD_UID)"
- name: LOG_LEVEL
value: "{{ .Values.log.loglevel }}"
- name: PAP_TOPIC
@@ -97,15 +79,12 @@ spec:
initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.readiness.periodSeconds }}
volumeMounts:
-
- - name: opa-policies-data
- mountPath: /opt
- name: opa-config
mountPath: /app/config
- name: opa-bundles
mountPath: /app/bundles
- name: logs
- mountPath: /var/log
+ mountPath: /var/logs
resources: {{ include "common.resources" . | nindent 12 }}
{{- if .Values.nodeSelector }}
nodeSelector:
@@ -117,13 +96,6 @@ spec:
{{- end }}
serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
volumes:
- - name: tmp-policies-data
- configMap:
- name: {{ include "common.fullname" . }}-configmap-policies-data
- defaultMode: 0755
- - name: opa-policies-data
- persistentVolumeClaim:
- claimName: {{ include "common.fullname" . }}-policies-data
- name: opa-config
configMap:
name: {{ include "common.fullname" . }}-configmap-config