summaryrefslogtreecommitdiffstats
path: root/kubernetes/appc/charts/appc-cdt/templates/deployment.yaml
diff options
context:
space:
mode:
authorJerome Doucerain <jerome.doucerain@bell.ca>2018-03-29 14:14:50 +0000
committerGerrit Code Review <gerrit@onap.org>2018-03-29 14:14:50 +0000
commitc786a281b513f1cae7e6f8adbc1e0cb547aac75b (patch)
treee262bf1cbf7789f2a3c3f01cf4b702b39ed93c7c /kubernetes/appc/charts/appc-cdt/templates/deployment.yaml
parent805d2e6a29a1eab82d286ebbb5bbf3f2d6c1a517 (diff)
parent12b6158b39be5096ee80c0f449e44c84127e66ed (diff)
Merge "Add CDT to APPC chart"
Diffstat (limited to 'kubernetes/appc/charts/appc-cdt/templates/deployment.yaml')
-rw-r--r--kubernetes/appc/charts/appc-cdt/templates/deployment.yaml61
1 files changed, 61 insertions, 0 deletions
diff --git a/kubernetes/appc/charts/appc-cdt/templates/deployment.yaml b/kubernetes/appc/charts/appc-cdt/templates/deployment.yaml
new file mode 100644
index 0000000000..a250699474
--- /dev/null
+++ b/kubernetes/appc/charts/appc-cdt/templates/deployment.yaml
@@ -0,0 +1,61 @@
+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: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+spec:
+ replicas: {{ .Values.replicaCount }}
+ template:
+ metadata:
+ labels:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
+ spec:
+ initContainers:
+ containers:
+ - name: {{ include "common.name" . }}
+ image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ ports:
+ - containerPort: {{ .Values.service.internalPort }}
+ name: {{ .Values.service.name }}
+ # 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 }}
+ initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.liveness.periodSeconds }}
+ {{ end -}}
+ readinessProbe:
+ tcpSocket:
+ port: {{ .Values.service.internalPort }}
+ initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.readiness.periodSeconds }}
+ env:
+ volumeMounts:
+ - mountPath: /etc/localtime
+ name: localtime
+ readOnly: true
+ resources:
+{{ toYaml .Values.resources | indent 12 }}
+ {{- if .Values.nodeSelector }}
+ nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 10 }}
+ {{- end -}}
+ {{- if .Values.affinity }}
+ affinity:
+{{ toYaml .Values.affinity | indent 10 }}
+ {{- end }}
+ volumes:
+ - name: localtime
+ hostPath:
+ path: /etc/localtime
+ imagePullSecrets:
+ - name: "{{ include "common.namespace" . }}-docker-registry-key"