From 83e66889f2f653b04cfc9b1728c50ad6b0d5f933 Mon Sep 17 00:00:00 2001 From: Thibault Raquet Date: Thu, 26 Sep 2024 08:06:46 +0000 Subject: [PATCH 01/19] Develop --- .../{teams-alert.yaml => alerts.yaml} | 71 ++++++++++--------- .../flux-resources/kustomization.yaml | 2 +- 2 files changed, 39 insertions(+), 34 deletions(-) rename infrastructure/flux-resources/{teams-alert.yaml => alerts.yaml} (79%) diff --git a/infrastructure/flux-resources/teams-alert.yaml b/infrastructure/flux-resources/alerts.yaml similarity index 79% rename from infrastructure/flux-resources/teams-alert.yaml rename to infrastructure/flux-resources/alerts.yaml index 4d811da..c1ef9f1 100644 --- a/infrastructure/flux-resources/teams-alert.yaml +++ b/infrastructure/flux-resources/alerts.yaml @@ -1,33 +1,38 @@ ---- -apiVersion: notification.toolkit.fluxcd.io/v1beta3 -kind: Provider -metadata: - name: msteams - namespace: flux-system -spec: - type: msteams - channel: "Flux CD - LDC_WEB" - secretRef: - name: msteams-url - ---- -apiVersion: notification.toolkit.fluxcd.io/v1beta3 -kind: Alert -metadata: - name: msteams - namespace: flux-system -spec: - providerRef: - name: msteams - eventSeverity: info - eventSources: - - kind: GitRepository - name: '*' - - kind: Kustomization - name: '*' - - kind: HelmRepository - name: '*' - - kind: HelmRelease - name: '*' - exclusionList: - - "^Dependencies.*" +--- +apiVersion: notification.toolkit.fluxcd.io/v1beta3 +kind: Provider +metadata: + name: msteams + namespace: flux-system +spec: + type: msteams + channel: "Flux CD - LDC_WEB" + secretRef: + name: msteams-url + +--- +apiVersion: notification.toolkit.fluxcd.io/v1beta3 +kind: Alert +metadata: + name: msteams + namespace: flux-system +spec: + summary: "LDC-WEB K8S NOTIFICATION" + eventMetadata: + env: ${CI_ENVIRONMENT_NAME} + cluster: ${KUBERNETES_SERVER_API} + region: ${KUBERNETES_REGION} + providerRef: + name: msteams + eventSeverity: info + exclusionList: + - "^Dependencies.*" + eventSources: + - kind: GitRepository + name: '*' + - kind: Kustomization + name: '*' + - kind: HelmRepository + name: '*' + - kind: HelmRelease + name: '*' diff --git a/infrastructure/flux-resources/kustomization.yaml b/infrastructure/flux-resources/kustomization.yaml index b384292..31fd06c 100644 --- a/infrastructure/flux-resources/kustomization.yaml +++ b/infrastructure/flux-resources/kustomization.yaml @@ -1,4 +1,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - teams-alert.yaml + - alerts.yaml From 182adbfe2c282e18ac78618c756af2ab077f0edf Mon Sep 17 00:00:00 2001 From: "noah.lancien" Date: Fri, 27 Sep 2024 15:27:20 +0000 Subject: [PATCH 02/19] Update config.yaml to add loue-action-reboisement --- .gitlab/agents/prod-k8s-ldc-web/config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab/agents/prod-k8s-ldc-web/config.yaml b/.gitlab/agents/prod-k8s-ldc-web/config.yaml index cdc5ecc..4783169 100644 --- a/.gitlab/agents/prod-k8s-ldc-web/config.yaml +++ b/.gitlab/agents/prod-k8s-ldc-web/config.yaml @@ -24,6 +24,7 @@ ci_access: - id: ldc-web/projets/les-fermiers-snv - id: ldc-web/projets/lionor - id: ldc-web/projets/loue + - id: ldc-web/projets/loue-action-reboisement - id: ldc-web/projets/loue-magie-de-noel - id: ldc-web/projets/mas-d-auge - id: ldc-web/projets/matines From 0b47033805f80ef4453c9705fef10ed404f9a32d Mon Sep 17 00:00:00 2001 From: Vincent BRIDIER Date: Tue, 8 Oct 2024 13:53:05 +0000 Subject: [PATCH 03/19] Add Auguste Lambert to gitlab agent --- .gitlab/agents/prod-k8s-ldc-web/config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab/agents/prod-k8s-ldc-web/config.yaml b/.gitlab/agents/prod-k8s-ldc-web/config.yaml index 4783169..1000766 100644 --- a/.gitlab/agents/prod-k8s-ldc-web/config.yaml +++ b/.gitlab/agents/prod-k8s-ldc-web/config.yaml @@ -1,6 +1,7 @@ ci_access: projects: - id: ldc-web/projets/agis + - id: ldc-web/projets/auguste-lambert - id: ldc-web/projets/crm - id: ldc-web/projets/coupe-de-france-de-la-volaille - id: ldc-web/projets/domaine-de-lanvaux From b80de5431a922d9e1dfd49105d41ee8ee3991d8e Mon Sep 17 00:00:00 2001 From: Vincent BRIDIER Date: Thu, 10 Oct 2024 13:04:22 +0000 Subject: [PATCH 04/19] feat: Add Maitre CoQ into Gitlab agent --- .gitlab/agents/prod-k8s-ldc-web/config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab/agents/prod-k8s-ldc-web/config.yaml b/.gitlab/agents/prod-k8s-ldc-web/config.yaml index 1000766..e12d696 100644 --- a/.gitlab/agents/prod-k8s-ldc-web/config.yaml +++ b/.gitlab/agents/prod-k8s-ldc-web/config.yaml @@ -27,6 +27,7 @@ ci_access: - id: ldc-web/projets/loue - id: ldc-web/projets/loue-action-reboisement - id: ldc-web/projets/loue-magie-de-noel + - id: ldc-web/projets/maitre-coq - id: ldc-web/projets/mas-d-auge - id: ldc-web/projets/matines - id: ldc-web/projets/nature-and-respect From 880eeaae112ee215bb6ac9418b280762a1ac518c Mon Sep 17 00:00:00 2001 From: "karl.muller" Date: Fri, 27 Dec 2024 13:58:28 +0000 Subject: [PATCH 05/19] Update config.yaml for gen-game-web-prize-draw --- .gitlab/agents/prod-k8s-ldc-web/config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab/agents/prod-k8s-ldc-web/config.yaml b/.gitlab/agents/prod-k8s-ldc-web/config.yaml index e12d696..b8960cd 100644 --- a/.gitlab/agents/prod-k8s-ldc-web/config.yaml +++ b/.gitlab/agents/prod-k8s-ldc-web/config.yaml @@ -13,6 +13,7 @@ ci_access: - id: ldc-web/projets/gen-game-web-instances/normandie - id: ldc-web/projets/gen-game-web-instances/reghalal-jeu - id: ldc-web/projets/gen-game-web-instances/tregalette-chandleur-2024 + - id: ldc-web/projets/gen-game-web-prize-draw - id: ldc-web/projets/id-halal - id: ldc-web/projets/jeusselin - id: ldc-web/projets/l-hours From b7333397a0b7973ba582b863081bedf8cf54f71e Mon Sep 17 00:00:00 2001 From: "noah.lancien" Date: Wed, 8 Jan 2025 13:25:43 +0000 Subject: [PATCH 06/19] Added Medina to gitlab agents config.yaml --- .gitlab/agents/prod-k8s-ldc-web/config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab/agents/prod-k8s-ldc-web/config.yaml b/.gitlab/agents/prod-k8s-ldc-web/config.yaml index b8960cd..555f740 100644 --- a/.gitlab/agents/prod-k8s-ldc-web/config.yaml +++ b/.gitlab/agents/prod-k8s-ldc-web/config.yaml @@ -31,6 +31,7 @@ ci_access: - id: ldc-web/projets/maitre-coq - id: ldc-web/projets/mas-d-auge - id: ldc-web/projets/matines + - id: ldc-web/projets/medina - id: ldc-web/projets/nature-and-respect - id: ldc-web/projets/nature-eleveurs - id: ldc-web/projets/op-insta-instances/le-gaulois From a490ccd10074ba232fc199bb3b7524fa4d76961b Mon Sep 17 00:00:00 2001 From: Vincent BRIDIER Date: Tue, 21 Jan 2025 16:19:53 +0000 Subject: [PATCH 07/19] Add parc auto to gitlab agent --- .gitlab/agents/prod-k8s-ldc-web/config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab/agents/prod-k8s-ldc-web/config.yaml b/.gitlab/agents/prod-k8s-ldc-web/config.yaml index 555f740..c62c890 100644 --- a/.gitlab/agents/prod-k8s-ldc-web/config.yaml +++ b/.gitlab/agents/prod-k8s-ldc-web/config.yaml @@ -36,6 +36,7 @@ ci_access: - id: ldc-web/projets/nature-eleveurs - id: ldc-web/projets/op-insta-instances/le-gaulois - id: ldc-web/projets/ovoteam + - id: ldc-web/projets/parc-auto - id: ldc-web/projets/poule-et-toque - id: ldc-web/projets/prims - id: ldc-web/projets/qrcollector/qrcollector-back From 1c55427cac9bcdac39e047f2c7bd95ea685aff9c Mon Sep 17 00:00:00 2001 From: Vincent BRIDIER Date: Fri, 24 Jan 2025 16:24:07 +0000 Subject: [PATCH 08/19] Add boutique-cnc-sable into gitlab agent --- .gitlab/agents/prod-k8s-ldc-web/config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab/agents/prod-k8s-ldc-web/config.yaml b/.gitlab/agents/prod-k8s-ldc-web/config.yaml index c62c890..c6f0611 100644 --- a/.gitlab/agents/prod-k8s-ldc-web/config.yaml +++ b/.gitlab/agents/prod-k8s-ldc-web/config.yaml @@ -2,6 +2,7 @@ ci_access: projects: - id: ldc-web/projets/agis - id: ldc-web/projets/auguste-lambert + - id: ldc-web/projets/boutique-cnc-sable - id: ldc-web/projets/crm - id: ldc-web/projets/coupe-de-france-de-la-volaille - id: ldc-web/projets/domaine-de-lanvaux From 2e20c689167c50f6b442e6bff1b2de85e5920e81 Mon Sep 17 00:00:00 2001 From: Vincent BRIDIER Date: Wed, 5 Feb 2025 18:15:22 +0000 Subject: [PATCH 09/19] Add cailles-robin to gitlab agent --- .gitlab/agents/prod-k8s-ldc-web/config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab/agents/prod-k8s-ldc-web/config.yaml b/.gitlab/agents/prod-k8s-ldc-web/config.yaml index c6f0611..2a2f7a6 100644 --- a/.gitlab/agents/prod-k8s-ldc-web/config.yaml +++ b/.gitlab/agents/prod-k8s-ldc-web/config.yaml @@ -3,6 +3,7 @@ ci_access: - id: ldc-web/projets/agis - id: ldc-web/projets/auguste-lambert - id: ldc-web/projets/boutique-cnc-sable + - id: ldc-web/projets/cailles-robin - id: ldc-web/projets/crm - id: ldc-web/projets/coupe-de-france-de-la-volaille - id: ldc-web/projets/domaine-de-lanvaux From db5e7ea637b4f2dc513013fd51daace7f3d0a253 Mon Sep 17 00:00:00 2001 From: "noah.lancien" Date: Mon, 10 Feb 2025 13:35:33 +0000 Subject: [PATCH 10/19] Added traditions-asie to gitlab agents config.yaml --- .gitlab/agents/prod-k8s-ldc-web/config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab/agents/prod-k8s-ldc-web/config.yaml b/.gitlab/agents/prod-k8s-ldc-web/config.yaml index 2a2f7a6..3436f21 100644 --- a/.gitlab/agents/prod-k8s-ldc-web/config.yaml +++ b/.gitlab/agents/prod-k8s-ldc-web/config.yaml @@ -55,6 +55,7 @@ ci_access: - id: ldc-web/projets/showroom-bo-instances/nature-and-respect - id: ldc-web/projets/store-ldc - id: ldc-web/projets/support-web + - id: ldc-web/projets/traditions-asie - id: ldc-web/projets/tregalette - id: ldc-web/projets/vdme - id: ldc-web/projets/volena From e719152cdc19960830a02b62a594a217a757620c Mon Sep 17 00:00:00 2001 From: Vincent BRIDIER Date: Mon, 10 Feb 2025 13:49:05 +0000 Subject: [PATCH 11/19] feat: Remove QRCollector Front --- .gitlab/agents/prod-k8s-ldc-web/config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab/agents/prod-k8s-ldc-web/config.yaml b/.gitlab/agents/prod-k8s-ldc-web/config.yaml index 3436f21..596d077 100644 --- a/.gitlab/agents/prod-k8s-ldc-web/config.yaml +++ b/.gitlab/agents/prod-k8s-ldc-web/config.yaml @@ -42,7 +42,6 @@ ci_access: - id: ldc-web/projets/poule-et-toque - id: ldc-web/projets/prims - id: ldc-web/projets/qrcollector/qrcollector-back - - id: ldc-web/projets/qrcollector/qrcollector-front - id: ldc-web/projets/regalette - id: ldc-web/projets/reghalal - id: ldc-web/projets/report From 257ad81cfac9c9f438f5559cfaad4f1ca220749c Mon Sep 17 00:00:00 2001 From: "noah.lancien" Date: Tue, 11 Feb 2025 16:39:43 +0000 Subject: [PATCH 12/19] Added le-marche-de-beaufeu in agents config.yaml --- .gitlab/agents/prod-k8s-ldc-web/config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab/agents/prod-k8s-ldc-web/config.yaml b/.gitlab/agents/prod-k8s-ldc-web/config.yaml index 596d077..78b1f77 100644 --- a/.gitlab/agents/prod-k8s-ldc-web/config.yaml +++ b/.gitlab/agents/prod-k8s-ldc-web/config.yaml @@ -25,6 +25,7 @@ ci_access: - id: ldc-web/projets/ldc-web - id: ldc-web/projets/le-gaulois - id: ldc-web/projets/le-gaulois-pro + - id: ldc-web/projets/le-marche-de-beaufeu - id: ldc-web/projets/les-fermiers-snv - id: ldc-web/projets/lionor - id: ldc-web/projets/loue From 176a278863bf9bde820da83a719cbb605c451bad Mon Sep 17 00:00:00 2001 From: "karl.muller" Date: Wed, 12 Feb 2025 15:22:42 +0000 Subject: [PATCH 13/19] add espri-restauration in gitlab agent --- .gitlab/agents/prod-k8s-ldc-web/config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab/agents/prod-k8s-ldc-web/config.yaml b/.gitlab/agents/prod-k8s-ldc-web/config.yaml index 78b1f77..83b8178 100644 --- a/.gitlab/agents/prod-k8s-ldc-web/config.yaml +++ b/.gitlab/agents/prod-k8s-ldc-web/config.yaml @@ -8,6 +8,7 @@ ci_access: - id: ldc-web/projets/coupe-de-france-de-la-volaille - id: ldc-web/projets/domaine-de-lanvaux - id: ldc-web/projets/doux + - id: ldc-web/projets/espri-restauration - id: ldc-web/projets/galina - id: ldc-web/projets/gen-game-web-instances/janze - id: ldc-web/projets/gen-game-web-instances/l-orleanais-jeu From f4322cc08e7184bd7e241dc50e7a3d011a2fdec0 Mon Sep 17 00:00:00 2001 From: "karl.muller" Date: Mon, 17 Feb 2025 09:00:51 +0000 Subject: [PATCH 14/19] Update for data-pfc config.yaml --- .gitlab/agents/prod-k8s-ldc-web/config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab/agents/prod-k8s-ldc-web/config.yaml b/.gitlab/agents/prod-k8s-ldc-web/config.yaml index 83b8178..c4553c5 100644 --- a/.gitlab/agents/prod-k8s-ldc-web/config.yaml +++ b/.gitlab/agents/prod-k8s-ldc-web/config.yaml @@ -6,6 +6,7 @@ ci_access: - id: ldc-web/projets/cailles-robin - id: ldc-web/projets/crm - id: ldc-web/projets/coupe-de-france-de-la-volaille + - id: ldc-web/projets/data-pfc - id: ldc-web/projets/domaine-de-lanvaux - id: ldc-web/projets/doux - id: ldc-web/projets/espri-restauration From 69ef89f0d25a2533d98a8276ca52c6c7c5e807c2 Mon Sep 17 00:00:00 2001 From: Vincent BRIDIER Date: Wed, 5 Mar 2025 15:00:36 +0000 Subject: [PATCH 15/19] Add Mairet to Gitlab agent --- .gitlab/agents/prod-k8s-ldc-web/config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab/agents/prod-k8s-ldc-web/config.yaml b/.gitlab/agents/prod-k8s-ldc-web/config.yaml index c4553c5..05b6c19 100644 --- a/.gitlab/agents/prod-k8s-ldc-web/config.yaml +++ b/.gitlab/agents/prod-k8s-ldc-web/config.yaml @@ -34,6 +34,7 @@ ci_access: - id: ldc-web/projets/loue-action-reboisement - id: ldc-web/projets/loue-magie-de-noel - id: ldc-web/projets/maitre-coq + - id: ldc-web/projets/mairet - id: ldc-web/projets/mas-d-auge - id: ldc-web/projets/matines - id: ldc-web/projets/medina From dea9f677fd1fae656c75bdaa466877ed9d40e564 Mon Sep 17 00:00:00 2001 From: "noah.lancien" Date: Wed, 5 Mar 2025 16:02:20 +0000 Subject: [PATCH 16/19] Added maison-couthouis to gitlab agents --- .gitlab/agents/prod-k8s-ldc-web/config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab/agents/prod-k8s-ldc-web/config.yaml b/.gitlab/agents/prod-k8s-ldc-web/config.yaml index 05b6c19..09f556f 100644 --- a/.gitlab/agents/prod-k8s-ldc-web/config.yaml +++ b/.gitlab/agents/prod-k8s-ldc-web/config.yaml @@ -35,6 +35,7 @@ ci_access: - id: ldc-web/projets/loue-magie-de-noel - id: ldc-web/projets/maitre-coq - id: ldc-web/projets/mairet + - id: ldc-web/projets/maison-couthouis - id: ldc-web/projets/mas-d-auge - id: ldc-web/projets/matines - id: ldc-web/projets/medina From 0b9fa4899602d61b30bd03fee10320d88a03cffd Mon Sep 17 00:00:00 2001 From: Vincent BRIDIER Date: Wed, 2 Apr 2025 15:25:02 +0000 Subject: [PATCH 17/19] Add mesbr to gitlab agent --- .gitlab/agents/prod-k8s-ldc-web/config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab/agents/prod-k8s-ldc-web/config.yaml b/.gitlab/agents/prod-k8s-ldc-web/config.yaml index 09f556f..0a89d8e 100644 --- a/.gitlab/agents/prod-k8s-ldc-web/config.yaml +++ b/.gitlab/agents/prod-k8s-ldc-web/config.yaml @@ -39,6 +39,7 @@ ci_access: - id: ldc-web/projets/mas-d-auge - id: ldc-web/projets/matines - id: ldc-web/projets/medina + - id: ldc-web/projets/mesbr - id: ldc-web/projets/nature-and-respect - id: ldc-web/projets/nature-eleveurs - id: ldc-web/projets/op-insta-instances/le-gaulois From 5504f63023bf36705a5be41ac635d7eddf2bed0f Mon Sep 17 00:00:00 2001 From: "noah.lancien" Date: Fri, 4 Apr 2025 15:12:20 +0000 Subject: [PATCH 18/19] Added ldc.fr project to gitlab agents --- .gitlab/agents/prod-k8s-ldc-web/config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab/agents/prod-k8s-ldc-web/config.yaml b/.gitlab/agents/prod-k8s-ldc-web/config.yaml index 0a89d8e..cc1c535 100644 --- a/.gitlab/agents/prod-k8s-ldc-web/config.yaml +++ b/.gitlab/agents/prod-k8s-ldc-web/config.yaml @@ -22,6 +22,7 @@ ci_access: - id: ldc-web/projets/jeusselin - id: ldc-web/projets/l-hours - id: ldc-web/projets/la-toque-angevine + - id: ldc-web/projets/ldc - id: ldc-web/projets/ldc-foods - id: ldc-web/projets/ldc-restauration - id: ldc-web/projets/ldc-web From 1e0b9765a1427bab489fc1940392c138f054612f Mon Sep 17 00:00:00 2001 From: Thibault Raquet Date: Thu, 10 Apr 2025 12:13:46 +0000 Subject: [PATCH 19/19] Update helm-release.yaml --- infrastructure/traefik/helm-release.yaml | 584 +++++++++++------------ 1 file changed, 292 insertions(+), 292 deletions(-) diff --git a/infrastructure/traefik/helm-release.yaml b/infrastructure/traefik/helm-release.yaml index 9ad7a80..2aa4abd 100644 --- a/infrastructure/traefik/helm-release.yaml +++ b/infrastructure/traefik/helm-release.yaml @@ -1,292 +1,292 @@ ---- -apiVersion: helm.toolkit.fluxcd.io/v2 -kind: HelmRelease -metadata: - name: traefik - namespace: common-services -spec: - interval: 1m0s - chart: - spec: - chart: traefik - version: 31.1.1 - sourceRef: - kind: HelmRepository - name: traefik - namespace: common-services - values: - - image: - tag: v3.1.4 - - rbac: - enabled: true - - globalArguments: - - "--global.checknewversion" - - "--global.sendanonymoususage" - - "--accesslog=true" - - "--entryPoints.web.http.redirections.entryPoint.to=websecure" - - "--entrypoints.web.http.redirections.entrypoint.scheme=https" - - "--providers.kubernetescrd.allowCrossNamespace=true" - - "--entryPoints.web.proxyProtocol.trustedIPs=${TRAEFIK_LOAD_BALANCER_IP}/32,10.124.0.0/16" - - "--entryPoints.websecure.proxyProtocol.trustedIPs=${TRAEFIK_LOAD_BALANCER_IP}/32,10.124.0.0/16" - - "--entryPoints.websecure.forwardedHeaders.trustedIPs=${TRAEFIK_LOAD_BALANCER_IP}/32" - - "--entryPoints.mariadb.proxyProtocol.trustedIPs=${TRAEFIK_LOAD_BALANCER_IP},10.124.0.0/16" - - additionalArguments: - - "--log.level=DEBUG" - - ports: - traefik: - port: 9000 - expose: - default: false - protocol: TCP - web: - redirectTo: - port: websecure - websecure: - port: 8443 - expose: - default: true - exposedPort: 443 - protocol: TCP - tls: - enabled: true - metrics: - port: 9100 - expose: - default: false - protocol: TCP - mariadb: - port: 54322 - expose: - default: true - protocol: TCP - - providers: - kubernetesCRD: - enabled: true - ingresssClass: traefik - kubernetesIngress: - enabled: true - - service: - enabled: true - type: LoadBalancer - annotations: - service.beta.kubernetes.io/ovh-loadbalancer-proxy-protocol: v2 - spec: - loadBalancerIP: "${TRAEFIK_LOAD_BALANCER_IP}" - externalTrafficPolicy: Local - - ingressRoute: - dashboard: - enabled: false - - extraObjects: - - apiVersion: traefik.io/v1alpha1 # Redirect www URLs to their no-www equivalent - kind: Middleware - metadata: - name: redirect-www-to-no-www - namespace: common-services - spec: - # Redirect a request from an url to another with regex matching and replacement - redirectRegex: - # Apply a permanent redirection (HTTP 301) - permanent: true - # The regular expression to match and capture elements from the request URL - regex: "^https?://www\\.(.+)" - # How to modify the URL to have the new target URL - replacement: "https://${1}" - - - apiVersion: traefik.io/v1alpha1 # Redirect www URLs to their no-www equivalent - kind: Middleware - metadata: - name: redirect-www-to-no-www - namespace: production - spec: - # Redirect a request from an url to another with regex matching and replacement - redirectRegex: - # Apply a permanent redirection (HTTP 301) - permanent: true - # The regular expression to match and capture elements from the request URL - regex: "^https?://www\\.(.+)" - # How to modify the URL to have the new target URL - replacement: "https://${1}" - - - apiVersion: traefik.io/v1alpha1 # Redirect www URLs to their no-www equivalent - kind: Middleware - metadata: - name: redirect-www-to-no-www - namespace: staging - spec: - # Redirect a request from an url to another with regex matching and replacement - redirectRegex: - # Apply a permanent redirection (HTTP 301) - permanent: true - # The regular expression to match and capture elements from the request URL - regex: "^https?://www\\.(.+)" - # How to modify the URL to have the new target URL - replacement: "https://${1}" - - - apiVersion: traefik.io/v1alpha1 # Redirect www URLs to their no-www equivalent - kind: Middleware - metadata: - name: redirect-www-to-no-www - namespace: review - spec: - # Redirect a request from an url to another with regex matching and replacement - redirectRegex: - # Apply a permanent redirection (HTTP 301) - permanent: true - # The regular expression to match and capture elements from the request URL - regex: "^https?://www\\.(.+)" - # How to modify the URL to have the new target URL - replacement: "https://${1}" - - # Redirection to www for common-services namespace - # TODO: remove this middleware when all sites been updated - - apiVersion: traefik.io/v1alpha1 # Redirect no-www URLs to their www equivalent - kind: Middleware - metadata: - name: redirect-no-www-to-www - namespace: common-services - spec: - # Redirect a request from an url to another with regex matching and replacement - redirectRegex: - # Apply a permanent redirection (HTTP 301) - permanent: true - # The regular expression to match and capture elements from the request URL - regex: "^https?://(?:www\\.)?(.+)" - # How to modify the URL to have the new target URL - replacement: "https://www.${1}" - - # Redirection to www for production namespace - - apiVersion: traefik.io/v1alpha1 # Redirect no-www URLs to their www equivalent - kind: Middleware - metadata: - name: redirect-no-www-to-www - namespace: production - spec: - # Redirect a request from an url to another with regex matching and replacement - redirectRegex: - # Apply a permanent redirection (HTTP 301) - permanent: true - # The regular expression to match and capture elements from the request URL - regex: "^https?://(?:www\\.)?(.+)" - # How to modify the URL to have the new target URL - replacement: "https://www.${1}" - - # Redirection from www to domain for staging - - apiVersion: traefik.io/v1alpha1 # Redirect no-www URLs to their www equivalent - kind: Middleware - metadata: - name: redirect-no-www-to-www - namespace: staging - spec: - redirectRegex: - # Apply a permanent redirection (HTTP 301) - permanent: true - # The regular expression to match and capture elements from the request URL - regex: "^https?://www\\.(.+)" - # How to modify the URL to have the new target URL - replacement: "https://${1}" - - # Redirection from www to domain for review - - apiVersion: traefik.io/v1alpha1 # Redirect no-www URLs to their www equivalent - kind: Middleware - metadata: - name: redirect-no-www-to-www - namespace: review - spec: - redirectRegex: - # Apply a permanent redirection (HTTP 301) - permanent: true - # The regular expression to match and capture elements from the request URL - regex: "^https?://www\\.(.+)" - # How to modify the URL to have the new target URL - replacement: "https://${1}" - - # customResponseHeaders middleware - - apiVersion: traefik.io/v1alpha1 - kind: Middleware - metadata: - name: coop-middleware - namespace: review - spec: - headers: - customResponseHeaders: - Cross-Origin-Opener-Policy: "same-origin" - - - apiVersion: traefik.io/v1alpha1 - kind: Middleware - metadata: - name: coop-middleware - namespace: staging - spec: - headers: - customResponseHeaders: - Cross-Origin-Opener-Policy: "same-origin" - - - apiVersion: traefik.io/v1alpha1 - kind: Middleware - metadata: - name: coop-middleware - namespace: production - spec: - headers: - customResponseHeaders: - Cross-Origin-Opener-Policy: "same-origin" - - - apiVersion: traefik.io/v1alpha1 - kind: MiddlewareTCP - metadata: - name: ipwhitelist-acces-mariadb - namespace: common-services - spec: - ipAllowList: - sourceRange: - - 46.18.126.208/28 # LDC - - 62.193.56.48/32 # OPENevents - Bureau Neuville - - 80.15.14.76/32 # LDC web - Box externe - - 86.65.205.240/28 # LDC - - 135.125.42.176/28 # LDC - - 149.202.23.64/26 # LDC - - 151.80.95.176/28 # LDC - - 217.15.92.64/28 # LDC - - 10.124.0.0/16 # Kubernetes internal resources - - - apiVersion: traefik.io/v1alpha1 - kind: Middleware - metadata: - name: admin-ldc-whitelist - namespace: common-services - spec: - ipAllowList: - sourceRange: - - 46.18.126.208/28 # LDC - - 62.193.56.48/32 # OPENevents - Bureau Neuville - - 80.15.14.76/32 # LDC web - Box externe - - 86.65.205.240/28 # LDC - - 135.125.42.176/28 # LDC - - 149.202.23.64/26 # LDC - - 151.80.95.176/28 # LDC - - 217.15.92.64/28 # LDC - - apiVersion: traefik.io/v1alpha1 - kind: IngressRouteTCP - metadata: - name: mariadb-ingressroutetcp - namespace: common-services - spec: - entryPoints: - - mariadb - routes: - - match: HostSNI(`*`) # Hostname to match - middlewares: - - name: ipwhitelist-acces-mariadb - namespace: common-services - services: - - name: mariadb - port: 3306 +--- +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: traefik + namespace: common-services +spec: + interval: 1m0s + chart: + spec: + chart: traefik + version: 31.1.1 + sourceRef: + kind: HelmRepository + name: traefik + namespace: common-services + values: + + image: + tag: v3.1.4 + + rbac: + enabled: true + + globalArguments: + - "--global.checknewversion" + - "--global.sendanonymoususage" + - "--accesslog=true" + - "--entryPoints.web.http.redirections.entryPoint.to=websecure" + - "--entrypoints.web.http.redirections.entrypoint.scheme=https" + - "--providers.kubernetescrd.allowCrossNamespace=true" + - "--entryPoints.web.proxyProtocol.trustedIPs=${TRAEFIK_LOAD_BALANCER_IP}/32,10.124.0.0/16" + - "--entryPoints.websecure.proxyProtocol.trustedIPs=${TRAEFIK_LOAD_BALANCER_IP}/32,10.124.0.0/16" + - "--entryPoints.websecure.forwardedHeaders.trustedIPs=${TRAEFIK_LOAD_BALANCER_IP}/32" + - "--entryPoints.mariadb.proxyProtocol.trustedIPs=${TRAEFIK_LOAD_BALANCER_IP},10.124.0.0/16" + + additionalArguments: + - "--log.level=DEBUG" + + ports: + traefik: + port: 9000 + expose: + default: false + protocol: TCP + web: + redirectTo: + port: websecure + websecure: + port: 8443 + expose: + default: true + exposedPort: 443 + protocol: TCP + tls: + enabled: true + metrics: + port: 9100 + expose: + default: false + protocol: TCP + mariadb: + port: 54322 + expose: + default: true + protocol: TCP + + providers: + kubernetesCRD: + enabled: true + ingresssClass: traefik + kubernetesIngress: + enabled: true + + service: + enabled: true + type: LoadBalancer + annotations: + service.beta.kubernetes.io/ovh-loadbalancer-proxy-protocol: v2 + spec: + loadBalancerIP: "${TRAEFIK_LOAD_BALANCER_IP}" + externalTrafficPolicy: Local + + ingressRoute: + dashboard: + enabled: true + + extraObjects: + - apiVersion: traefik.io/v1alpha1 # Redirect www URLs to their no-www equivalent + kind: Middleware + metadata: + name: redirect-www-to-no-www + namespace: common-services + spec: + # Redirect a request from an url to another with regex matching and replacement + redirectRegex: + # Apply a permanent redirection (HTTP 301) + permanent: true + # The regular expression to match and capture elements from the request URL + regex: "^https?://www\\.(.+)" + # How to modify the URL to have the new target URL + replacement: "https://${1}" + + - apiVersion: traefik.io/v1alpha1 # Redirect www URLs to their no-www equivalent + kind: Middleware + metadata: + name: redirect-www-to-no-www + namespace: production + spec: + # Redirect a request from an url to another with regex matching and replacement + redirectRegex: + # Apply a permanent redirection (HTTP 301) + permanent: true + # The regular expression to match and capture elements from the request URL + regex: "^https?://www\\.(.+)" + # How to modify the URL to have the new target URL + replacement: "https://${1}" + + - apiVersion: traefik.io/v1alpha1 # Redirect www URLs to their no-www equivalent + kind: Middleware + metadata: + name: redirect-www-to-no-www + namespace: staging + spec: + # Redirect a request from an url to another with regex matching and replacement + redirectRegex: + # Apply a permanent redirection (HTTP 301) + permanent: true + # The regular expression to match and capture elements from the request URL + regex: "^https?://www\\.(.+)" + # How to modify the URL to have the new target URL + replacement: "https://${1}" + + - apiVersion: traefik.io/v1alpha1 # Redirect www URLs to their no-www equivalent + kind: Middleware + metadata: + name: redirect-www-to-no-www + namespace: review + spec: + # Redirect a request from an url to another with regex matching and replacement + redirectRegex: + # Apply a permanent redirection (HTTP 301) + permanent: true + # The regular expression to match and capture elements from the request URL + regex: "^https?://www\\.(.+)" + # How to modify the URL to have the new target URL + replacement: "https://${1}" + + # Redirection to www for common-services namespace + # TODO: remove this middleware when all sites been updated + - apiVersion: traefik.io/v1alpha1 # Redirect no-www URLs to their www equivalent + kind: Middleware + metadata: + name: redirect-no-www-to-www + namespace: common-services + spec: + # Redirect a request from an url to another with regex matching and replacement + redirectRegex: + # Apply a permanent redirection (HTTP 301) + permanent: true + # The regular expression to match and capture elements from the request URL + regex: "^https?://(?:www\\.)?(.+)" + # How to modify the URL to have the new target URL + replacement: "https://www.${1}" + + # Redirection to www for production namespace + - apiVersion: traefik.io/v1alpha1 # Redirect no-www URLs to their www equivalent + kind: Middleware + metadata: + name: redirect-no-www-to-www + namespace: production + spec: + # Redirect a request from an url to another with regex matching and replacement + redirectRegex: + # Apply a permanent redirection (HTTP 301) + permanent: true + # The regular expression to match and capture elements from the request URL + regex: "^https?://(?:www\\.)?(.+)" + # How to modify the URL to have the new target URL + replacement: "https://www.${1}" + + # Redirection from www to domain for staging + - apiVersion: traefik.io/v1alpha1 # Redirect no-www URLs to their www equivalent + kind: Middleware + metadata: + name: redirect-no-www-to-www + namespace: staging + spec: + redirectRegex: + # Apply a permanent redirection (HTTP 301) + permanent: true + # The regular expression to match and capture elements from the request URL + regex: "^https?://www\\.(.+)" + # How to modify the URL to have the new target URL + replacement: "https://${1}" + + # Redirection from www to domain for review + - apiVersion: traefik.io/v1alpha1 # Redirect no-www URLs to their www equivalent + kind: Middleware + metadata: + name: redirect-no-www-to-www + namespace: review + spec: + redirectRegex: + # Apply a permanent redirection (HTTP 301) + permanent: true + # The regular expression to match and capture elements from the request URL + regex: "^https?://www\\.(.+)" + # How to modify the URL to have the new target URL + replacement: "https://${1}" + + # customResponseHeaders middleware + - apiVersion: traefik.io/v1alpha1 + kind: Middleware + metadata: + name: coop-middleware + namespace: review + spec: + headers: + customResponseHeaders: + Cross-Origin-Opener-Policy: "same-origin" + + - apiVersion: traefik.io/v1alpha1 + kind: Middleware + metadata: + name: coop-middleware + namespace: staging + spec: + headers: + customResponseHeaders: + Cross-Origin-Opener-Policy: "same-origin" + + - apiVersion: traefik.io/v1alpha1 + kind: Middleware + metadata: + name: coop-middleware + namespace: production + spec: + headers: + customResponseHeaders: + Cross-Origin-Opener-Policy: "same-origin" + + - apiVersion: traefik.io/v1alpha1 + kind: MiddlewareTCP + metadata: + name: ipwhitelist-acces-mariadb + namespace: common-services + spec: + ipAllowList: + sourceRange: + - 46.18.126.208/28 # LDC + - 62.193.56.48/32 # OPENevents - Bureau Neuville + - 80.15.14.76/32 # LDC web - Box externe + - 86.65.205.240/28 # LDC + - 135.125.42.176/28 # LDC + - 149.202.23.64/26 # LDC + - 151.80.95.176/28 # LDC + - 217.15.92.64/28 # LDC + - 10.124.0.0/16 # Kubernetes internal resources + + - apiVersion: traefik.io/v1alpha1 + kind: Middleware + metadata: + name: admin-ldc-whitelist + namespace: common-services + spec: + ipAllowList: + sourceRange: + - 46.18.126.208/28 # LDC + - 62.193.56.48/32 # OPENevents - Bureau Neuville + - 80.15.14.76/32 # LDC web - Box externe + - 86.65.205.240/28 # LDC + - 135.125.42.176/28 # LDC + - 149.202.23.64/26 # LDC + - 151.80.95.176/28 # LDC + - 217.15.92.64/28 # LDC + - apiVersion: traefik.io/v1alpha1 + kind: IngressRouteTCP + metadata: + name: mariadb-ingressroutetcp + namespace: common-services + spec: + entryPoints: + - mariadb + routes: + - match: HostSNI(`*`) # Hostname to match + middlewares: + - name: ipwhitelist-acces-mariadb + namespace: common-services + services: + - name: mariadb + port: 3306