| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- {{- 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 }}
- {{- 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: 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 }}"
-
- {{- range $key, $value := .Values.orderService.env }}
- - name: {{ $key }}
- value: "{{ $value }}"
- {{- end }}
-
- {{- 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: logs
- mountPath: /app/logs
-
- volumes:
- - name: logs
- emptyDir: {}
- {{- end }}
|