From 89a7646085893c4d9c5759ca8369e112ceb48286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rcio=20Fernandes?= Date: Sun, 12 Jul 2026 11:54:03 +0000 Subject: [PATCH] add traefik to loadbalancer --- services/traefik-icarus/README.md | 9 --- .../deploy/flux/kustomization.yaml | 5 -- .../deploy/app/default/helm-release.yaml | 69 +++++++++++++++++++ .../deploy/app/default}/helm-repo.yaml | 0 .../app/{ => default}/kustomization.yaml | 0 services/traefik/deploy/app/helm-release.yaml | 31 --------- .../deploy/app/icarus}/helm-release.yaml | 0 .../deploy/app/{ => icarus}/helm-repo.yaml | 0 .../deploy/app/icarus}/kustomization.yaml | 0 .../flux/{app-sync.yaml => default-sync.yaml} | 3 +- .../deploy/flux/icarus-sync.yaml} | 3 +- .../traefik/deploy/flux/kustomization.yaml | 4 +- 12 files changed, 75 insertions(+), 49 deletions(-) delete mode 100644 services/traefik-icarus/README.md delete mode 100644 services/traefik-icarus/deploy/flux/kustomization.yaml create mode 100644 services/traefik/deploy/app/default/helm-release.yaml rename services/{traefik-icarus/deploy/app => traefik/deploy/app/default}/helm-repo.yaml (100%) rename services/traefik/deploy/app/{ => default}/kustomization.yaml (100%) delete mode 100644 services/traefik/deploy/app/helm-release.yaml rename services/{traefik-icarus/deploy/app => traefik/deploy/app/icarus}/helm-release.yaml (100%) rename services/traefik/deploy/app/{ => icarus}/helm-repo.yaml (100%) rename services/{traefik-icarus/deploy/app => traefik/deploy/app/icarus}/kustomization.yaml (100%) rename services/traefik/deploy/flux/{app-sync.yaml => default-sync.yaml} (76%) rename services/{traefik-icarus/deploy/flux/app-sync.yaml => traefik/deploy/flux/icarus-sync.yaml} (75%) diff --git a/services/traefik-icarus/README.md b/services/traefik-icarus/README.md deleted file mode 100644 index 0224baa..0000000 --- a/services/traefik-icarus/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# traefik - -## Setup - -Using flux for reconciliation. - -``` bash -kubectl kustomize ./deploy/flux | kubectl apply -f - -``` diff --git a/services/traefik-icarus/deploy/flux/kustomization.yaml b/services/traefik-icarus/deploy/flux/kustomization.yaml deleted file mode 100644 index f20f77c..0000000 --- a/services/traefik-icarus/deploy/flux/kustomization.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -namespace: traefik-icarus -resources: - - app-sync.yaml diff --git a/services/traefik/deploy/app/default/helm-release.yaml b/services/traefik/deploy/app/default/helm-release.yaml new file mode 100644 index 0000000..35be31d --- /dev/null +++ b/services/traefik/deploy/app/default/helm-release.yaml @@ -0,0 +1,69 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: traefik +spec: + + releaseName: traefik + interval: 40h + chart: + spec: + chart: traefik + version: 40.x.x + sourceRef: + kind: HelmRepository + name: traefik + namespace: kube-system + interval: 40h + values: + + nodeSelector: + kubernetes.io/hostname: casa-mini-minion-01 + tolerations: + - key: "infra.limbosolutions.com/dedicated" + operator: "Equal" + value: "casa-mini-minion-01" + effect: "NoSchedule" + + ingressClass: + enabled: true + isDefaultClass: true + name: traefik + + service: + enabled: true + type: LoadBalancer + spec: + externalTrafficPolicy: Cluster + loadBalancerIP: 192.168.14.200 + + ports: + web: + port: 80 + exposedPort: 80 + expose: + default: true + protocol: TCP + websecure: + port: 443 + exposedPort: 443 + expose: + default: true + protocol: TCP + + providers: + kubernetesCRD: + enabled: true + allowCrossNamespace: false + namespaces: [] + ingressClass: traefik-icarus + kubernetesIngress: + enabled: true + ingressClass: traefik-icarus + + additionalArguments: + - "--providers.kubernetesingress.ingressclass=traefik" + - "--providers.kubernetescrd.ingressClass=traefik" + - "--providers.kubernetescrd.allowEmptyServices=false" + - "--providers.kubernetesingress.ingressendpoint.ip=192.168.14.200" + diff --git a/services/traefik-icarus/deploy/app/helm-repo.yaml b/services/traefik/deploy/app/default/helm-repo.yaml similarity index 100% rename from services/traefik-icarus/deploy/app/helm-repo.yaml rename to services/traefik/deploy/app/default/helm-repo.yaml diff --git a/services/traefik/deploy/app/kustomization.yaml b/services/traefik/deploy/app/default/kustomization.yaml similarity index 100% rename from services/traefik/deploy/app/kustomization.yaml rename to services/traefik/deploy/app/default/kustomization.yaml diff --git a/services/traefik/deploy/app/helm-release.yaml b/services/traefik/deploy/app/helm-release.yaml deleted file mode 100644 index 8dd982e..0000000 --- a/services/traefik/deploy/app/helm-release.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: helm.toolkit.fluxcd.io/v2 -kind: HelmRelease -metadata: - name: traefik -spec: - - releaseName: traefik - interval: 40h - chart: - spec: - chart: traefik - version: 40.x.x - sourceRef: - kind: HelmRepository - name: traefik - namespace: kube-system - interval: 40h - values: - - nodeSelector: - kubernetes.io/hostname: casa-mini-minion-01 - tolerations: - - key: "infra.limbosolutions.com/dedicated" - operator: "Equal" - value: "casa-mini-minion-01" - effect: "NoSchedule" - - ingressClass: - enabled: true - isDefaultClass: true - name: traefik diff --git a/services/traefik-icarus/deploy/app/helm-release.yaml b/services/traefik/deploy/app/icarus/helm-release.yaml similarity index 100% rename from services/traefik-icarus/deploy/app/helm-release.yaml rename to services/traefik/deploy/app/icarus/helm-release.yaml diff --git a/services/traefik/deploy/app/helm-repo.yaml b/services/traefik/deploy/app/icarus/helm-repo.yaml similarity index 100% rename from services/traefik/deploy/app/helm-repo.yaml rename to services/traefik/deploy/app/icarus/helm-repo.yaml diff --git a/services/traefik-icarus/deploy/app/kustomization.yaml b/services/traefik/deploy/app/icarus/kustomization.yaml similarity index 100% rename from services/traefik-icarus/deploy/app/kustomization.yaml rename to services/traefik/deploy/app/icarus/kustomization.yaml diff --git a/services/traefik/deploy/flux/app-sync.yaml b/services/traefik/deploy/flux/default-sync.yaml similarity index 76% rename from services/traefik/deploy/flux/app-sync.yaml rename to services/traefik/deploy/flux/default-sync.yaml index 0b86ee7..0e708c9 100644 --- a/services/traefik/deploy/flux/app-sync.yaml +++ b/services/traefik/deploy/flux/default-sync.yaml @@ -2,12 +2,13 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: name: traefik + namespace: traefik spec: interval: 1m sourceRef: kind: GitRepository name: casa namespace: casa-limbosolutions-com - path: services/traefik/deploy/app + path: services/traefik/deploy/app/default prune: true diff --git a/services/traefik-icarus/deploy/flux/app-sync.yaml b/services/traefik/deploy/flux/icarus-sync.yaml similarity index 75% rename from services/traefik-icarus/deploy/flux/app-sync.yaml rename to services/traefik/deploy/flux/icarus-sync.yaml index 6250fd4..ee0cce8 100644 --- a/services/traefik-icarus/deploy/flux/app-sync.yaml +++ b/services/traefik/deploy/flux/icarus-sync.yaml @@ -2,11 +2,12 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: name: traefik-icarus + namespace: traefik-icarus spec: interval: 1m sourceRef: kind: GitRepository name: casa namespace: casa-limbosolutions-com - path: services/traefik-icarus/deploy/app + path: services/traefik/deploy/app/icarus prune: true diff --git a/services/traefik/deploy/flux/kustomization.yaml b/services/traefik/deploy/flux/kustomization.yaml index 92901a2..84aaf0c 100644 --- a/services/traefik/deploy/flux/kustomization.yaml +++ b/services/traefik/deploy/flux/kustomization.yaml @@ -1,5 +1,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -namespace: kube-system resources: - - app-sync.yaml + - default-sync.yaml + - icarus-sync.yaml