|
| 1 | +apiVersion: apps/v1 |
| 2 | +kind: Deployment |
| 3 | +metadata: |
| 4 | + name: {{ include "ledger.fullname" . }} |
| 5 | + labels: |
| 6 | + {{- include "ledger.labels" . | nindent 4 }} |
| 7 | +spec: |
| 8 | + {{- if not .Values.autoscaling.enabled }} |
| 9 | + replicas: {{ .Values.replicaCount }} |
| 10 | + {{- end }} |
| 11 | + selector: |
| 12 | + matchLabels: |
| 13 | + {{- include "ledger.selectorLabels" . | nindent 6 }} |
| 14 | + template: |
| 15 | + metadata: |
| 16 | + labels: |
| 17 | + {{- include "ledger.labels" . | nindent 8 }} |
| 18 | + spec: |
| 19 | + serviceAccountName: {{ include "ledger.serviceAccountName" . }} |
| 20 | + {{- with .Values.imagePullSecrets }} |
| 21 | + imagePullSecrets: |
| 22 | + {{- toYaml . | nindent 8 }} |
| 23 | + {{- end }} |
| 24 | + securityContext: |
| 25 | + {{- toYaml .Values.podSecurityContext | nindent 8 }} |
| 26 | + containers: |
| 27 | + - name: ledger |
| 28 | + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" |
| 29 | + imagePullPolicy: {{ .Values.image.pullPolicy }} |
| 30 | + securityContext: |
| 31 | + {{- toYaml .Values.securityContext | nindent 12 }} |
| 32 | + ports: |
| 33 | + - name: http |
| 34 | + containerPort: {{ .Values.service.port }} |
| 35 | + protocol: TCP |
| 36 | + envFrom: |
| 37 | + - configMapRef: |
| 38 | + name: {{ include "ledger.fullname" . }} |
| 39 | + {{- if .Values.existingSecret }} |
| 40 | + env: |
| 41 | + - name: SPRING_DATASOURCE_PASSWORD |
| 42 | + valueFrom: |
| 43 | + secretKeyRef: |
| 44 | + name: {{ .Values.existingSecret }} |
| 45 | + key: {{ .Values.secretKeys.datasourcePassword }} |
| 46 | + - name: KEYCLOAK_CLIENT_SECRET |
| 47 | + valueFrom: |
| 48 | + secretKeyRef: |
| 49 | + name: {{ .Values.existingSecret }} |
| 50 | + key: {{ .Values.secretKeys.keycloakClientSecret }} |
| 51 | + {{- end }} |
| 52 | + livenessProbe: |
| 53 | + httpGet: |
| 54 | + path: /actuator/health/liveness |
| 55 | + port: http |
| 56 | + initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} |
| 57 | + periodSeconds: {{ .Values.probes.liveness.periodSeconds }} |
| 58 | + timeoutSeconds: {{ .Values.probes.liveness.timeoutSeconds }} |
| 59 | + failureThreshold: {{ .Values.probes.liveness.failureThreshold }} |
| 60 | + readinessProbe: |
| 61 | + httpGet: |
| 62 | + path: /actuator/health/readiness |
| 63 | + port: http |
| 64 | + initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} |
| 65 | + periodSeconds: {{ .Values.probes.readiness.periodSeconds }} |
| 66 | + timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} |
| 67 | + failureThreshold: {{ .Values.probes.readiness.failureThreshold }} |
| 68 | + resources: |
| 69 | + {{- toYaml .Values.resources | nindent 12 }} |
| 70 | + volumeMounts: |
| 71 | + - name: tmp |
| 72 | + mountPath: /tmp |
| 73 | + volumes: |
| 74 | + - name: tmp |
| 75 | + emptyDir: {} |
0 commit comments