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