apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "pcp-request-service.fullname" . }} labels: {{- include "pcp-request-service.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: app.kubernetes.io/name: {{ include "pcp-request-service.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} template: metadata: labels: {{- include "pcp-request-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-request-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-request-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-request-service.managementBaseUrl" . }} {{- if $managementBaseUrl }} - name: SPRING_BOOT_ADMIN_CLIENT_INSTANCE_MANAGEMENT_BASE_URL value: {{ $managementBaseUrl | quote }} {{- end }} {{- $healthUrl := include "pcp-request-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 startupProbe: httpGet: path: /actuator/health port: http initialDelaySeconds: 10 periodSeconds: 10 timeoutSeconds: 5 failureThreshold: 60 livenessProbe: httpGet: path: /actuator/health port: http initialDelaySeconds: 40 periodSeconds: 20 timeoutSeconds: 5 resources: {{- toYaml .Values.resources | nindent 12 }}