From 834cfabeeb176a1e6d96b8ebf6b71b1650c2642b Mon Sep 17 00:00:00 2001 From: SeanOMik Date: Tue, 4 Apr 2023 00:47:05 -0400 Subject: [PATCH] Add calico --- cluster/core/networking/calico/calico-helm.yaml | 15 +++++++++++++++ cluster/core/networking/calico/helm-repo.yaml | 8 ++++++++ cluster/core/networking/calico/kustomization.yaml | 7 +++++++ cluster/core/networking/calico/namespace.yaml | 9 +++++++++ cluster/core/networking/calico/tigera-helm.yaml | 15 +++++++++++++++ cluster/core/networking/kustomization.yaml | 1 + .../networking/metallb/metallb-static-ips.yaml | 5 ++++- 7 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 cluster/core/networking/calico/calico-helm.yaml create mode 100644 cluster/core/networking/calico/helm-repo.yaml create mode 100644 cluster/core/networking/calico/kustomization.yaml create mode 100644 cluster/core/networking/calico/namespace.yaml create mode 100644 cluster/core/networking/calico/tigera-helm.yaml diff --git a/cluster/core/networking/calico/calico-helm.yaml b/cluster/core/networking/calico/calico-helm.yaml new file mode 100644 index 0000000..79a4276 --- /dev/null +++ b/cluster/core/networking/calico/calico-helm.yaml @@ -0,0 +1,15 @@ +apiVersion: helm.toolkit.fluxcd.io/v2beta1 +kind: HelmRelease +metadata: + name: calico + namespace: calico-system +spec: + interval: 5m + chart: + spec: + chart: calico + version: 3.25.x + sourceRef: + kind: HelmRepository + name: calico-charts + namespace: flux-system diff --git a/cluster/core/networking/calico/helm-repo.yaml b/cluster/core/networking/calico/helm-repo.yaml new file mode 100644 index 0000000..773492d --- /dev/null +++ b/cluster/core/networking/calico/helm-repo.yaml @@ -0,0 +1,8 @@ +apiVersion: source.toolkit.fluxcd.io/v1beta2 +kind: HelmRepository +metadata: + name: calico-charts + namespace: flux-system +spec: + interval: 1m + url: https://docs.tigera.io/calico/charts \ No newline at end of file diff --git a/cluster/core/networking/calico/kustomization.yaml b/cluster/core/networking/calico/kustomization.yaml new file mode 100644 index 0000000..c53868a --- /dev/null +++ b/cluster/core/networking/calico/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- ./namespace.yaml +- ./helm-repo.yaml +- ./calico-helm.yaml +- ./tigera-helm.yaml \ No newline at end of file diff --git a/cluster/core/networking/calico/namespace.yaml b/cluster/core/networking/calico/namespace.yaml new file mode 100644 index 0000000..9b34994 --- /dev/null +++ b/cluster/core/networking/calico/namespace.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: calico-system +--- +apiVersion: v1 +kind: Namespace +metadata: + name: tigera-operator \ No newline at end of file diff --git a/cluster/core/networking/calico/tigera-helm.yaml b/cluster/core/networking/calico/tigera-helm.yaml new file mode 100644 index 0000000..67359d2 --- /dev/null +++ b/cluster/core/networking/calico/tigera-helm.yaml @@ -0,0 +1,15 @@ +apiVersion: helm.toolkit.fluxcd.io/v2beta1 +kind: HelmRelease +metadata: + name: tigera-operator + namespace: tigera-operator +spec: + interval: 5m + chart: + spec: + chart: calico + version: 3.25.x + sourceRef: + kind: HelmRepository + name: tigera-operator + namespace: flux-system diff --git a/cluster/core/networking/kustomization.yaml b/cluster/core/networking/kustomization.yaml index 37a9b9a..93ddbd4 100644 --- a/cluster/core/networking/kustomization.yaml +++ b/cluster/core/networking/kustomization.yaml @@ -2,4 +2,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - ./traefik +- ./calico - ./metallb \ No newline at end of file diff --git a/cluster/core/networking/metallb/metallb-static-ips.yaml b/cluster/core/networking/metallb/metallb-static-ips.yaml index e6e0e02..4b3f82a 100644 --- a/cluster/core/networking/metallb/metallb-static-ips.yaml +++ b/cluster/core/networking/metallb/metallb-static-ips.yaml @@ -5,7 +5,7 @@ metadata: namespace: metallb-system spec: addresses: - - 192.168.87.10-192.168.87.28 + - 192.168.87.10-192.168.87.28 autoAssign: true --- apiVersion: metallb.io/v1beta1 @@ -13,3 +13,6 @@ kind: L2Advertisement metadata: name: default namespace: metallb-system +spec: + ipaddresspools: + - static-ip-range