|
| 1 | +apiVersion: apps/v1 |
| 2 | +kind: Deployment |
| 3 | +metadata: |
| 4 | + name: {{ include "librecaptcha.fullname" . }} |
| 5 | + labels: |
| 6 | + {{- include "librecaptcha.labels" . | nindent 4 }} |
| 7 | +spec: |
| 8 | + {{- if not .Values.autoscaling.enabled }} |
| 9 | + replicas: {{ .Values.replicaCount }} |
| 10 | + {{- end }} |
| 11 | + selector: |
| 12 | + matchLabels: |
| 13 | + {{- include "librecaptcha.selectorLabels" . | nindent 6 }} |
| 14 | + template: |
| 15 | + metadata: |
| 16 | + {{- with .Values.podAnnotations }} |
| 17 | + annotations: |
| 18 | + {{- toYaml . | nindent 8 }} |
| 19 | + {{- end }} |
| 20 | + labels: |
| 21 | + {{- include "librecaptcha.labels" . | nindent 8 }} |
| 22 | + {{- with .Values.podLabels }} |
| 23 | + {{- toYaml . | nindent 8 }} |
| 24 | + {{- end }} |
| 25 | + spec: |
| 26 | + {{- with .Values.imagePullSecrets }} |
| 27 | + imagePullSecrets: |
| 28 | + {{- toYaml . | nindent 8 }} |
| 29 | + {{- end }} |
| 30 | + serviceAccountName: {{ include "librecaptcha.serviceAccountName" . }} |
| 31 | + securityContext: |
| 32 | + {{- toYaml .Values.podSecurityContext | nindent 8 }} |
| 33 | + containers: |
| 34 | + - name: {{ .Chart.Name }} |
| 35 | + securityContext: |
| 36 | + {{- toYaml .Values.securityContext | nindent 12 }} |
| 37 | + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" |
| 38 | + imagePullPolicy: {{ .Values.image.pullPolicy }} |
| 39 | + ports: |
| 40 | + - name: http |
| 41 | + containerPort: 8888 |
| 42 | + protocol: TCP |
| 43 | + livenessProbe: |
| 44 | + {{- toYaml .Values.livenessProbe | nindent 12 }} |
| 45 | + readinessProbe: |
| 46 | + {{- toYaml .Values.readinessProbe | nindent 12 }} |
| 47 | + resources: |
| 48 | + {{- toYaml .Values.resources | nindent 12 }} |
| 49 | + {{- with .Values.volumeMounts }} |
| 50 | + volumeMounts: |
| 51 | + {{- if .Values.persistence.enabled }} |
| 52 | + - mountPath: /lc-core/data |
| 53 | + name: {{ include "librecaptcha.fullname" . }} |
| 54 | + {{- end }} |
| 55 | + {{- toYaml . | nindent 12 }} |
| 56 | + {{- end }} |
| 57 | + {{- with .Values.volumes }} |
| 58 | + volumes: |
| 59 | + {{- if .Values.persistence.enabled }} |
| 60 | + - name: {{ include "librecaptcha.fullname" . }} |
| 61 | + persistentVolumeClaim: |
| 62 | + claimName: {{ include "librecaptcha.fullname" . }} |
| 63 | + {{- end }} |
| 64 | + {{- toYaml . | nindent 8 }} |
| 65 | + {{- end }} |
| 66 | + {{- with .Values.nodeSelector }} |
| 67 | + nodeSelector: |
| 68 | + {{- toYaml . | nindent 8 }} |
| 69 | + {{- end }} |
| 70 | + {{- with .Values.affinity }} |
| 71 | + affinity: |
| 72 | + {{- toYaml . | nindent 8 }} |
| 73 | + {{- end }} |
| 74 | + {{- with .Values.tolerations }} |
| 75 | + tolerations: |
| 76 | + {{- toYaml . | nindent 8 }} |
| 77 | + {{- end }} |
0 commit comments