Restructure the argocd-deploy-key-init job so each step (known hosts, deploy key registration, secret creation) is independently idempotent. Add ssh-keyscan of Forgejo host key and patch ArgoCD known hosts ConfigMap. Use kubectl apply with inline YAML to create the repo secret with the argocd label in a single atomic step. Switch images from bitnami/kubectl to alpine/k8s. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
23 lines
420 B
YAML
23 lines
420 B
YAML
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRole
|
|
metadata:
|
|
annotations:
|
|
a8r.io/repository: ssh://git@git.tr1ceracop.de:222/gitea_admin/k8s-and-chill.git
|
|
name: argocd-deploy-key-init
|
|
namespace: forgejo
|
|
rules:
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- secrets
|
|
verbs:
|
|
- get
|
|
- create
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- configmaps
|
|
verbs:
|
|
- get
|
|
- patch
|