diff --git a/clusters/my-cluster/apps.yaml b/clusters/my-cluster/apps.yaml index 34c6e98..d3e6fdf 100644 --- a/clusters/my-cluster/apps.yaml +++ b/clusters/my-cluster/apps.yaml @@ -6,6 +6,8 @@ metadata: namespace: flux-system spec: interval: 10m0s + dependsOn: + - name: infra-configs sourceRef: kind: GitRepository name: flux-system diff --git a/clusters/my-cluster/infrastructure.yaml b/clusters/my-cluster/infrastructure.yaml new file mode 100644 index 0000000..b6f9d2f --- /dev/null +++ b/clusters/my-cluster/infrastructure.yaml @@ -0,0 +1,42 @@ +--- +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: infra-controllers + namespace: flux-system +spec: + interval: 1h + retryInterval: 1m + timeout: 5m + sourceRef: + kind: GitRepository + name: flux-system + path: ./infrastructure/controllers + prune: true + wait: true +--- +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: infra-configs + namespace: flux-system +spec: + dependsOn: + - name: infra-controllers + interval: 1h + retryInterval: 1m + timeout: 5m + sourceRef: + kind: GitRepository + name: flux-system + path: ./infrastructure/configs + prune: true + patches: + - patch: | + - op: replace + path: /spec/addresses + value: + - 10.100.100.240-10.100.100.250 + target: + kind: IPAddressPool + name: first-pool diff --git a/clusters/my-cluster/metallb-system/ip-address-pool.yaml b/infrastructure/configs/ip-address-pool.yaml similarity index 100% rename from clusters/my-cluster/metallb-system/ip-address-pool.yaml rename to infrastructure/configs/ip-address-pool.yaml diff --git a/infrastructure/configs/kustomization.yaml b/infrastructure/configs/kustomization.yaml new file mode 100644 index 0000000..89fbc1f --- /dev/null +++ b/infrastructure/configs/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ip-address-pool.yaml + - l2-advertisement.yaml diff --git a/clusters/my-cluster/metallb-system/l2-advertisement.yaml b/infrastructure/configs/l2-advertisement.yaml similarity index 100% rename from clusters/my-cluster/metallb-system/l2-advertisement.yaml rename to infrastructure/configs/l2-advertisement.yaml diff --git a/apps/metallb-system/kustomization.yaml b/infrastructure/controllers/metallb-system/kustomization.yaml similarity index 100% rename from apps/metallb-system/kustomization.yaml rename to infrastructure/controllers/metallb-system/kustomization.yaml diff --git a/apps/metallb-system/metallb-native.yaml b/infrastructure/controllers/metallb-system/metallb-native.yaml similarity index 100% rename from apps/metallb-system/metallb-native.yaml rename to infrastructure/controllers/metallb-system/metallb-native.yaml