| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: {{ .Values.app.name }}
- labels:
- app: {{ .Values.app.name }}
- spec:
- replicas: {{ .Values.app.replicaCount }}
- selector:
- matchLabels:
- app: {{ .Values.app.name }}
- template:
- metadata:
- labels:
- app: {{ .Values.app.name }}
- {{- with .Values.podAnnotations }}
- annotations:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- spec:
- {{- with .Values.securityContext }}
- securityContext:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- containers:
- - name: {{ .Values.app.name }}
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
- imagePullPolicy: {{ .Values.image.pullPolicy }}
- ports:
- - name: http
- containerPort: {{ .Values.service.targetPort }}
- protocol: TCP
- volumeMounts:
- - name: config-volume
- mountPath: /etc/config
- readOnly: true
- env:
- - name: JAVA_OPTS
- value: "-Xmx512m -Xms256m"
- {{- with .Values.resources }}
- resources:
- {{- toYaml . | nindent 12 }}
- {{- end }}
- livenessProbe:
- httpGet:
- path: /actuator/health
- port: http
- initialDelaySeconds: 30
- periodSeconds: 10
- readinessProbe:
- httpGet:
- path: /actuator/health
- port: http
- initialDelaySeconds: 5
- periodSeconds: 5
- volumes:
- - name: config-volume
- configMap:
- name: {{ .Values.app.name }}-config
- {{- with .Values.nodeSelector }}
- nodeSelector:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- {{- with .Values.affinity }}
- affinity:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- {{- with .Values.tolerations }}
- tolerations:
- {{- toYaml . | nindent 8 }}
- {{- end }}
|