|
| 1 | +apiVersion: apps/v1 |
| 2 | +kind: Deployment |
| 3 | +metadata: |
| 4 | + name: {{ include "github-actions-runner.fullname" . }} |
| 5 | + labels: |
| 6 | + {{- include "github-actions-runner.labels" . | nindent 4 }} |
| 7 | +spec: |
| 8 | + {{- if not .Values.autoscaling.enabled }} |
| 9 | + replicas: {{ .Values.replicaCount }} |
| 10 | + {{- end }} |
| 11 | + selector: |
| 12 | + matchLabels: |
| 13 | + {{- include "github-actions-runner.selectorLabels" . | nindent 6 }} |
| 14 | + template: |
| 15 | + metadata: |
| 16 | + {{- with .Values.podAnnotations }} |
| 17 | + annotations: |
| 18 | + {{- toYaml . | nindent 8 }} |
| 19 | + {{- end }} |
| 20 | + labels: |
| 21 | + {{- include "github-actions-runner.selectorLabels" . | nindent 8 }} |
| 22 | + spec: |
| 23 | + volumes: |
| 24 | + {{- if .Values.runner.kaniko.mountedSecret }} |
| 25 | + - name: pull-secret |
| 26 | + secret: |
| 27 | + secretName: "{{ .Values.runner.kaniko.mountedSecret }}" |
| 28 | + items: |
| 29 | + - key: .dockerconfigjson |
| 30 | + path: config.json |
| 31 | + defaultMode: 420 |
| 32 | + {{- end }} |
| 33 | + {{- if .Values.runner.kaniko.enabled }} |
| 34 | + - name: workspace-volume |
| 35 | + emptyDir: {} |
| 36 | + {{- end }} |
| 37 | + {{- with .Values.imagePullSecrets }} |
| 38 | + imagePullSecrets: |
| 39 | + {{- toYaml . | nindent 8 }} |
| 40 | + {{- end }} |
| 41 | + serviceAccountName: {{ include "github-actions-runner.serviceAccountName" . }} |
| 42 | + securityContext: |
| 43 | + {{- toYaml .Values.podSecurityContext | nindent 8 }} |
| 44 | + containers: |
| 45 | + {{- if .Values.runner.kaniko.enabled }} |
| 46 | + - name: {{ .Chart.Name }}-kaniko |
| 47 | + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}-kaniko-sidecar" |
| 48 | + resources: |
| 49 | + {{- toYaml .Values.resources | nindent 12 }} |
| 50 | + volumeMounts: |
| 51 | + - name: workspace-volume |
| 52 | + mountPath: /kaniko/workspace/ |
| 53 | + imagePullPolicy: IfNotPresent |
| 54 | + {{- end }} |
| 55 | + - name: {{ .Chart.Name }} |
| 56 | + securityContext: |
| 57 | + {{- toYaml .Values.securityContext | nindent 12 }} |
| 58 | + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}-{{ .Values.runner.flavour }}" |
| 59 | + imagePullPolicy: {{ .Values.image.pullPolicy }} |
| 60 | + volumeMounts: |
| 61 | + {{- if .Values.runner.kaniko.enabled }} |
| 62 | + - name: workspace-volume |
| 63 | + mountPath: /kaniko/workspace/ |
| 64 | + {{- end }} |
| 65 | + {{- if .Values.runner.kaniko.mountedSecret }} |
| 66 | + - name: pull-secret |
| 67 | + readOnly: true |
| 68 | + mountPath: /kaniko/.docker |
| 69 | + {{- end }} |
| 70 | + resources: |
| 71 | + {{- toYaml .Values.resources | nindent 12 }} |
| 72 | + envFrom: |
| 73 | + - secretRef: |
| 74 | + name: {{ .Release.Name }}-secret |
| 75 | + - configMapRef: |
| 76 | + name: {{ .Release.Name }}-configmap |
| 77 | + {{- with .Values.nodeSelector }} |
| 78 | + nodeSelector: |
| 79 | + {{- toYaml . | nindent 8 }} |
| 80 | + {{- end }} |
| 81 | + {{- with .Values.affinity }} |
| 82 | + affinity: |
| 83 | + {{- toYaml . | nindent 8 }} |
| 84 | + {{- end }} |
| 85 | + {{- with .Values.tolerations }} |
| 86 | + tolerations: |
| 87 | + {{- toYaml . | nindent 8 }} |
| 88 | + {{- end }} |
0 commit comments