apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "layer3_research_manager.fullname" . }} namespace: {{ .Release.Namespace }} labels: {{ include "layer3_research_manager.labels" . | indent 4 }} spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: {{ include "layer3_research_manager.labels" . | indent 6 }} template: metadata: labels: {{ include "layer3_research_manager.labels" . | indent 8 }} spec: initContainers: - name: deploy image: redis command: [ "sh" ] args: [ "-c", 'while [ "$(redis-cli -h $REDIS_PORT_6379_TCP_ADDR ping)" != "PONG" ]; do sleep 2; done' ] {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} containers: - name: {{ .Chart.Name }} image: {{ template "layer3_research_manager.image" . }} imagePullPolicy: {{ .Values.image.pullPolicy }} envFrom: - configMapRef: name: proxy - configMapRef: name: globalenvvar - configMapRef: name: layer3researchconfig ports: - name: http containerPort: 8080 protocol: TCP livenessProbe: httpGet: path: /metrics port: http periodSeconds: 10 readinessProbe: httpGet: path: /metrics port: http periodSeconds: 10 resources: {{- toYaml .Values.resources | nindent 12 }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }}