From d81b83c2435ed8f98f71c7ef48eb0f5955b8732f Mon Sep 17 00:00:00 2001 From: Vegard Hagen Date: Sat, 7 Jan 2023 15:19:10 +0100 Subject: [PATCH] feat(metallb): Installing MetalLB using ArgoCD --- infra/argocd/applications.yaml | 6 ++---- infra/argocd/infrastructure.yaml | 18 ++++++++++++++++++ infra/argocd/kustomization.yaml | 1 + infra/kustomization.yaml | 5 ----- infra/metallb.yaml | 21 +++++++++++++++++++++ infra/metallb/kustomization.yaml | 1 - 6 files changed, 42 insertions(+), 10 deletions(-) create mode 100644 infra/argocd/infrastructure.yaml delete mode 100644 infra/kustomization.yaml create mode 100644 infra/metallb.yaml diff --git a/infra/argocd/applications.yaml b/infra/argocd/applications.yaml index 46a5397..517dba3 100644 --- a/infra/argocd/applications.yaml +++ b/infra/argocd/applications.yaml @@ -12,9 +12,7 @@ spec: repoURL: https://github.com/vehagn/homelab targetRevision: HEAD destination: - namespace: applications name: in-cluster syncPolicy: - automated: {} - syncOptions: - - CreateNamespace=true \ No newline at end of file + automated: + selfHeal: true \ No newline at end of file diff --git a/infra/argocd/infrastructure.yaml b/infra/argocd/infrastructure.yaml new file mode 100644 index 0000000..2296b6f --- /dev/null +++ b/infra/argocd/infrastructure.yaml @@ -0,0 +1,18 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: infra + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: infra + source: + path: infra + repoURL: https://github.com/vehagn/homelab + targetRevision: HEAD + destination: + name: in-cluster + syncPolicy: + automated: + selfHeal: true \ No newline at end of file diff --git a/infra/argocd/kustomization.yaml b/infra/argocd/kustomization.yaml index 02b7dc3..1c4b9cf 100644 --- a/infra/argocd/kustomization.yaml +++ b/infra/argocd/kustomization.yaml @@ -6,6 +6,7 @@ resources: - namespace.yaml - https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml - ingress.yaml + - infra.yaml - applications.yaml # Let Traefik manage TLS-termination diff --git a/infra/kustomization.yaml b/infra/kustomization.yaml deleted file mode 100644 index 2044bac..0000000 --- a/infra/kustomization.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -resources: - - metallb \ No newline at end of file diff --git a/infra/metallb.yaml b/infra/metallb.yaml new file mode 100644 index 0000000..e39defd --- /dev/null +++ b/infra/metallb.yaml @@ -0,0 +1,21 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: metallb + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + path: infra/metallb + repoURL: https://github.com/vehagn/homelab + targetRevision: HEAD + destination: + namespace: metallb-system + name: in-cluster + syncPolicy: + automated: + selfHeal: true + syncOptions: + - CreateNamespace=true diff --git a/infra/metallb/kustomization.yaml b/infra/metallb/kustomization.yaml index cf9fdc9..9272ded 100644 --- a/infra/metallb/kustomization.yaml +++ b/infra/metallb/kustomization.yaml @@ -1,6 +1,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization - namespace: metallb-system resources: