diff --git a/cluster/apps/presidential-paradise/zookeeper/deployment.yaml b/cluster/apps/presidential-paradise/zookeeper/deployment.yaml index 3dff301..5054c40 100644 --- a/cluster/apps/presidential-paradise/zookeeper/deployment.yaml +++ b/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 diff --git a/cluster/base/flux-system/image-update-automation.yaml b/cluster/base/flux-system/image-update-automation/image-update-automation.yaml similarity index 81% rename from cluster/base/flux-system/image-update-automation.yaml rename to cluster/base/flux-system/image-update-automation/image-update-automation.yaml index 85d3e3e..2c8d235 100644 --- a/cluster/base/flux-system/image-update-automation.yaml +++ b/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 diff --git a/cluster/base/flux-system/image-update-automation/kustomization.yaml b/cluster/base/flux-system/image-update-automation/kustomization.yaml new file mode 100644 index 0000000..42c052f --- /dev/null +++ b/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 diff --git a/cluster/apps/presidential-paradise/zookeeper/image-updater.yaml b/cluster/base/flux-system/image-update-automation/zookeeper.yaml similarity index 84% rename from cluster/apps/presidential-paradise/zookeeper/image-updater.yaml rename to cluster/base/flux-system/image-update-automation/zookeeper.yaml index e8cebaf..6c95f6d 100644 --- a/cluster/apps/presidential-paradise/zookeeper/image-updater.yaml +++ b/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 diff --git a/cluster/base/flux-system/kustomization.yaml b/cluster/base/flux-system/kustomization.yaml index e57a2e4..fb0f20c 100644 --- a/cluster/base/flux-system/kustomization.yaml +++ b/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 diff --git a/cluster/base/flux-system/xirion-registry-creds.yaml b/cluster/base/flux-system/xirion-registry-creds.yaml new file mode 100644 index 0000000..72503eb --- /dev/null +++ b/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