apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "forgejo-runner.fullname" . }} labels: {{- include "forgejo-runner.labels" . | nindent 4 }} spec: {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} {{- end }} selector: matchLabels: {{- include "forgejo-runner.selectorLabels" . | nindent 6 }} template: metadata: {{- with .Values.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "forgejo-runner.labels" . | nindent 8 }} {{- with .Values.podLabels }} {{- toYaml . | nindent 8 }} {{- end }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "forgejo-runner.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} initContainers: - name: make-config-writeable image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} command: [ "/bin/cp", "/etc/runner/.runner", "/data/.runner" ] resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - name: runner-data mountPath: /data - name: runner-config mountPath: /etc/runner containers: - name: runner securityContext: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} command: - "sh" - "-c" - | while ! nc -z 127.0.0.1 2376