|
| 1 | +apiVersion: apps/v1 |
| 2 | +kind: Deployment |
| 3 | +metadata: |
| 4 | + name: {{ include "group-challenge.fullname" . }} |
| 5 | + labels: |
| 6 | + {{- include "group-challenge.labels" . | nindent 4 }} |
| 7 | +spec: |
| 8 | + replicas: {{ .Values.replicaCount }} |
| 9 | + selector: |
| 10 | + matchLabels: |
| 11 | + {{- include "group-challenge.selectorLabels" . | nindent 6 }} |
| 12 | + template: |
| 13 | + metadata: |
| 14 | + annotations: |
| 15 | + "cluster-autoscaler.kubernetes.io/safe-to-evict": "true" |
| 16 | + {{- with .Values.podAnnotations }} |
| 17 | + {{- toYaml . | nindent 8 }} |
| 18 | + {{- end }} |
| 19 | + labels: |
| 20 | + {{- include "group-challenge.selectorLabels" . | nindent 8 }} |
| 21 | + spec: |
| 22 | + {{- with .Values.imagePullSecrets }} |
| 23 | + imagePullSecrets: |
| 24 | + {{- toYaml . | nindent 8 }} |
| 25 | + {{- end }} |
| 26 | + serviceAccountName: {{ include "group-challenge.serviceAccountName" . }} |
| 27 | + securityContext: |
| 28 | + {{- toYaml .Values.podSecurityContext | nindent 8 }} |
| 29 | + restartPolicy: Always |
| 30 | + containers: |
| 31 | + {{ if .Values.imgProxy.enabled -}} |
| 32 | + - name: img-proxy |
| 33 | + securityContext: |
| 34 | + {{- toYaml .Values.securityContext | nindent 12 }} |
| 35 | + image: "{{ .Values.imgProxy.image.repository }}:{{ .Values.imgProxy.image.tag }}" |
| 36 | + imagePullPolicy: {{ .Values.imgProxy.image.pullPolicy }} |
| 37 | + volumeMounts: |
| 38 | + - name: group-challenge-cache |
| 39 | + mountPath: "/tmp/group-challenge-cache" |
| 40 | + env: |
| 41 | + - name: IMGPROXY_LOCAL_FILESYSTEM_ROOT |
| 42 | + value: "/tmp/group-challenge-cache" |
| 43 | + - name: IMGPROXY_BIND |
| 44 | + value: ":8081" |
| 45 | + - name: IMGPROXY_PROMETHEUS_BIND |
| 46 | + value: ":8082" |
| 47 | + - name: IMGPROXY_MAX_SRC_RESOLUTION |
| 48 | + value: "25" |
| 49 | + {{ if .Values.imgProxy.env -}} |
| 50 | + {{- toYaml .Values.imgProxy.env | nindent 12 }} |
| 51 | + {{- end }} |
| 52 | + ports: |
| 53 | + - name: http-ip |
| 54 | + containerPort: 8081 |
| 55 | + protocol: TCP |
| 56 | + - name: http-ipp |
| 57 | + containerPort: 8082 |
| 58 | + protocol: TCP |
| 59 | + livenessProbe: |
| 60 | + httpGet: |
| 61 | + path: / |
| 62 | + port: http-ip |
| 63 | + readinessProbe: |
| 64 | + httpGet: |
| 65 | + path: / |
| 66 | + port: http-ip |
| 67 | + resources: |
| 68 | + {{- toYaml .Values.imgProxy.resources | nindent 12 }} |
| 69 | + {{- end }} |
| 70 | + - name: {{ .Chart.Name }} |
| 71 | + securityContext: |
| 72 | + {{- toYaml .Values.securityContext | nindent 12 }} |
| 73 | + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" |
| 74 | + imagePullPolicy: {{ .Values.image.pullPolicy }} |
| 75 | + volumeMounts: |
| 76 | + - name: config |
| 77 | + mountPath: "/app/config" |
| 78 | + - name: group-challenge-cache |
| 79 | + mountPath: "/tmp/group-challenge-cache" |
| 80 | + env: |
| 81 | + {{ if .Values.groupChallenge.env -}} |
| 82 | + {{- toYaml .Values.groupChallenge.env | nindent 12 }} |
| 83 | + {{- end }} |
| 84 | + ports: |
| 85 | + - name: http |
| 86 | + containerPort: 8080 |
| 87 | + protocol: TCP |
| 88 | + livenessProbe: |
| 89 | + httpGet: |
| 90 | + path: / |
| 91 | + port: http |
| 92 | + readinessProbe: |
| 93 | + httpGet: |
| 94 | + path: / |
| 95 | + port: http |
| 96 | + resources: |
| 97 | + {{- toYaml .Values.resources | nindent 12 }} |
| 98 | + volumes: |
| 99 | + - name: config |
| 100 | + configMap: |
| 101 | + name: {{ include "group-challenge.fullname" . }} |
| 102 | + - name: group-challenge-cache |
| 103 | + emptyDir: {} |
| 104 | + {{- with .Values.nodeSelector }} |
| 105 | + nodeSelector: |
| 106 | + {{- toYaml . | nindent 8 }} |
| 107 | + {{- end }} |
| 108 | + {{- with .Values.affinity }} |
| 109 | + affinity: |
| 110 | + {{- toYaml . | nindent 8 }} |
| 111 | + {{- end }} |
| 112 | + {{- with .Values.tolerations }} |
| 113 | + tolerations: |
| 114 | + {{- toYaml . | nindent 8 }} |
| 115 | + {{- end }} |
0 commit comments