khuedoan-homelab/platform/gitea/templates/config-job.yaml
Khue Doan b98060294d refactor!: remove Tekton
Replaced by Woodpecker CI. It turns out I don't need that much power
from Tekton's flexibility, so it's not worth the maintenance overhead
for my specific use case at home.
2024-01-15 10:55:29 +07:00

44 lines
1.1 KiB
YAML

apiVersion: batch/v1
kind: Job
metadata:
name: gitea-config-{{ include (print $.Template.BasePath "/config-source.yaml") . | sha256sum | trunc 7 }}
namespace: {{ .Release.Namespace }}
annotations:
argocd.argoproj.io/sync-wave: "1"
spec:
backoffLimit: 3
template:
spec:
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:
- name: source
mountPath: /go/src/gitea-config
volumes:
- name: source
configMap:
name: gitea-config-source