Fixed readme

This commit is contained in:
dementhorr 2024-01-14 14:22:56 +01:00
parent 28e82905f7
commit 4058aed0fe
3 changed files with 36 additions and 8 deletions

View file

@ -11,16 +11,23 @@ metadata:
name: {{ $name }}
labels:
{{- include "gitea.labels" . | nindent 4 }}
app.kubernetes.io/component: token-job
{{- with .Values.actions.job.annotations }}
{{- with .Values.actions.job.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
app.kubernetes.io/component: token-job
annotations:
{{- with .Values.actions.job.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
ttlSecondsAfterFinished: 0
template:
metadata:
labels:
{{- include "gitea.labels" . | nindent 8 }}
{{- with .Values.actions.job.labels }}
{{- toYaml . | nindent 8 }}
{{- end }}
app.kubernetes.io/component: token-job
spec:
initContainers:
@ -48,7 +55,7 @@ spec:
mkdir -p /data/actions/
gitea actions generate-runner-token | grep -E '^.{40}$' | tr -d '\n' > /data/actions/token
resources:
{{- toYaml .Values.actions.resources | nindent 12 }}
{{- toYaml .Values.actions.job.resources | nindent 12 }}
volumeMounts:
- name: data
mountPath: /data
@ -69,7 +76,7 @@ spec:
kubectl auth can-i update secret/${SECRET_NAME}
/scripts/token.sh
resources:
{{- toYaml .Values.actions.resources | nindent 12 }}
{{- toYaml .Values.actions.job.resources | nindent 12 }}
volumeMounts:
- mountPath: /scripts
name: scripts

View file

@ -6,6 +6,13 @@ kind: StatefulSet
metadata:
labels:
{{- include "gitea.labels.actRunner" . | nindent 4 }}
{{- with .Values.actions.statefulset.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
annotations:
{{- with .Values.actions.statefulset.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ include "gitea.fullname" . }}-act-runner
spec:
selector:
@ -15,6 +22,9 @@ spec:
metadata:
labels:
{{- include "gitea.labels.actRunner" . | nindent 8 }}
{{- with .Values.actions.statefulset.labels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
initContainers:
- name: init-gitea
@ -49,6 +59,8 @@ spec:
value: "{{ .Values.actions.statefulset.runnerLabels | default "ubuntu-latest" }}"
- name: CONFIG_FILE
value: /actrunner/config.yaml
resources:
{{- toYaml .Values.actions.statefulset.resources | nindent 12 }}
volumeMounts:
- mountPath: /actrunner/config.yaml
name: act-runner-config
@ -70,6 +82,8 @@ spec:
securityContext:
# allowPrivilegeEscalation: true
privileged: true
resources:
{{- toYaml .Values.actions.statefulset.resources | nindent 12 }}
volumeMounts:
- mountPath: /certs/server
name: docker-certs

View file

@ -336,7 +336,10 @@ signing:
# - must define deployment.env.GITEA__ACTIONS__ENABLED and GITEA__SERVER__LOCAL_ROOT_URL
## @section GiteaActions
#
## @param actions.statefulset.enabled Create an act-runner StatefulSet.
## @param actions.statefulset.enabled Create an act runner StatefulSet.
## @param actions.statefulset.annotations Act runner annotations
## @param actions.statefulset.labels Act runner labels
## @param actions.statefulset.resources Act runner resources
## @param actions.statefulset.config Act runner custom configuration.
## @param actions.statefulset.runnerLabels Act runner labels.
## @param actions.statefulset.actRunnerImage.repository The Gitea act runner image
@ -346,6 +349,9 @@ signing:
## @param actions.statefulset.dindImage.tag The Docker-in-Docker image tag
## @param actions.statefulset.dindImage.pullPolicy The Docker-in-Docker pullPolicy
## @param actions.job.enabled Create a job that will create and save the token in a Kubernetes Secret
## @param actions.job.annotations Job's annotations
## @param actions.job.labels Job's labels
## @param actions.job.resources Job's resources
## @param actions.job.tokenImage.repository The image that can create a token via `gitea actions generate-runner-token`
## @param actions.job.tokenImage.tag The token image tag that can create a token
## @param actions.job.tokenImage.pullPolicy The token image pullPolicy that can create a token
@ -379,6 +385,7 @@ actions:
enabled: false
annotations: {}
labels: {}
resources: {}
tokenImage:
@ -393,8 +400,8 @@ actions:
## Specify an existing token secret
##
# existingSecret: secretName
# existingSecretKey: token
existingSecret: ""
existingSecretKey: ""
## @section Gitea
#