|
| 1 | +apiVersion: apps/v1 |
| 2 | +kind: Deployment |
| 3 | +metadata: |
| 4 | + name: {{ include "github-exporter.fullname" . }} |
| 5 | + namespace: {{ .Release.Namespace }} |
| 6 | + labels: |
| 7 | + app.kubernetes.io/name: {{ include "github-exporter.name" . }} |
| 8 | + helm.sh/chart: {{ include "github-exporter.chart" . }} |
| 9 | + app.kubernetes.io/instance: {{ .Release.Name }} |
| 10 | + app.kubernetes.io/managed-by: {{ .Release.Service }} |
| 11 | + {{- if .Values.labels -}} |
| 12 | + {{ .Values.labels | toYaml | nindent 4 -}} |
| 13 | + {{- end }} |
| 14 | +spec: |
| 15 | + replicas: {{ .Values.deployment.replicaCount }} |
| 16 | + selector: |
| 17 | + matchLabels: |
| 18 | + app.kubernetes.io/name: {{ include "github-exporter.name" . }} |
| 19 | + app.kubernetes.io/instance: {{ .Release.Name }} |
| 20 | + template: |
| 21 | + metadata: |
| 22 | + labels: |
| 23 | + app.kubernetes.io/name: {{ include "github-exporter.name" . }} |
| 24 | + app.kubernetes.io/instance: {{ .Release.Name }} |
| 25 | + helm.sh/chart: {{ include "github-exporter.chart" . }} |
| 26 | + {{- if .Values.podLabels -}} |
| 27 | + {{ .Values.podLabels | toYaml | nindent 8 -}} |
| 28 | + {{- end }} |
| 29 | + spec: |
| 30 | + containers: |
| 31 | + - name: github-exporter |
| 32 | + image: "{{ .Values.deployment.image.repository }}:{{ .Values.deployment.image.tag }}@{{ .Values.deployment.image.digest }}" |
| 33 | + imagePullPolicy: {{ .Values.deployment.image.pullPolicy }} |
| 34 | + args: |
| 35 | + - --gh.github-api-token=$(GITHUB_TOKEN) |
| 36 | + - --gh.github-webhook-token=$(GITHUB_WEBHOOK_TOKEN) |
| 37 | + - --gh.github-org={{ .Values.config.org }} |
| 38 | + - --gh.billing-poll-seconds={{ .Values.config.pollSeconds }} |
| 39 | + envFrom: |
| 40 | + - secretRef: |
| 41 | + {{- if not .Values.secret.existingSecretName }} |
| 42 | + name: {{ include "github-exporter.fullname" . }} |
| 43 | + {{- else }} |
| 44 | + name: {{ .Values.secret.existingSecretName }} |
| 45 | + {{- end }} |
| 46 | + ports: |
| 47 | + - name: metrics |
| 48 | + containerPort: {{ .Values.service.portMetrics }} |
| 49 | + protocol: TCP |
| 50 | + - name: http |
| 51 | + containerPort: {{ .Values.service.portHttp }} |
| 52 | + protocol: TCP |
| 53 | + livenessProbe: |
| 54 | + failureThreshold: 1 |
| 55 | + httpGet: |
| 56 | + path: /healthz |
| 57 | + port: http |
| 58 | + scheme: HTTP |
| 59 | + initialDelaySeconds: 3 |
| 60 | + periodSeconds: 30 |
| 61 | + successThreshold: 1 |
| 62 | + timeoutSeconds: 9 |
| 63 | + readinessProbe: |
| 64 | + failureThreshold: 1 |
| 65 | + httpGet: |
| 66 | + path: /healthz |
| 67 | + port: http |
| 68 | + scheme: HTTP |
| 69 | + initialDelaySeconds: 3 |
| 70 | + periodSeconds: 15 |
| 71 | + successThreshold: 1 |
| 72 | + timeoutSeconds: 9 |
| 73 | + resources: |
| 74 | + {{- toYaml .Values.deployment.resources | nindent 12 }} |
| 75 | + {{- with .Values.deployment.nodeSelector }} |
| 76 | + nodeSelector: |
| 77 | + {{- toYaml . | nindent 8 }} |
| 78 | + {{- end }} |
| 79 | + {{- with .Values.affinity }} |
| 80 | + affinity: |
| 81 | + {{- toYaml . | nindent 8 }} |
| 82 | + {{- end }} |
| 83 | + {{- with .Values.tolerations }} |
| 84 | + tolerations: |
| 85 | + {{- toYaml . | nindent 8 }} |
| 86 | + {{- end }} |
0 commit comments