90 lines
3.3 KiB
YAML
90 lines
3.3 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "pcp-dynamic-plan-service.fullname" . }}
|
|
labels:
|
|
{{- include "pcp-dynamic-plan-service.labels" . | nindent 4 }}
|
|
spec:
|
|
replicas: {{ .Values.replicaCount }}
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: {{ include "pcp-dynamic-plan-service.name" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{- include "pcp-dynamic-plan-service.labels" . | nindent 8 }}
|
|
{{- with .Values.podLabels }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.podAnnotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- with .Values.image.pullSecrets }}
|
|
imagePullSecrets:
|
|
{{- range . }}
|
|
- name: {{ . }}
|
|
{{- end }}
|
|
{{- end }}
|
|
containers:
|
|
- name: {{ include "pcp-dynamic-plan-service.name" . }}
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
ports:
|
|
- name: http
|
|
containerPort: {{ .Values.service.port }}
|
|
protocol: TCP
|
|
env:
|
|
- name: SPRING_PROFILES_ACTIVE
|
|
value: {{ .Values.app.profile | quote }}
|
|
- name: CONFIG_SERVER_URI
|
|
value: {{ .Values.app.configServerUri | quote }}
|
|
- name: SPRING_CLOUD_CONFIG_LABEL
|
|
value: {{ .Values.app.configLabel | quote }}
|
|
- name: CONFIG_SERVER_FAIL_FAST
|
|
value: {{ .Values.app.configServerFailFast | quote }}
|
|
{{- if .Values.app.adminClientUrl }}
|
|
- name: SPRING_BOOT_ADMIN_CLIENT_URL
|
|
value: {{ .Values.app.adminClientUrl | quote }}
|
|
{{- end }}
|
|
{{- $serviceBaseUrl := include "pcp-dynamic-plan-service.serviceBaseUrl" . }}
|
|
{{- if $serviceBaseUrl }}
|
|
- name: SPRING_BOOT_ADMIN_CLIENT_INSTANCE_SERVICE_BASE_URL
|
|
value: {{ $serviceBaseUrl | quote }}
|
|
{{- end }}
|
|
{{- if .Values.app.servicePath }}
|
|
- name: SPRING_BOOT_ADMIN_CLIENT_INSTANCE_SERVICE_PATH
|
|
value: {{ .Values.app.servicePath | quote }}
|
|
{{- end }}
|
|
{{- $managementBaseUrl := include "pcp-dynamic-plan-service.managementBaseUrl" . }}
|
|
{{- if $managementBaseUrl }}
|
|
- name: SPRING_BOOT_ADMIN_CLIENT_INSTANCE_MANAGEMENT_BASE_URL
|
|
value: {{ $managementBaseUrl | quote }}
|
|
{{- end }}
|
|
{{- $healthUrl := include "pcp-dynamic-plan-service.healthUrl" . }}
|
|
{{- if $healthUrl }}
|
|
- name: SPRING_BOOT_ADMIN_CLIENT_INSTANCE_HEALTH_URL
|
|
value: {{ $healthUrl | quote }}
|
|
{{- end }}
|
|
{{- with .Values.extraEnv }}
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /actuator/health
|
|
port: http
|
|
initialDelaySeconds: 20
|
|
periodSeconds: 15
|
|
timeoutSeconds: 5
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /actuator/health
|
|
port: http
|
|
initialDelaySeconds: 40
|
|
periodSeconds: 20
|
|
timeoutSeconds: 5
|
|
resources:
|
|
{{- toYaml .Values.resources | nindent 12 }}
|