2021-12-25 00:39:40 +07:00
|
|
|
apiVersion: batch/v1
|
2022-05-08 20:59:50 +07:00
|
|
|
kind: CronJob
|
2021-12-25 00:39:40 +07:00
|
|
|
metadata:
|
2022-03-24 09:54:26 +07:00
|
|
|
name: gitea-config
|
2021-12-25 00:39:40 +07:00
|
|
|
namespace: {{ .Release.Namespace }}
|
|
|
|
annotations:
|
|
|
|
argocd.argoproj.io/sync-wave: "1"
|
|
|
|
spec:
|
2022-05-08 20:59:50 +07:00
|
|
|
schedule: '*/5 * * * *'
|
2022-07-20 23:12:01 +07:00
|
|
|
concurrencyPolicy: Forbid
|
2022-05-08 20:59:50 +07:00
|
|
|
jobTemplate:
|
2021-12-25 00:39:40 +07:00
|
|
|
spec:
|
2022-05-08 20:59:50 +07:00
|
|
|
backoffLimit: 3
|
|
|
|
template:
|
|
|
|
spec:
|
|
|
|
restartPolicy: Never
|
|
|
|
containers:
|
|
|
|
- name: apply
|
2022-12-29 23:22:47 +07:00
|
|
|
image: golang:1.19-alpine
|
2022-05-08 20:59:50 +07:00
|
|
|
env:
|
|
|
|
- name: GITEA_HOST
|
|
|
|
value: http://gitea-http:3000
|
|
|
|
- name: GITEA_USER
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: gitea-admin-secret
|
|
|
|
key: username
|
|
|
|
- name: GITEA_PASSWORD
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: gitea-admin-secret
|
|
|
|
key: password
|
2023-01-26 01:01:46 +07:00
|
|
|
- name: WEBHOOK_TOKEN
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: gitea-webhook-secret
|
|
|
|
key: token
|
2022-05-08 20:59:50 +07:00
|
|
|
workingDir: /go/src/gitea-config
|
|
|
|
command:
|
|
|
|
- sh
|
|
|
|
- -c
|
|
|
|
args:
|
|
|
|
- |
|
|
|
|
go get .
|
|
|
|
go run .
|
|
|
|
volumeMounts:
|
|
|
|
- name: source
|
|
|
|
mountPath: /go/src/gitea-config
|
|
|
|
volumes:
|
2022-03-24 09:54:26 +07:00
|
|
|
- name: source
|
2022-05-08 20:59:50 +07:00
|
|
|
configMap:
|
|
|
|
name: gitea-config-source
|