2021-12-25 00:39:40 +07:00
|
|
|
apiVersion: batch/v1
|
2023-11-27 00:41:38 +07:00
|
|
|
kind: Job
|
2021-12-25 00:39:40 +07:00
|
|
|
metadata:
|
2023-11-27 00:41:38 +07:00
|
|
|
name: gitea-config-{{ include (print $.Template.BasePath "/config-source.yaml") . | sha256sum | trunc 7 }}
|
2021-12-25 00:39:40 +07:00
|
|
|
namespace: {{ .Release.Namespace }}
|
|
|
|
annotations:
|
|
|
|
argocd.argoproj.io/sync-wave: "1"
|
|
|
|
spec:
|
2023-11-27 00:41:38 +07:00
|
|
|
backoffLimit: 3
|
|
|
|
template:
|
2021-12-25 00:39:40 +07:00
|
|
|
spec:
|
2023-11-27 00:41:38 +07:00
|
|
|
restartPolicy: Never
|
|
|
|
containers:
|
|
|
|
- name: apply
|
|
|
|
image: golang:1.19-alpine
|
|
|
|
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
|
|
|
|
workingDir: /go/src/gitea-config
|
|
|
|
command:
|
|
|
|
- sh
|
|
|
|
- -c
|
|
|
|
args:
|
|
|
|
- |
|
|
|
|
go get .
|
|
|
|
go run .
|
|
|
|
volumeMounts:
|
2022-03-24 09:54:26 +07:00
|
|
|
- name: source
|
2023-11-27 00:41:38 +07:00
|
|
|
mountPath: /go/src/gitea-config
|
|
|
|
volumes:
|
|
|
|
- name: source
|
|
|
|
configMap:
|
|
|
|
name: gitea-config-source
|