| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- {{- 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 }}
- {{- if or .Values.global.registry.createSecret .Values.global.imagePullSecrets }}
- imagePullSecrets:
- {{- if .Values.global.registry.createSecret }}
- - name: {{ include "shop-recycle.fullname" . }}-registry-secret
- {{- end }}
- {{- with .Values.global.imagePullSecrets }}
- {{ toYaml . | indent 8 }}
- {{- end }}
- {{- end }}
-
- {{- with .Values.tolerations }}
- tolerations:
- {{- toYaml . | nindent 8 }}
- {{- end }}
-
- containers:
- - name: payment-service
- image: "{{ .Values.image.registry }}/{{ .Values.image.namespace }}/{{ .Values.paymentService.image.name }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
- imagePullPolicy: {{ .Values.image.pullPolicy }}
- command:
- - sh
- - -c
- - java ${JAVA_OPTS} -jar /app/payment-service.jar
-
- 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 }}"
-
- {{- range $key, $value := .Values.paymentService.env }}
- - name: {{ $key }}
- value: "{{ $value }}"
- {{- 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: logs
- mountPath: /app/logs
-
- volumes:
- - name: logs
- emptyDir: {}
- {{- end }}
|