Browse Source

flux,zookeeper: add image update automation

main
Victor Roest 1 year ago
parent
commit
7e4ca3ee87
Signed by: 0x76 GPG Key ID: A3923C699D1A3BDA
  1. 2
      cluster/apps/presidential-paradise/zookeeper/deployment.yaml
  2. 22
      cluster/apps/presidential-paradise/zookeeper/image-updater.yaml
  3. 1
      cluster/apps/presidential-paradise/zookeeper/kustomization.yaml
  4. 24
      cluster/base/flux-system/image-update-automation.yaml
  5. 1
      cluster/base/flux-system/kustomization.yaml

2
cluster/apps/presidential-paradise/zookeeper/deployment.yaml

@ -23,7 +23,7 @@ spec:
spec:
containers:
- name: zookeeper
image: docker.io/0x76/zookeeper:latest
image: registry.xirion.net/library/zookeeper:0.2.0 # {"$imagepolicy": "presidential-paradise:zookeeper"}
ports:
- name: web
containerPort: 8085

22
cluster/apps/presidential-paradise/zookeeper/image-updater.yaml

@ -0,0 +1,22 @@
apiVersion: image.toolkit.fluxcd.io/v1beta1
kind: ImageRepository
metadata:
name: zookeeper
namespace: presidential-paradise
spec:
image: registry.xirion.net/library/zookeeper
interval: 1m0s
secretRef:
name: xirion-registry-creds
---
apiVersion: image.toolkit.fluxcd.io/v1beta1
kind: ImagePolicy
metadata:
name: zookeeper
namespace: presidential-paradise
spec:
imageRepositoryRef:
name: zookeeper
policy:
semver:
range: "*"

1
cluster/apps/presidential-paradise/zookeeper/kustomization.yaml

@ -2,6 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- external-secret.yaml
- image-updater.yaml
- deployment.yaml
- svc.yaml
- ingress.yaml

24
cluster/base/flux-system/image-update-automation.yaml

@ -0,0 +1,24 @@
apiVersion: image.toolkit.fluxcd.io/v1beta1
kind: ImageUpdateAutomation
metadata:
name: flux-system
namespace: flux-system
spec:
interval: 1m0s
sourceRef:
kind: GitRepository
name: flux-system
git:
checkout:
ref:
branch: main
commit:
author:
email: fluxcdbot@users.noreply.github.com
name: fluxcdbot
messageTemplate: '{{range .Updated.Images}}{{println .}}{{end}}'
push:
branch: main
update:
path: ./cluster/
strategy: Setters

1
cluster/base/flux-system/kustomization.yaml

@ -3,4 +3,5 @@ kind: Kustomization
resources:
- gotk-components.yaml
- gotk-sync.yaml
- image-update-automation.yaml
- charts