--- kind: Deployment apiVersion: apps/v1 metadata: name: usma-api namespace: {{ .Release.Namespace }} labels: {{ include "usma-api.labels" . | indent 4 }} app: usma-api versoin: {{ .Values.tag }} spec: replicas: 1 selector: matchLabels: {{ include "usma-api.matchLabels" . | indent 6 }} app: usma-api template: metadata: labels: {{ include "usma-api.labels" . | indent 8 }} app: usma-api version: {{ .Values.tag }} spec: nodeSelector: {{ toYaml $.Values.nodeSelector | indent 8 }} containers: - name: usma-api image: {{ .Values.global.hub }}/{{ .Values.image }}:{{ .Values.tag }} ports: - name: http containerPort: 8080 protocol: TCP livenessProbe: tcpSocket: port: 8080 initialDelaySeconds: 50 periodSeconds: 10 timeoutSeconds: 1 successThreshold: 1 envFrom: - configMapRef: name: usma volumeMounts: - name: localtime mountPath: /etc/localtime - name: log mountPath: "/app/log" resources: {{- toYaml .Values.resources | nindent 12 }} volumes: - name: localtime hostPath: path: /etc/localtime {{- if .Values.storageSpec.hostPath }} - name: log hostPath: path: /data/{{ .Release.Namespace }}/usma-api/log {{- else if .Values.storageSpec.emptyDir }} - name: log emptyDir: {} {{- else if .Values.storageSpec.volumeClaimTemplate }} volumeClaimTemplates: - metadata: name: "log" labels: {{ include "app.labels" . | indent 8 }} app: usma-api spec: {{ toYaml $.Values.storageSpec.volumeClaimTemplate.spec | indent 6 }} {{- end }}