mirror of
https://gitea.com/gitea/helm-actions.git
synced 2026-04-05 09:10:46 +00:00
Compare commits
6 Commits
f23fa6f28e
...
bcd4646c6c
| Author | SHA1 | Date | |
|---|---|---|---|
| bcd4646c6c | |||
| 7377c37019 | |||
| d2146c59c1 | |||
| d17d1fd865 | |||
| b91d297e32 | |||
| 0536d625cf |
@ -8,7 +8,7 @@ on:
|
||||
jobs:
|
||||
changelog:
|
||||
runs-on: ubuntu-latest
|
||||
container: docker.io/thegeeklab/git-sv:2.0.5
|
||||
container: docker.io/thegeeklab/git-sv:2.0.7
|
||||
steps:
|
||||
- name: install tools
|
||||
run: |
|
||||
|
||||
@ -10,7 +10,7 @@ on:
|
||||
|
||||
env:
|
||||
# renovate: datasource=github-releases depName=helm-unittest/helm-unittest
|
||||
HELM_UNITTEST_VERSION: "v1.0.1"
|
||||
HELM_UNITTEST_VERSION: "v1.0.3"
|
||||
|
||||
jobs:
|
||||
check-and-test:
|
||||
|
||||
@ -75,6 +75,7 @@ You should be good to go!
|
||||
| `statefulset.dind.extraVolumeMounts` | Allows mounting extra volumes in the Docker-in-Docker container | `[]` |
|
||||
| `statefulset.dind.extraEnvs` | Allows adding custom environment variables, such as `DOCKER_IPTABLES_LEGACY` | `[]` |
|
||||
| `statefulset.persistence.size` | Size for persistence to store act runner data | `1Gi` |
|
||||
| `statefulset.securityContext` | Customize the SecurityContext | `{}` |
|
||||
| `existingSecret` | Secret that contains the token | `""` |
|
||||
| `existingSecretKey` | Secret key | `""` |
|
||||
| `giteaRootURL` | URL the act_runner registers and connect with | `""` |
|
||||
|
||||
16
pnpm-lock.yaml
generated
16
pnpm-lock.yaml
generated
@ -210,8 +210,8 @@ packages:
|
||||
resolution: {integrity: sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
katex@0.16.22:
|
||||
resolution: {integrity: sha512-XCHRdUw4lf3SKBaJe4EvgqIuWwkPSo9XoeO8GjQW94Bp7TWv9hNhzZjZ+OH9yf1UmLygb7DIT5GSFQiyt16zYg==}
|
||||
katex@0.16.25:
|
||||
resolution: {integrity: sha512-woHRUZ/iF23GBP1dkDQMh1QBad9dmr8/PAwNA54VrSOVYgI12MAcE14TqnDdQOdzyEonGzMepYnqBMYdsoAr8Q==}
|
||||
hasBin: true
|
||||
|
||||
linkify-it@5.0.0:
|
||||
@ -352,8 +352,8 @@ packages:
|
||||
resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
path-scurry@2.0.0:
|
||||
resolution: {integrity: sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==}
|
||||
path-scurry@2.0.1:
|
||||
resolution: {integrity: sha512-oWyT4gICAu+kaA7QWk/jvCHWarMKNs6pXOGWKDTr7cw4IGcUbW+PeTfbaQiLGheFRpjo6O9J0PmyMfQPjH71oA==}
|
||||
engines: {node: 20 || >=22}
|
||||
|
||||
punycode.js@2.3.1:
|
||||
@ -551,7 +551,7 @@ snapshots:
|
||||
minimatch: 10.0.3
|
||||
minipass: 7.1.2
|
||||
package-json-from-dist: 1.0.1
|
||||
path-scurry: 2.0.0
|
||||
path-scurry: 2.0.1
|
||||
|
||||
glob@7.2.3:
|
||||
dependencies:
|
||||
@ -600,7 +600,7 @@ snapshots:
|
||||
|
||||
jsonpointer@5.0.1: {}
|
||||
|
||||
katex@0.16.22:
|
||||
katex@0.16.25:
|
||||
dependencies:
|
||||
commander: 8.3.0
|
||||
|
||||
@ -715,7 +715,7 @@ snapshots:
|
||||
dependencies:
|
||||
'@types/katex': 0.16.7
|
||||
devlop: 1.1.0
|
||||
katex: 0.16.22
|
||||
katex: 0.16.25
|
||||
micromark-factory-space: 2.0.1
|
||||
micromark-util-character: 2.1.1
|
||||
micromark-util-symbol: 2.0.1
|
||||
@ -862,7 +862,7 @@ snapshots:
|
||||
|
||||
path-key@3.1.1: {}
|
||||
|
||||
path-scurry@2.0.0:
|
||||
path-scurry@2.0.1:
|
||||
dependencies:
|
||||
lru-cache: 11.2.2
|
||||
minipass: 7.1.2
|
||||
|
||||
@ -30,6 +30,8 @@ spec:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
securityContext:
|
||||
{{- toYaml .Values.statefulset.securityContext | nindent 8 }}
|
||||
initContainers:
|
||||
- name: init-gitea
|
||||
image: "{{ include "gitea.actions.init.image" . }}"
|
||||
@ -43,18 +45,42 @@ spec:
|
||||
echo "Trying again in 3 seconds..."
|
||||
done
|
||||
echo "Gitea has been reached!"
|
||||
- name: dind
|
||||
image: "{{ include "gitea.actions.dind.image" . }}"
|
||||
imagePullPolicy: {{ .Values.statefulset.dind.pullPolicy }}
|
||||
{{- if .Values.statefulset.dind.extraEnvs }}
|
||||
env:
|
||||
{{- toYaml .Values.statefulset.dind.extraEnvs | nindent 12 }}
|
||||
{{- end }}
|
||||
restartPolicy: Always
|
||||
securityContext:
|
||||
privileged: true
|
||||
startupProbe:
|
||||
exec:
|
||||
command:
|
||||
- /usr/bin/test
|
||||
- -S
|
||||
- /var/run/docker.sock
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- /usr/bin/test
|
||||
- -S
|
||||
- /var/run/docker.sock
|
||||
resources:
|
||||
{{- toYaml .Values.statefulset.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
- mountPath: /var/run/
|
||||
name: docker-socket
|
||||
{{- with .Values.statefulset.dind.extraVolumeMounts }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: act-runner
|
||||
image: "{{ include "gitea.actions.actRunner.image" . }}"
|
||||
imagePullPolicy: {{ .Values.statefulset.actRunner.pullPolicy }}
|
||||
workingDir: /data
|
||||
env:
|
||||
- name: DOCKER_HOST
|
||||
value: tcp://127.0.0.1:2376
|
||||
- name: DOCKER_TLS_VERIFY
|
||||
value: "1"
|
||||
- name: DOCKER_CERT_PATH
|
||||
value: /certs/client
|
||||
- name: GITEA_RUNNER_REGISTRATION_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
@ -75,36 +101,14 @@ spec:
|
||||
- mountPath: /actrunner/config.yaml
|
||||
name: act-runner-config
|
||||
subPath: config.yaml
|
||||
- mountPath: /certs/client
|
||||
name: docker-certs
|
||||
- mountPath: /var/run/docker.sock
|
||||
name: docker-socket
|
||||
subPath: docker.sock
|
||||
- mountPath: /data
|
||||
name: data-act-runner
|
||||
{{- with .Values.statefulset.actRunner.extraVolumeMounts }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
- name: dind
|
||||
image: "{{ include "gitea.actions.dind.image" . }}"
|
||||
imagePullPolicy: {{ .Values.statefulset.dind.pullPolicy }}
|
||||
env:
|
||||
- name: DOCKER_HOST
|
||||
value: tcp://127.0.0.1:2376
|
||||
- name: DOCKER_TLS_VERIFY
|
||||
value: "1"
|
||||
- name: DOCKER_CERT_PATH
|
||||
value: /certs/client
|
||||
{{- if .Values.statefulset.dind.extraEnvs }}
|
||||
{{- toYaml .Values.statefulset.dind.extraEnvs | nindent 12 }}
|
||||
{{- end }}
|
||||
securityContext:
|
||||
privileged: true
|
||||
resources:
|
||||
{{- toYaml .Values.statefulset.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
- mountPath: /certs/client
|
||||
name: docker-certs
|
||||
{{- with .Values.statefulset.dind.extraVolumeMounts }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- range $key, $value := .Values.statefulset.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
@ -121,7 +125,7 @@ spec:
|
||||
- name: act-runner-config
|
||||
configMap:
|
||||
name: {{ include "gitea.actions.fullname" . }}-act-runner-config
|
||||
- name: docker-certs
|
||||
- name: docker-socket
|
||||
emptyDir: {}
|
||||
{{- with .Values.statefulset.extraVolumes }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
|
||||
@ -74,7 +74,7 @@ tests:
|
||||
apiVersion: apps/v1
|
||||
name: gitea-unittests-actions-act-runner
|
||||
- equal:
|
||||
path: spec.template.spec.containers[1].image
|
||||
path: spec.template.spec.initContainers[1].image
|
||||
value: test.io/dind:x.y.z
|
||||
- it: dind uses global.imageRegistry
|
||||
template: templates/statefulset.yaml
|
||||
@ -92,7 +92,7 @@ tests:
|
||||
apiVersion: apps/v1
|
||||
name: gitea-unittests-actions-act-runner
|
||||
- equal:
|
||||
path: spec.template.spec.containers[1].image
|
||||
path: spec.template.spec.initContainers[1].image
|
||||
value: test.io/docker:28.3.3-dind
|
||||
- it: init uses fullOverride
|
||||
template: templates/statefulset.yaml
|
||||
@ -152,16 +152,70 @@ tests:
|
||||
apiVersion: apps/v1
|
||||
name: gitea-unittests-actions-act-runner
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].env[7]
|
||||
path: spec.template.spec.containers[0].env[4]
|
||||
value:
|
||||
name: CUSTOM_ENV
|
||||
value: "1"
|
||||
- matchRegex:
|
||||
path: spec.template.spec.containers[0].env[8].valueFrom.fieldRef.fieldPath
|
||||
path: spec.template.spec.containers[0].env[5].valueFrom.fieldRef.fieldPath
|
||||
pattern: "metadata\\.name"
|
||||
- matchRegex:
|
||||
path: spec.template.spec.containers[0].env[8].name
|
||||
path: spec.template.spec.containers[0].env[5].name
|
||||
pattern: "GITEA_RUNNER_NAME"
|
||||
- it: Has fsGroup in securityContext
|
||||
template: templates/statefulset.yaml
|
||||
set:
|
||||
enabled: true
|
||||
existingSecret: "my-secret"
|
||||
existingSecretKey: "my-secret-key"
|
||||
statefulset.securityContext:
|
||||
fsGroup: 1000
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 1
|
||||
- containsDocument:
|
||||
kind: StatefulSet
|
||||
apiVersion: apps/v1
|
||||
name: gitea-unittests-actions-act-runner
|
||||
- equal:
|
||||
path: spec.template.spec.securityContext["fsGroup"]
|
||||
value: 1000
|
||||
- it: Has fsGroupChangePolicy in securityContext
|
||||
template: templates/statefulset.yaml
|
||||
set:
|
||||
enabled: true
|
||||
existingSecret: "my-secret"
|
||||
existingSecretKey: "my-secret-key"
|
||||
statefulset.securityContext:
|
||||
fsGroupChangePolicy: OnRootMismatch
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 1
|
||||
- containsDocument:
|
||||
kind: StatefulSet
|
||||
apiVersion: apps/v1
|
||||
name: gitea-unittests-actions-act-runner
|
||||
- equal:
|
||||
path: spec.template.spec.securityContext["fsGroupChangePolicy"]
|
||||
value: "OnRootMismatch"
|
||||
- it: Has Always in securityContext
|
||||
template: templates/statefulset.yaml
|
||||
set:
|
||||
enabled: true
|
||||
existingSecret: "my-secret"
|
||||
existingSecretKey: "my-secret-key"
|
||||
statefulset.securityContext:
|
||||
fsGroupChangePolicy: Always
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 1
|
||||
- containsDocument:
|
||||
kind: StatefulSet
|
||||
apiVersion: apps/v1
|
||||
name: gitea-unittests-actions-act-runner
|
||||
- equal:
|
||||
path: spec.template.spec.securityContext["fsGroupChangePolicy"]
|
||||
value: "Always"
|
||||
- it: doesn't renders a StatefulSet by default
|
||||
template: templates/statefulset.yaml
|
||||
asserts:
|
||||
@ -181,7 +235,7 @@ tests:
|
||||
apiVersion: apps/v1
|
||||
name: gitea-unittests-actions-act-runner
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].env[3]
|
||||
path: spec.template.spec.containers[0].env[0]
|
||||
value:
|
||||
name: GITEA_RUNNER_REGISTRATION_TOKEN
|
||||
valueFrom:
|
||||
@ -202,7 +256,7 @@ tests:
|
||||
apiVersion: apps/v1
|
||||
name: gitea-unittests-actions-act-runner
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].env[3]
|
||||
path: spec.template.spec.containers[0].env[0]
|
||||
value:
|
||||
name: GITEA_RUNNER_REGISTRATION_TOKEN
|
||||
valueFrom:
|
||||
@ -241,7 +295,7 @@ tests:
|
||||
apiVersion: apps/v1
|
||||
name: gitea-unittests-actions-act-runner
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].env[4]
|
||||
path: spec.template.spec.containers[0].env[1]
|
||||
value:
|
||||
name: GITEA_INSTANCE_URL
|
||||
value: "http://git.example.com"
|
||||
@ -269,7 +323,7 @@ tests:
|
||||
apiVersion: apps/v1
|
||||
name: gitea-unittests-actions-act-runner
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].env[4]
|
||||
path: spec.template.spec.containers[0].env[1]
|
||||
value:
|
||||
name: GITEA_INSTANCE_URL
|
||||
value: "https://git.example.com"
|
||||
@ -297,7 +351,7 @@ tests:
|
||||
apiVersion: apps/v1
|
||||
name: gitea-unittests-actions-act-runner
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].env[4]
|
||||
path: spec.template.spec.containers[0].env[1]
|
||||
value:
|
||||
name: GITEA_INSTANCE_URL
|
||||
value: "https://git.example.com:8443"
|
||||
@ -321,7 +375,7 @@ tests:
|
||||
value: "custom env value"
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.template.spec.containers[1].env[3]
|
||||
path: spec.template.spec.initContainers[1].env[0]
|
||||
value:
|
||||
name: "CUSTOM_ENV_NAME"
|
||||
value: "custom env value"
|
||||
@ -371,7 +425,7 @@ tests:
|
||||
name: gitea-unittests-actions-act-runner
|
||||
- contains:
|
||||
any: true
|
||||
path: spec.template.spec.containers[1].volumeMounts
|
||||
path: spec.template.spec.initContainers[1].volumeMounts
|
||||
content:
|
||||
mountPath: /mnt
|
||||
name: my-dind-volume
|
||||
|
||||
@ -31,6 +31,7 @@
|
||||
## @param statefulset.dind.extraVolumeMounts Allows mounting extra volumes in the Docker-in-Docker container
|
||||
## @param statefulset.dind.extraEnvs Allows adding custom environment variables, such as `DOCKER_IPTABLES_LEGACY`
|
||||
## @param statefulset.persistence.size Size for persistence to store act runner data
|
||||
## @param statefulset.securityContext Customize the SecurityContext
|
||||
## @param existingSecret Secret that contains the token
|
||||
## @param existingSecretKey Secret key
|
||||
## @param giteaRootURL URL the act_runner registers and connect with
|
||||
@ -45,6 +46,7 @@ statefulset:
|
||||
tolerations: []
|
||||
affinity: {}
|
||||
extraVolumes: []
|
||||
securityContext: {}
|
||||
|
||||
actRunner:
|
||||
registry: "docker.gitea.com"
|
||||
|
||||
Reference in New Issue
Block a user