From d265a4d644cdef8aee4b154cb25063a412beeb44 Mon Sep 17 00:00:00 2001 From: Vegard Hagen Date: Mon, 9 Jan 2023 19:33:55 +0100 Subject: [PATCH] feat(traefik): Adding Traefik using ArgoCD --- infra/argocd/infrastructure.yaml | 3 +++ infra/traefikApp.yaml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 infra/traefikApp.yaml diff --git a/infra/argocd/infrastructure.yaml b/infra/argocd/infrastructure.yaml index 7d76967..3fcc46d 100644 --- a/infra/argocd/infrastructure.yaml +++ b/infra/argocd/infrastructure.yaml @@ -6,6 +6,7 @@ metadata: spec: sourceRepos: - 'https://github.com/vehagn/*' + - 'https://helm.traefik.io/*' destinations: - namespace: 'argocd' server: '*' @@ -13,6 +14,8 @@ spec: server: '*' - namespace: 'metallb-system' server: '*' + - namespace: 'traefik-system' + server: '*' clusterResourceWhitelist: - group: '*' kind: '*' diff --git a/infra/traefikApp.yaml b/infra/traefikApp.yaml new file mode 100644 index 0000000..e891456 --- /dev/null +++ b/infra/traefikApp.yaml @@ -0,0 +1,31 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: traefik + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: infrastructure + source: + chart: traefik + repoURL: https://helm.traefik.io/traefik + targetRevision: 20.7.0 + helm: + #parameters: + # - name: providers.kubernetesCRD.allowCrossNamespace + # value: "true" + # - name: additionalArguments + # value: "--api.insecure" + # - name: persistence.enabled + # value: "true" + valueFiles: + - https://raw.githubusercontent.com/vehagn/homelab/main/helm/traefik-values.yaml + destination: + namespace: traefik-system + name: in-cluster + syncPolicy: + automated: + selfHeal: true + syncOptions: + - CreateNamespace=true