From 647198ef99c5666464e58b8759a4f0f399261a78 Mon Sep 17 00:00:00 2001 From: SeanOMik Date: Tue, 4 Apr 2023 19:03:36 -0400 Subject: [PATCH] Use flux kustomization for metallb depends --- .../metallb/{ => app}/helm-release.yaml | 0 .../metallb/{ => app}/kustomization.yaml | 3 +- .../networking/metallb/app/namespace.yaml | 6 +++ .../metallb/config/kustomization.yaml | 4 ++ .../{ => config}/metallb-static-ips.yaml | 0 cluster/core/networking/metallb/ks.yaml | 38 +++++++++++++++++++ .../core/networking/metallb/namespace.yaml | 4 -- 7 files changed, 49 insertions(+), 6 deletions(-) rename cluster/core/networking/metallb/{ => app}/helm-release.yaml (100%) rename cluster/core/networking/metallb/{ => app}/kustomization.yaml (65%) create mode 100644 cluster/core/networking/metallb/app/namespace.yaml create mode 100644 cluster/core/networking/metallb/config/kustomization.yaml rename cluster/core/networking/metallb/{ => config}/metallb-static-ips.yaml (100%) create mode 100644 cluster/core/networking/metallb/ks.yaml delete mode 100644 cluster/core/networking/metallb/namespace.yaml diff --git a/cluster/core/networking/metallb/helm-release.yaml b/cluster/core/networking/metallb/app/helm-release.yaml similarity index 100% rename from cluster/core/networking/metallb/helm-release.yaml rename to cluster/core/networking/metallb/app/helm-release.yaml diff --git a/cluster/core/networking/metallb/kustomization.yaml b/cluster/core/networking/metallb/app/kustomization.yaml similarity index 65% rename from cluster/core/networking/metallb/kustomization.yaml rename to cluster/core/networking/metallb/app/kustomization.yaml index 046bf58..7b5e69b 100644 --- a/cluster/core/networking/metallb/kustomization.yaml +++ b/cluster/core/networking/metallb/app/kustomization.yaml @@ -2,5 +2,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - ./namespace.yaml -- ./helm-release.yaml -- ./metallb-static-ips.yaml \ No newline at end of file +- ./helm-release.yaml \ No newline at end of file diff --git a/cluster/core/networking/metallb/app/namespace.yaml b/cluster/core/networking/metallb/app/namespace.yaml new file mode 100644 index 0000000..9f5c4d1 --- /dev/null +++ b/cluster/core/networking/metallb/app/namespace.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: metallb-system + labels: + name: metallb-system \ No newline at end of file diff --git a/cluster/core/networking/metallb/config/kustomization.yaml b/cluster/core/networking/metallb/config/kustomization.yaml new file mode 100644 index 0000000..1230a99 --- /dev/null +++ b/cluster/core/networking/metallb/config/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- ./metallb-static-ips.yaml \ No newline at end of file diff --git a/cluster/core/networking/metallb/metallb-static-ips.yaml b/cluster/core/networking/metallb/config/metallb-static-ips.yaml similarity index 100% rename from cluster/core/networking/metallb/metallb-static-ips.yaml rename to cluster/core/networking/metallb/config/metallb-static-ips.yaml diff --git a/cluster/core/networking/metallb/ks.yaml b/cluster/core/networking/metallb/ks.yaml new file mode 100644 index 0000000..500a03a --- /dev/null +++ b/cluster/core/networking/metallb/ks.yaml @@ -0,0 +1,38 @@ +--- +apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 +kind: Kustomization +metadata: + name: cluster-core-metallb + namespace: flux-system +spec: + path: ./cluster/core/networking/metallb/app + prune: true + sourceRef: + kind: GitRepository + name: flux-system + healthChecks: + - apiVersion: helm.toolkit.fluxcd.io/v2beta1 + kind: HelmRelease + name: metallb + namespace: metallb-system + interval: 30m + retryInterval: 1m + timeout: 3m +--- +apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 +kind: Kustomization +metadata: + name: cluster-core-metallb-config + namespace: flux-system +spec: + dependsOn: + - name: cluster-apps-metallb + path: ./cluster/core/networking/metallb/config + prune: true + sourceRef: + kind: GitRepository + name: flux-system + wait: true + interval: 30m + retryInterval: 1m + timeout: 3m \ No newline at end of file diff --git a/cluster/core/networking/metallb/namespace.yaml b/cluster/core/networking/metallb/namespace.yaml deleted file mode 100644 index d5b0a9a..0000000 --- a/cluster/core/networking/metallb/namespace.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: metallb-system \ No newline at end of file