fe9d867a87
- Item 8: gitea-registry imagePullSecret in zip-enrichment, holidays, air-quality, docs-site namespaces (closes leeworks-agents/api-company#58) - Item 9: gitea-image-automation-token in flux-system with write:repository scope for Flux ImageUpdateAutomation (closes leeworks-agents/api-company#57) - Wire gitea-image-automation-token as push.secretRef in imageupdateautomation.yaml - Update dependency order and item count from seven to nine
40 lines
1.3 KiB
YAML
40 lines
1.3 KiB
YAML
# ImageUpdateAutomation: when an ImagePolicy selects a new tag, this object
|
|
# instructs Flux to open a commit on the api-company repo updating the
|
|
# image reference in the relevant HelmRelease values.
|
|
#
|
|
# The GitRepository used here is the api-company source (flux-system/api-company).
|
|
# Flux needs write access; create the token secret first:
|
|
# kubectl create secret generic gitea-image-automation-token \
|
|
# -n flux-system \
|
|
# --from-literal=username=leeworks-agents \
|
|
# --from-literal=password=<TOKEN_WITH_WRITE_REPO>
|
|
# Then patch the api-company GitRepository to reference it (or reuse
|
|
# gitea-leeworks-agents-token if that token also has write:repository scope).
|
|
apiVersion: image.toolkit.fluxcd.io/v1beta2
|
|
kind: ImageUpdateAutomation
|
|
metadata:
|
|
name: api-company
|
|
namespace: flux-system
|
|
spec:
|
|
interval: 10m
|
|
sourceRef:
|
|
kind: GitRepository
|
|
name: api-company
|
|
git:
|
|
checkout:
|
|
ref:
|
|
branch: main
|
|
commit:
|
|
author:
|
|
email: agent@leeworks.dev
|
|
name: Flux Image Automation
|
|
messageTemplate: |
|
|
chore(image): update {{range .Updated.Images}}{{.Repository}}:{{.NewTag}} {{end}}
|
|
push:
|
|
branch: main
|
|
secretRef:
|
|
name: gitea-image-automation-token # must pre-exist in flux-system ns — see docs/secrets-checklist.md item 9
|
|
update:
|
|
path: ./flux
|
|
strategy: Setters
|