vaibhav_16dec | d3bc08f | 2018-03-15 07:05:10 +0000 | [diff] [blame] | 1 | apiVersion: extensions/v1beta1 |
| 2 | kind: Deployment |
| 3 | metadata: |
| 4 | name: {{ include "common.name" . }} |
| 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.robotReplicas }} |
| 13 | template: |
| 14 | metadata: |
| 15 | labels: |
| 16 | app: {{ include "common.name" . }} |
| 17 | release: {{ .Release.Name }} |
| 18 | spec: |
| 19 | containers: |
| 20 | - name: {{ .Chart.Name }} |
| 21 | image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" |
| 22 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 23 | ports: |
| 24 | - containerPort: {{ .Values.service.internalPort }} |
| 25 | # disable liveness probe when breakpoints set in debugger |
| 26 | # so K8s doesn't restart unresponsive container |
| 27 | {{- if eq .Values.liveness.enabled true }} |
| 28 | livenessProbe: |
| 29 | tcpSocket: |
| 30 | port: {{ .Values.service.internalPort }} |
| 31 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 32 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 33 | {{ end -}} |
| 34 | readinessProbe: |
| 35 | tcpSocket: |
| 36 | port: {{ .Values.service.internalPort }} |
| 37 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 38 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 39 | volumeMounts: |
| 40 | - name: localtime |
| 41 | mountPath: /etc/localtime |
| 42 | readOnly: true |
| 43 | - name: robot-eteshare |
| 44 | mountPath: /share/config |
| 45 | - name: robot-resources |
| 46 | mountPath: /var/opt/OpenECOMP_ETE/robot/resources/asdc_interface.robot |
| 47 | subPath: asdc_interface.robot |
| 48 | - name: robot-resources |
| 49 | mountPath: /var/opt/OpenECOMP_ETE/robot/resources/policy_interface.robot |
| 50 | subPath: policy_interface.robot |
| 51 | - name: robot-resources |
| 52 | mountPath: /var/opt/OpenECOMP_ETE/robot/resources/sdngc_interface.robot |
| 53 | subPath: sdngc_interface.robot |
| 54 | - name: robot-lighttpd-authorization |
| 55 | mountPath: /etc/lighttpd/authorization |
| 56 | subPath: authorization |
| 57 | resources: |
| 58 | {{ toYaml .Values.resources | indent 12 }} |
| 59 | {{- if .Values.nodeSelector }} |
| 60 | nodeSelector: |
| 61 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 62 | {{- end -}} |
| 63 | {{- if .Values.affinity }} |
| 64 | affinity: |
| 65 | {{ toYaml .Values.affinity | indent 10 }} |
| 66 | {{- end }} |
| 67 | volumes: |
| 68 | - name: localtime |
| 69 | hostPath: |
| 70 | path: /etc/localtime |
| 71 | - name: robot-eteshare |
| 72 | configMap: |
| 73 | name: {{ include "common.name" . }}-eteshare-configmap |
| 74 | defaultMode: 0755 |
| 75 | - name: robot-resources |
| 76 | configMap: |
| 77 | name: {{ include "common.name" . }}-resources-configmap |
| 78 | - name: robot-lighttpd-authorization |
| 79 | configMap: |
| 80 | name: {{ include "common.name" . }}-lighttpd-authorization-configmap |
| 81 | imagePullSecrets: |
| 82 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |