You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
2.3 KiB
YAML

apiVersion: {{ include "app.deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ .Release.Name }}
labels:
{{ include "service.labels.standard" . | indent 4 }}
{{ include "service.logging.deployment.label" . | indent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
#minReadySeconds: 20
selector:
matchLabels:
{{ include "service.labels.standard" . | indent 6 }}
template:
metadata:
labels:
{{ include "service.labels.standard" . | indent 8 }}
{{ include "service.microservice.labels" . | indent 8 }}
SERVICE_CODE: {{ .Chart.Name | quote }}
annotations:
{{ include "service.monitoring.pod.annotations" . | indent 8 }}
spec:
containers:
- name: {{ .Release.Name }}
image: "{{ .Values.image.repository }}:{{ .Chart.Version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
{{- range $name, $value := .Values.env.open }}
{{- if not (empty $value) }}
- name: {{ $name | quote }}
value: {{ $value | quote }}
{{- end }}
{{- end }}
ports:
- name: http
containerPort: {{ .Values.service.port }}
protocol: TCP
# readinessProbe:
# httpGet:
# path: /health
# port: {{ .Values.deployment.managementPort }}
# scheme: HTTP
readinessProbe:
exec:
command:
- curl
- localhost:{{ .Values.deployment.managementPort }}/actuator/health
failureThreshold: 3
initialDelaySeconds: 120
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 10
lifecycle:
preStop:
exec:
command: [ "/bin/sh", "-c", "/scripts/eureka_shutdown.sh" ]
resources:
{{ toYaml .Values.resources | indent 12 }}
volumeMounts:
- mountPath: /Charts
name: data
{{- if not (empty .Values.persistence.subPath) }}
subPath: {{ .Values.persistence.subPath }}
{{- end }}
volumes:
- name: data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ .Values.persistence.existingClaim | default ( .Release.Name ) }}
{{- else }}
emptyDir: {}
{{- end }}