You've already forked act_runner-helm
99 lines
3.4 KiB
YAML
99 lines
3.4 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "act_runner.fullname" . }}
|
|
labels:
|
|
{{- include "act_runner.labels" . | nindent 4 }}
|
|
spec:
|
|
{{- if not .Values.autoscaling.enabled }}
|
|
replicas: {{ .Values.replicaCount }}
|
|
{{- end }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "act_runner.selectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
{{- with .Values.podAnnotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "act_runner.selectorLabels" . | nindent 8 }}
|
|
spec:
|
|
{{- with .Values.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
serviceAccountName: {{ include "act_runner.serviceAccountName" . }}
|
|
securityContext:
|
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
|
containers:
|
|
- name: {{ .Chart.Name }}
|
|
securityContext:
|
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
resources:
|
|
{{- toYaml .Values.resources | nindent 12 }}
|
|
env:
|
|
- name: DOCKER_HOST
|
|
value: "tcp://localhost:2375"
|
|
- name: DOCKER_TLS_CERTDIR
|
|
value: ""
|
|
- name: GITEA_INSTANCE_URL
|
|
value: {{ .Values.act_runner.instance }}
|
|
- name: GITEA_RUNNER_REGISTRATION_TOKEN
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ include "act_runner.fullname" . }}-secret
|
|
key: act-runner-token
|
|
- name: GITEA_RUNNER_LABELS
|
|
value: {{ join "," .Values.act_runner.labels }}
|
|
- name: ACT_CACHE_SERVER_ENABLED
|
|
value: "true"
|
|
- name: ACT_CACHE_SERVER_DIR
|
|
value: "/data/cache/server"
|
|
volumeMounts:
|
|
- name: docker-data
|
|
mountPath: /shared
|
|
- name: {{ include "act_runner.fullname" . }}-pvc
|
|
mountPath: /data
|
|
- name: act-runner-dind
|
|
securityContext:
|
|
privileged: true
|
|
image: docker:23.0.0-dind
|
|
imagePullPolicy: IfNotPresent
|
|
env:
|
|
- name: DOCKER_DRIVER
|
|
value: "overlay2"
|
|
- name: DOCKER_TLS_CERTDIR
|
|
value: ""
|
|
- name: DOCKER_REGISTRY_MIRROR
|
|
value: {{ .Values.act_runner.registryMirror }}
|
|
volumeMounts:
|
|
- name: docker-data
|
|
mountPath: /shared
|
|
- name: {{ include "act_runner.fullname" . }}-shared-pvc
|
|
mountPath: "/data/cache/server"
|
|
volumes:
|
|
- name: docker-data
|
|
emptyDir: { }
|
|
- name: {{ include "act_runner.fullname" . }}-pvc
|
|
persistentVolumeClaim:
|
|
claimName: {{ include "act_runner.fullname" . }}-pvc
|
|
- name: {{ include "act_runner.fullname" . }}-shared-pvc
|
|
persistentVolumeClaim:
|
|
claimName: {{ include "act_runner.fullname" . }}-shared-pvc
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|