BorislavG | 0433c91 | 2018-03-21 18:35:30 +0200 | [diff] [blame] | 1 | apiVersion: extensions/v1beta1 |
| 2 | kind: Deployment |
| 3 | metadata: |
| 4 | name: {{ include "common.fullname" . }} |
| 5 | namespace: {{ include "common.namespace" . }} |
| 6 | labels: |
| 7 | app: {{ include "common.name" . }} |
| 8 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
| 9 | release: {{ .Release.Name }} |
| 10 | heritage: {{ .Release.Service }} |
| 11 | spec: |
| 12 | replicas: {{ .Values.replicaCount }} |
| 13 | template: |
| 14 | metadata: |
| 15 | labels: |
| 16 | app: {{ include "common.name" . }} |
| 17 | release: {{ .Release.Name }} |
| 18 | spec: |
| 19 | initContainers: |
| 20 | - command: |
| 21 | - /root/ready.py |
| 22 | args: |
| 23 | - --container-name |
| 24 | - msb-discovery |
| 25 | env: |
| 26 | - name: NAMESPACE |
| 27 | valueFrom: |
| 28 | fieldRef: |
| 29 | apiVersion: v1 |
| 30 | fieldPath: metadata.namespace |
| 31 | image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" |
| 32 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 33 | name: {{ include "common.name" . }}-readiness |
| 34 | containers: |
| 35 | - name: {{ include "common.name" . }} |
BorislavG | df11cd5 | 2018-05-06 12:55:20 +0000 | [diff] [blame] | 36 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
BorislavG | 0433c91 | 2018-03-21 18:35:30 +0200 | [diff] [blame] | 37 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 38 | env: |
| 39 | - name: KUBE_MASTER_URL |
| 40 | value: {{ .Values.config.kubeMasterUrl }} |
| 41 | - name: MSB_URL |
| 42 | value: {{tpl $.Values.config.discoveryUrl .}} |
| 43 | volumeMounts: |
| 44 | - mountPath: /etc/localtime |
| 45 | name: localtime |
| 46 | readOnly: true |
| 47 | resources: |
| 48 | {{ toYaml .Values.resources | indent 12 }} |
| 49 | {{- if .Values.nodeSelector }} |
| 50 | nodeSelector: |
| 51 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 52 | {{- end -}} |
| 53 | {{- if .Values.affinity }} |
| 54 | affinity: |
| 55 | {{ toYaml .Values.affinity | indent 10 }} |
| 56 | {{- end }} |
| 57 | volumes: |
| 58 | - name: localtime |
| 59 | hostPath: |
| 60 | path: /etc/localtime |
| 61 | imagePullSecrets: |
| 62 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |