flux,zookeeper: add image update automation

This commit is contained in:
Vivian 2021-10-31 12:37:28 +01:00
parent ce8d40fb8a
commit 7e4ca3ee87
No known key found for this signature in database
GPG key ID: A3923C699D1A3BDA
5 changed files with 49 additions and 1 deletions

View file

@ -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

View file

@ -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: "*"

View file

@ -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

View file

@ -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

View file

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