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 - name: WEBHOOK_TOKEN valueFrom: secretKeyRef: name: gitea-webhook-secret key: token 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