Browse Source

flux: shuffle image update automation to proper namespaces

main
Victor Roest 1 year ago
parent
commit
740e2b9198
Signed by: 0x76 GPG Key ID: A3923C699D1A3BDA
  1. 2
      cluster/apps/presidential-paradise/zookeeper/deployment.yaml
  2. 5
      cluster/base/flux-system/image-update-automation/image-update-automation.yaml
  3. 5
      cluster/base/flux-system/image-update-automation/kustomization.yaml
  4. 4
      cluster/base/flux-system/image-update-automation/zookeeper.yaml
  5. 3
      cluster/base/flux-system/kustomization.yaml
  6. 19
      cluster/base/flux-system/xirion-registry-creds.yaml

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

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

5
cluster/base/flux-system/image-update-automation.yaml → cluster/base/flux-system/image-update-automation/image-update-automation.yaml

@ -2,13 +2,12 @@ apiVersion: image.toolkit.fluxcd.io/v1beta1
kind: ImageUpdateAutomation
metadata:
name: flux-system
namespace: presidential-paradise
namespace: flux-system
spec:
interval: 1m0s
sourceRef:
kind: GitRepository
name: flux-system
namespace: flux-system
git:
checkout:
ref:
@ -21,5 +20,5 @@ spec:
push:
branch: main
update:
path: ./cluster/apps/presidential-paradise
path: ./cluster/
strategy: Setters

5
cluster/base/flux-system/image-update-automation/kustomization.yaml

@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- image-update-automation.yaml
- zookeeper.yaml

4
cluster/apps/presidential-paradise/zookeeper/image-updater.yaml → cluster/base/flux-system/image-update-automation/zookeeper.yaml

@ -2,7 +2,7 @@ apiVersion: image.toolkit.fluxcd.io/v1beta1
kind: ImageRepository
metadata:
name: zookeeper
namespace: presidential-paradise
namespace: flux-system
spec:
image: registry.xirion.net/library/zookeeper
interval: 1m0s
@ -13,7 +13,7 @@ apiVersion: image.toolkit.fluxcd.io/v1beta1
kind: ImagePolicy
metadata:
name: zookeeper
namespace: presidential-paradise
namespace: flux-system
spec:
imageRepositoryRef:
name: zookeeper

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

@ -3,5 +3,6 @@ kind: Kustomization
resources:
- gotk-components.yaml
- gotk-sync.yaml
- image-update-automation.yaml
- xirion-registry-creds.yaml
- image-update-automation
- charts

19
cluster/base/flux-system/xirion-registry-creds.yaml

@ -0,0 +1,19 @@
apiVersion: external-secrets.io/v1alpha1
kind: ExternalSecret
metadata:
name: xirion-registry-creds
namespace: flux-system
spec:
refreshInterval: "5m"
secretStoreRef:
name: vault
kind: ClusterSecretStore
target:
name: xirion-registry-creds
template:
type: kubernetes.io/dockerconfigjson
data:
- secretKey: .dockerconfigjson
remoteRef:
key: xirion-registry-creds
property: dockerconfigjson