kj | 9bf2731 | 2018-03-19 15:07:44 +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 | name: {{ include "common.name" . }} |
| 19 | spec: |
| 20 | hostname: aai-hbase |
| 21 | containers: |
| 22 | - name: {{ include "common.name" . }} |
| 23 | image: {{ .Values.global.dockerhubRepository | default .Values.dockerhubRepository }}/{{ .Values.image }} |
| 24 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 25 | ports: |
| 26 | - containerPort: {{ .Values.service.internalPort }} |
| 27 | - containerPort: {{ .Values.service.internalPort2 }} |
| 28 | - containerPort: {{ .Values.service.internalPort3 }} |
| 29 | - containerPort: {{ .Values.service.internalPort4 }} |
| 30 | - containerPort: {{ .Values.service.internalPort5 }} |
| 31 | - containerPort: {{ .Values.service.internalPort6 }} |
| 32 | - containerPort: {{ .Values.service.internalPort7 }} |
| 33 | # disable liveness probe when breakpoints set in debugger |
| 34 | # so K8s doesn't restart unresponsive container |
| 35 | {{- if eq .Values.liveness.enabled true }} |
| 36 | livenessProbe: |
| 37 | tcpSocket: |
| 38 | port: {{ .Values.service.internalPort }} |
| 39 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 40 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 41 | {{ end -}} |
| 42 | readinessProbe: |
| 43 | tcpSocket: |
| 44 | port: {{ .Values.service.internalPort }} |
| 45 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 46 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 47 | volumeMounts: |
| 48 | - name: hbase-data |
| 49 | mountPath: /tmp |
| 50 | - name: localtime |
| 51 | mountPath: /etc/localtime |
| 52 | readOnly: true |
| 53 | resources: |
| 54 | {{ toYaml .Values.resources | indent 10 }} |
| 55 | {{- if .Values.nodeSelector }} |
| 56 | nodeSelector: |
| 57 | {{ toYaml .Values.nodeSelector | indent 8 }} |
| 58 | {{- end -}} |
| 59 | {{- if .Values.affinity }} |
| 60 | affinity: |
| 61 | {{ toYaml .Values.affinity | indent 8 }} |
| 62 | {{- end }} |
| 63 | |
| 64 | volumes: |
| 65 | - name: hbase-data |
| 66 | hostPath: |
BorislavG | 56857c4 | 2018-05-03 14:29:51 +0000 | [diff] [blame] | 67 | path: {{ .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }} |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 68 | - name: localtime |
| 69 | hostPath: |
| 70 | path: /etc/localtime |
| 71 | imagePullSecrets: |
| 72 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |