|
| 1 | +apiVersion: apps/v1 |
| 2 | +kind: StatefulSet |
| 3 | +metadata: |
| 4 | + name: {{ include "numtracker.fullname" . }} |
| 5 | + labels: |
| 6 | + {{- include "numtracker.labels" . | nindent 4 }} |
| 7 | +spec: |
| 8 | + {{- if not .Values.autoscaling.enabled }} |
| 9 | + replicas: {{ .Values.replicaCount }} |
| 10 | + {{- end }} |
| 11 | + selector: |
| 12 | + matchLabels: |
| 13 | + {{- include "numtracker.selectorLabels" . | nindent 6 }} |
| 14 | + template: |
| 15 | + metadata: |
| 16 | + {{- with .Values.podAnnotations }} |
| 17 | + annotations: |
| 18 | + {{- toYaml . | nindent 8 }} |
| 19 | + {{- end }} |
| 20 | + labels: |
| 21 | + {{- include "numtracker.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 "numtracker.serviceAccountName" . }} |
| 31 | + securityContext: |
| 32 | + {{- toYaml .Values.podSecurityContext | nindent 8 }} |
| 33 | + containers: |
| 34 | + - name: {{ .Chart.Name }} |
| 35 | + env: |
| 36 | + - name: NUMTRACKER_DB |
| 37 | + value: {{ .Values.numtracker.storage.mount }}/{{ .Values.numtracker.db.fileName }} |
| 38 | + - name: NUMTRACKER_PORT |
| 39 | + value: "{{- .Values.service.port -}}" |
| 40 | + {{- if .Values.numtracker.tracing.enabled }} |
| 41 | + - name: NUMTRACKER_TRACING |
| 42 | + value: {{ .Values.numtracker.tracing.host }} |
| 43 | + - name: NUMTRACKER_TRACING_LEVEL |
| 44 | + value: {{ .Values.numtracker.tracing.level }} |
| 45 | + {{- end }} |
| 46 | + {{- if .Values.numtracker.auth.enabled }} |
| 47 | + - name: NUMTRACKER_AUTH_HOST |
| 48 | + value: {{ .Values.numtracker.auth.host }} |
| 49 | + - name: NUMTRACKER_AUTH_ACCESS |
| 50 | + value: {{ .Values.numtracker.auth.access }} |
| 51 | + - name: NUMTRACKER_AUTH_ADMIN |
| 52 | + value: {{ .Values.numtracker.auth.admin }} |
| 53 | + {{- end }} |
| 54 | + securityContext: |
| 55 | + {{- toYaml .Values.securityContext | nindent 12 }} |
| 56 | + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" |
| 57 | + imagePullPolicy: {{ .Values.image.pullPolicy }} |
| 58 | + ports: |
| 59 | + - name: http |
| 60 | + containerPort: {{ .Values.service.port }} |
| 61 | + protocol: TCP |
| 62 | + livenessProbe: |
| 63 | + {{- toYaml .Values.livenessProbe | nindent 12 }} |
| 64 | + readinessProbe: |
| 65 | + {{- toYaml .Values.readinessProbe | nindent 12 }} |
| 66 | + resources: |
| 67 | + {{- toYaml .Values.resources | nindent 12 }} |
| 68 | + volumeMounts: |
| 69 | + - name: numtracker-data |
| 70 | + mountPath: /data |
| 71 | + {{- with .Values.extraVolumeMounts }} |
| 72 | + {{- toYaml . | nindent 12 }} |
| 73 | + {{- end }} |
| 74 | + volumes: |
| 75 | + - name: numtracker-data |
| 76 | + persistentVolumeClaim: |
| 77 | + claimName: {{ .Values.numtracker.storage.claimName }} |
| 78 | + {{- with .Values.extraVolumes }} |
| 79 | + {{- toYaml . | nindent 8 }} |
| 80 | + {{- end }} |
| 81 | + {{- with .Values.nodeSelector }} |
| 82 | + nodeSelector: |
| 83 | + {{- toYaml . | nindent 8 }} |
| 84 | + {{- end }} |
| 85 | + {{- with .Values.affinity }} |
| 86 | + affinity: |
| 87 | + {{- toYaml . | nindent 8 }} |
| 88 | + {{- end }} |
| 89 | + {{- with .Values.tolerations }} |
| 90 | + tolerations: |
| 91 | + {{- toYaml . | nindent 8 }} |
| 92 | + {{- end }} |
0 commit comments