summaryrefslogtreecommitdiffstats
path: root/kubernetes/policy/charts/pap/templates/deployment.yaml
diff options
context:
space:
mode:
authorBruno Sakoto <bruno.sakoto@bell.ca>2020-05-22 16:56:35 -0400
committerBruno Sakoto <bruno.sakoto@bell.ca>2020-05-27 13:14:00 -0400
commit0644c262f7dc2b313b87fdb84a4d796db2b8ccf5 (patch)
treec0b4133b35615ca07f772229390cac6d0963d7d4 /kubernetes/policy/charts/pap/templates/deployment.yaml
parent100f28ca0b9406b7007f03cb182075ab797e04cb (diff)
Refactor Policy PAP for common service template
Issue-ID: POLICY-2514 Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca> Change-Id: I3021081f3e9d1a3cec079fdaf4595689d25571fb
Diffstat (limited to 'kubernetes/policy/charts/pap/templates/deployment.yaml')
-rw-r--r--kubernetes/policy/charts/pap/templates/deployment.yaml22
1 files changed, 6 insertions, 16 deletions
diff --git a/kubernetes/policy/charts/pap/templates/deployment.yaml b/kubernetes/policy/charts/pap/templates/deployment.yaml
index 39ac8a81ec..e8c96cee77 100644
--- a/kubernetes/policy/charts/pap/templates/deployment.yaml
+++ b/kubernetes/policy/charts/pap/templates/deployment.yaml
@@ -1,20 +1,11 @@
apiVersion: extensions/v1beta1
kind: Deployment
-metadata:
- name: {{ include "common.fullname" . }}
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
spec:
+ selector: {{- include "common.selectors" . | nindent 4 }}
replicas: {{ .Values.replicaCount }}
template:
- metadata:
- labels:
- app: {{ include "common.name" . }}
- release: {{ include "common.release" . }}
+ metadata: {{- include "common.templateMetadata" . | nindent 6 }}
spec:
initContainers:
- command:
@@ -68,20 +59,19 @@ spec:
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
command: ["/opt/app/policy/pap/bin/policy-pap.sh"]
args: ["/opt/app/policy/pap/etc/mounted/config.json"]
- ports:
- - containerPort: {{ .Values.service.internalPort }}
+ ports: {{ include "common.containerPorts" . | nindent 12 }}
# disable liveness probe when breakpoints set in debugger
# so K8s doesn't restart unresponsive container
{{- if eq .Values.liveness.enabled true }}
livenessProbe:
tcpSocket:
- port: {{ .Values.service.internalPort }}
+ port: {{ .Values.liveness.port }}
initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.liveness.periodSeconds }}
{{ end -}}
readinessProbe:
tcpSocket:
- port: {{ .Values.service.internalPort }}
+ port: {{ .Values.readiness.port }}
initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.readiness.periodSeconds }}
volumeMounts: