argocd: add Image Updater for auto-deploy on image push
- Install argocd-image-updater via Helm (wave 1) - Configure Forgejo registry (anonymous pulls) - Annotate apps for auto-update: api-gw, portfolio, management-service, queue-crd - Uses newest-build strategy for commit SHA tags
This commit is contained in:
@@ -0,0 +1,33 @@
|
|||||||
|
# ArgoCD Image Updater - auto-updates Application images from registry
|
||||||
|
# Watches forgejo.riotpiao.com for new image tags and updates Applications
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: argocd-image-updater
|
||||||
|
namespace: argocd
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
annotations:
|
||||||
|
argocd.argoproj.io/sync-wave: "1"
|
||||||
|
spec:
|
||||||
|
project: homelab
|
||||||
|
revisionHistoryLimit: 3
|
||||||
|
sources:
|
||||||
|
- repoURL: https://argoproj.github.io/argo-helm
|
||||||
|
chart: argocd-image-updater
|
||||||
|
targetRevision: "0.11.2"
|
||||||
|
helm:
|
||||||
|
valueFiles:
|
||||||
|
- $values/k8s/infra/argocd-image-updater/values.yaml
|
||||||
|
- repoURL: https://forgejo.riotpiao.com/rock/homelab.git
|
||||||
|
targetRevision: main
|
||||||
|
ref: values
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: argocd
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=false
|
||||||
@@ -86,6 +86,10 @@ metadata:
|
|||||||
namespace: argocd
|
namespace: argocd
|
||||||
annotations:
|
annotations:
|
||||||
argocd.argoproj.io/sync-wave: "6"
|
argocd.argoproj.io/sync-wave: "6"
|
||||||
|
# ArgoCD Image Updater - auto-update on new image push
|
||||||
|
argocd-image-updater.argoproj.io/image-list: op=forgejo.riotpiao.com/rock/kmsvc-manage
|
||||||
|
argocd-image-updater.argoproj.io/op.update-strategy: newest-build
|
||||||
|
argocd-image-updater.argoproj.io/write-back-method: argocd
|
||||||
spec:
|
spec:
|
||||||
project: homelab
|
project: homelab
|
||||||
source:
|
source:
|
||||||
@@ -107,6 +111,10 @@ metadata:
|
|||||||
namespace: argocd
|
namespace: argocd
|
||||||
annotations:
|
annotations:
|
||||||
argocd.argoproj.io/sync-wave: "7"
|
argocd.argoproj.io/sync-wave: "7"
|
||||||
|
# ArgoCD Image Updater - auto-update on new image push
|
||||||
|
argocd-image-updater.argoproj.io/image-list: svc=forgejo.riotpiao.com/rock/kmsvc-manage
|
||||||
|
argocd-image-updater.argoproj.io/svc.update-strategy: newest-build
|
||||||
|
argocd-image-updater.argoproj.io/write-back-method: argocd
|
||||||
spec:
|
spec:
|
||||||
project: homelab
|
project: homelab
|
||||||
source:
|
source:
|
||||||
|
|||||||
@@ -36,6 +36,10 @@ metadata:
|
|||||||
app.kubernetes.io/component: gateway
|
app.kubernetes.io/component: gateway
|
||||||
annotations:
|
annotations:
|
||||||
argocd.argoproj.io/sync-wave: "7"
|
argocd.argoproj.io/sync-wave: "7"
|
||||||
|
# ArgoCD Image Updater - auto-update on new image push
|
||||||
|
argocd-image-updater.argoproj.io/image-list: gw=forgejo.riotpiao.com/rock/api-gateway
|
||||||
|
argocd-image-updater.argoproj.io/gw.update-strategy: newest-build
|
||||||
|
argocd-image-updater.argoproj.io/write-back-method: argocd
|
||||||
spec:
|
spec:
|
||||||
project: homelab
|
project: homelab
|
||||||
revisionHistoryLimit: 3
|
revisionHistoryLimit: 3
|
||||||
|
|||||||
@@ -246,6 +246,10 @@ metadata:
|
|||||||
namespace: argocd
|
namespace: argocd
|
||||||
annotations:
|
annotations:
|
||||||
argocd.argoproj.io/sync-wave: "8"
|
argocd.argoproj.io/sync-wave: "8"
|
||||||
|
# ArgoCD Image Updater - auto-update on new image push
|
||||||
|
argocd-image-updater.argoproj.io/image-list: app=forgejo.riotpiao.com/rock/portfolio
|
||||||
|
argocd-image-updater.argoproj.io/app.update-strategy: newest-build
|
||||||
|
argocd-image-updater.argoproj.io/write-back-method: argocd
|
||||||
spec:
|
spec:
|
||||||
project: homelab
|
project: homelab
|
||||||
source:
|
source:
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
# ArgoCD Image Updater configuration
|
||||||
|
# Watches Forgejo registry and updates ArgoCD Applications with new image tags
|
||||||
|
|
||||||
|
config:
|
||||||
|
# Registry configuration - Forgejo allows anonymous pulls
|
||||||
|
registries:
|
||||||
|
- name: forgejo
|
||||||
|
api_url: https://forgejo.riotpiao.com
|
||||||
|
prefix: forgejo.riotpiao.com
|
||||||
|
default: true
|
||||||
|
insecure: false
|
||||||
|
|
||||||
|
# Log level
|
||||||
|
logLevel: debug
|
||||||
|
|
||||||
|
# ArgoCD API server
|
||||||
|
argocd:
|
||||||
|
grpcWeb: true
|
||||||
|
serverAddress: argocd-server.argocd.svc.cluster.local
|
||||||
|
insecure: true
|
||||||
|
plaintext: true
|
||||||
|
|
||||||
|
# Extra environment variables
|
||||||
|
extraEnv:
|
||||||
|
- name: ARGOCD_GRPC_WEB
|
||||||
|
value: "true"
|
||||||
|
|
||||||
|
# Resources
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
memory: 64Mi
|
||||||
|
limits:
|
||||||
|
cpu: 200m
|
||||||
|
memory: 128Mi
|
||||||
Reference in New Issue
Block a user