{{- if .Values.paymentService.enabled }} apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "shop-recycle.fullname" . }}-payment-service labels: app: {{ include "shop-recycle.fullname" . }}-payment-service {{- include "shop-recycle.labels" . | nindent 4 }} namespace: {{ .Release.Namespace }} spec: replicas: {{ .Values.paymentService.replicaCount }} selector: matchLabels: app: {{ include "shop-recycle.fullname" . }}-payment-service {{- include "shop-recycle.selectorLabels" . | nindent 6 }} template: metadata: annotations: prometheus.io/scrape: "true" prometheus.io/port: "{{ .Values.paymentService.containerPort }}" prometheus.io/path: "/actuator/prometheus" labels: app: {{ include "shop-recycle.fullname" . }}-payment-service {{- include "shop-recycle.selectorLabels" . | nindent 8 }} spec: {{- if .Values.rbac.create }} serviceAccountName: {{ include "shop-recycle.serviceAccountName" . }} {{- end }} containers: - name: payment-service image: "{{ .Values.image.registry }}/{{ .Values.image.namespace }}/{{ .Values.paymentService.image.name }}:{{ .Values.paymentService.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - name: http containerPort: {{ .Values.paymentService.containerPort }} protocol: {{ .Values.paymentService.protocol }} env: - name: SPRING_PROFILES_ACTIVE value: "{{ .Values.paymentService.springProfiles }},{{ .Values.environment }}" - name: JAVA_OPTS value: "{{ .Values.paymentService.javaOpts }}" - name: SPRING_CONFIG_LOCATION value: "file:///etc/config/application.yml" - name: SPRING_MAIN_WEB_APPLICATION_TYPE value: "reactive" - name: LOGGING_LEVEL_ROOT value: "INFO" - name: SPRING_CLOUD_CONFIG_ENABLED value: "true" {{- if .Values.paymentService.startupProbe }} startupProbe: {{- toYaml .Values.paymentService.startupProbe | nindent 12 }} {{- end }} {{- if .Values.paymentService.livenessProbe }} livenessProbe: {{- toYaml .Values.paymentService.livenessProbe | nindent 12 }} {{- end }} {{- if .Values.paymentService.readinessProbe }} readinessProbe: {{- toYaml .Values.paymentService.readinessProbe | nindent 12 }} {{- end }} resources: {{- toYaml .Values.paymentService.resources | nindent 12 }} volumeMounts: - name: config mountPath: /etc/config - name: logs mountPath: /app/logs volumes: - name: config configMap: name: {{ include "shop-recycle.fullname" . }}-payment-service-config - name: logs emptyDir: {} {{- end }}