Fixed readme

This commit is contained in:
dementhorr 2024-01-14 14:22:56 +01:00 committed by Vince Montalbano
parent ed8534e084
commit 729ce0f095
3 changed files with 36 additions and 8 deletions

View File

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

View File

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

View File

@ -344,7 +344,10 @@ signing:
# - must define deployment.env.GITEA__ACTIONS__ENABLED and GITEA__SERVER__LOCAL_ROOT_URL # - must define deployment.env.GITEA__ACTIONS__ENABLED and GITEA__SERVER__LOCAL_ROOT_URL
## @section GiteaActions ## @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.config Act runner custom configuration.
## @param actions.statefulset.runnerLabels Act runner labels. ## @param actions.statefulset.runnerLabels Act runner labels.
## @param actions.statefulset.actRunnerImage.repository The Gitea act runner image ## @param actions.statefulset.actRunnerImage.repository The Gitea act runner image
@ -354,6 +357,9 @@ signing:
## @param actions.statefulset.dindImage.tag The Docker-in-Docker image tag ## @param actions.statefulset.dindImage.tag The Docker-in-Docker image tag
## @param actions.statefulset.dindImage.pullPolicy The Docker-in-Docker pullPolicy ## @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.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.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.tag The token image tag that can create a token
## @param actions.job.tokenImage.pullPolicy The token image pullPolicy that can create a token ## @param actions.job.tokenImage.pullPolicy The token image pullPolicy that can create a token
@ -387,6 +393,7 @@ actions:
enabled: false enabled: false
annotations: {} annotations: {}
labels: {}
resources: {} resources: {}
tokenImage: tokenImage:
@ -401,8 +408,8 @@ actions:
## Specify an existing token secret ## Specify an existing token secret
## ##
# existingSecret: secretName existingSecret: ""
# existingSecretKey: token existingSecretKey: ""
## @section Gitea ## @section Gitea
# #