Compare commits
233 commits
migrate-da
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eff7baf3fe | ||
|
|
c8b18faba8 | ||
|
|
89a315f217 | ||
|
|
e1da57be4c | ||
|
|
aa0b17f15b | ||
|
|
9cc9b34c6f | ||
|
|
87b04fc03c | ||
|
|
39780fa0fa | ||
|
|
bb373952bb | ||
|
|
e15d74e233 | ||
|
|
4ce0256307 | ||
|
|
f3346b2be7 | ||
|
|
7852a7dbf5 | ||
|
|
cd4a14403f | ||
|
|
4f303ce92e | ||
|
|
eeea16bf53 | ||
|
|
ce910ea49d | ||
|
|
53296907b0 | ||
|
|
d15ec10689 | ||
|
|
59dc7b3f3e | ||
|
|
057fb8d192 | ||
|
|
2fa0fba3af | ||
|
|
edba2e40bb | ||
|
|
34d7392b89 | ||
|
|
9d07a14801 | ||
|
|
ced2987809 | ||
|
|
62f7615039 | ||
|
|
62cbd2ef1e | ||
|
|
c3b21c920d | ||
|
|
1e9b068752 | ||
|
|
3db0442fef | ||
|
|
c1ab98f496 | ||
|
|
25da33d21a | ||
|
|
2bb7681e7f | ||
|
|
06ac38eb37 | ||
|
|
293f76533a | ||
|
|
2155d7427a | ||
|
|
756ae32b69 | ||
|
|
1e12270193 | ||
|
|
ee306a824b | ||
|
|
e8271b5f14 | ||
|
|
a5605eb316 | ||
|
|
1f6610f27b | ||
|
|
7073a20383 | ||
|
|
0ff24fb82d | ||
|
|
cd0540f33f | ||
|
|
41cf295e54 | ||
|
|
03e69a4522 | ||
|
|
7a9c997c3e | ||
|
|
014172bece | ||
|
|
d838122f2d | ||
|
|
bb6abdab00 | ||
|
|
03a4cdebc4 | ||
|
|
0ebd62f297 | ||
|
|
ce58e39527 | ||
|
|
6b79e9b97d | ||
|
|
00562f5325 | ||
|
|
68d20611ee | ||
|
|
8c7d268737 | ||
|
|
db7012d742 | ||
|
|
6188b0179c | ||
|
|
266a687ce7 | ||
|
|
f101f3b688 | ||
|
|
43439ad169 | ||
|
|
bb14b07563 | ||
|
|
b354dcfeb0 | ||
|
|
1d3c587d89 | ||
|
|
4cf69ea32a | ||
|
|
12e10e1785 | ||
|
|
19fbe1c970 | ||
|
|
1f0863cdd1 | ||
|
|
b8bc3d6759 | ||
|
|
fb80f35cc0 | ||
|
|
6a6cac199f | ||
|
|
02dc6fda57 | ||
|
|
20b61bfd22 | ||
|
|
5798f9ccc5 | ||
|
|
1bf5e747f7 | ||
|
|
8e38e53a20 | ||
|
|
d5c1088237 | ||
|
|
c2a2423b8f | ||
|
|
334673a98e | ||
|
|
a5487a084a | ||
|
|
993a85fcf5 | ||
|
|
46dc45f79d | ||
|
|
ded4b413f2 | ||
|
|
eb9989b61e | ||
|
|
77ce4060fb | ||
|
|
6f50ec8375 | ||
|
|
c32d5a3c86 | ||
|
|
a812208889 | ||
|
|
2961333e35 | ||
|
|
05fc357af1 | ||
|
|
5fa96d5e32 | ||
|
|
494b1ac659 | ||
|
|
f7dddf0808 | ||
|
|
4a46b96c7d | ||
|
|
457a70e8c1 | ||
|
|
359dfe1741 | ||
|
|
6d59d5afb5 | ||
|
|
08539ade57 | ||
|
|
c61eb56998 | ||
|
|
f545cefcca | ||
|
|
8c9b993b65 | ||
|
|
036de6f944 | ||
|
|
d8057d0642 | ||
|
|
b76d4706d4 | ||
|
|
64c898840b | ||
|
|
a48db98bce | ||
|
|
938aa35285 | ||
|
|
c685dbf2b1 | ||
|
|
024d0dcf1e | ||
|
|
8dc12e3a0d | ||
|
|
d83352a75c | ||
|
|
7e91a7faed | ||
|
|
7f5ef71f7e | ||
|
|
dd09f582e9 | ||
|
|
52223e5c9a | ||
|
|
c788b50bd5 | ||
|
|
90030bceec | ||
|
|
405c0bc83f | ||
|
|
68ac8ffcdc | ||
|
|
17d1db2056 | ||
|
|
e871812ce0 | ||
|
|
e5da7fc692 | ||
|
|
024befb181 | ||
|
|
9e35251463 | ||
|
|
1be48b8c55 | ||
|
|
fc7c029211 | ||
|
|
7ed6aaa612 | ||
|
|
46ef46a046 | ||
|
|
fcacc87bfe | ||
|
|
73112bc486 | ||
|
|
c7c8d0d733 | ||
|
|
cf0af6b1c4 | ||
|
|
605e58a6c6 | ||
|
|
489c455bae | ||
|
|
cb44eb2a4a | ||
|
|
b0d2f79461 | ||
|
|
7b2c723fd4 | ||
|
|
674f30281e | ||
|
|
92c8762e1f | ||
|
|
bdb7672420 | ||
|
|
c4cf7f7d40 | ||
|
|
b98e5cfb8b | ||
|
|
88699625e6 | ||
|
|
cb4688dcf1 | ||
|
|
93f788b080 | ||
|
|
4ee0139853 | ||
|
|
4b30759b70 | ||
|
|
e9c622d9e9 | ||
|
|
6712e1d528 | ||
|
|
d555b8e4c0 | ||
|
|
c341a080b4 | ||
|
|
348d1c9544 | ||
|
|
2161940ebf | ||
|
|
c0a0caca1a | ||
|
|
889be9b062 | ||
|
|
8d1b723991 | ||
|
|
bca4be232c | ||
|
|
11fc2c64ed | ||
|
|
9ffa37f692 | ||
|
|
9c088ea043 | ||
|
|
f2fa481a1d | ||
|
|
963f27a918 | ||
|
|
aaeeaa2ad6 | ||
|
|
ff8b02d3f9 | ||
|
|
76db418b64 | ||
|
|
e814be7f65 | ||
|
|
d5ff06f4bf | ||
|
|
4fd7b0a71e | ||
|
|
cb7bb2a40d | ||
|
|
8553295f60 | ||
|
|
876899cf65 | ||
|
|
54fb1afe95 | ||
|
|
9ae77e6dda | ||
|
|
db69f7f40f | ||
|
|
1f6c8b8498 | ||
|
|
5960622229 | ||
|
|
5c7d189a36 | ||
|
|
7c7db9eebe | ||
|
|
f715631215 | ||
|
|
ce96702b92 | ||
|
|
f1203cdf66 | ||
|
|
a2a32f365f | ||
|
|
16b9e9b800 | ||
|
|
1e0b9765a1 | ||
|
|
2cd3a19129 | ||
|
|
4a422c4e5c | ||
|
|
5504f63023 | ||
|
|
0b9fa48996 | ||
|
|
287d3382e7 | ||
|
|
d21bd250c1 | ||
|
|
15bebaaec8 | ||
|
|
dea9f677fd | ||
|
|
69ef89f0d2 | ||
|
|
2540ab337f | ||
|
|
b16b04bb73 | ||
|
|
0e6205648c | ||
|
|
f4322cc08e | ||
|
|
176a278863 | ||
|
|
257ad81cfa | ||
|
|
e719152cdc | ||
|
|
db5e7ea637 | ||
|
|
2e20c68916 | ||
|
|
1c55427cac | ||
|
|
a490ccd100 | ||
|
|
b7333397a0 | ||
|
|
880eeaae11 | ||
|
|
963b4869e9 | ||
|
|
0228d5c407 | ||
|
|
b80de5431a | ||
|
|
0b47033805 | ||
|
|
182adbfe2c | ||
|
|
3151fc4106 | ||
|
|
35e57d3802 | ||
|
|
081e90d44c | ||
|
|
4d5635b29b | ||
|
|
83e66889f2 | ||
|
|
5ea050f555 | ||
|
|
44f4829d85 | ||
|
|
b7dc0c5015 | ||
|
|
ae24e03d91 | ||
|
|
250a1827c1 | ||
|
|
082e307061 | ||
|
|
2e25729ab1 | ||
|
|
ad04dca7b7 | ||
|
|
6d1bd130f7 | ||
|
|
a70c361fc0 | ||
|
|
4b77f2d741 | ||
|
|
6c57ae980a | ||
|
|
da285b095a | ||
|
|
d33ab90a13 |
53 changed files with 2597 additions and 1597 deletions
|
|
@ -28,7 +28,7 @@ variables:
|
|||
git config user.email "autodeploy@mediactivegroup.com"
|
||||
git add --all
|
||||
git commit -m "Bot Auto Commit"
|
||||
git push --force https://flux-token-api:${GITLAB_ACCESS_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git HEAD:${DEPLOY_BRANCH}
|
||||
git push --force https://project_access_token:${GITLAB_ACCESS_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git HEAD:${DEPLOY_BRANCH}
|
||||
tags:
|
||||
- flux
|
||||
- k8s
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ ci_access:
|
|||
- 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
|
||||
- id: ldc-web/projets/gen-game-web-instances/le-gaulois-chequier-40-2025
|
||||
- id: ldc-web/projets/gen-game-web-instances/le-gaulois-tdf-2024
|
||||
- id: ldc-web/projets/gen-game-web-instances/normandie
|
||||
- id: ldc-web/projets/gen-game-web-instances/reghalal-jeu
|
||||
|
|
|
|||
|
|
@ -1,40 +1,66 @@
|
|||
ci_access:
|
||||
projects:
|
||||
- id: ldc-web/projets/agis
|
||||
- id: ldc-web/projets/auguste-lambert
|
||||
- id: ldc-web/projets/bien-etre-animal
|
||||
- id: ldc-web/projets/boutique-cnc-sable
|
||||
- id: ldc-web/projets/boutique-jeusselin
|
||||
- id: ldc-web/projets/cailles-robin
|
||||
- id: ldc-web/projets/com-app-bo
|
||||
- id: ldc-web/projets/crm
|
||||
- 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/auguste-lambert
|
||||
- id: ldc-web/projets/gen-game-web-instances/janze
|
||||
- id: ldc-web/projets/gen-game-web-instances/l-orleanais-jeu
|
||||
- id: ldc-web/projets/gen-game-web-instances/le-gaulois-eveillez-vos-papilles
|
||||
- id: ldc-web/projets/gen-game-web-instances/le-gaulois-tdf-2024
|
||||
- id: ldc-web/projets/gen-game-web-instances/le-gaulois-chequier-40-2025
|
||||
- id: ldc-web/projets/gen-game-web-instances/le-gaulois-op-brasserie-2025
|
||||
- id: ldc-web/projets/gen-game-web-instances/le-gaulois-sportif-2025
|
||||
- id: ldc-web/projets/gen-game-web-instances/le-gaulois-sportif-2026
|
||||
- id: ldc-web/projets/gen-game-web-instances/matines-40-ans
|
||||
- id: ldc-web/projets/gen-game-web-instances/nature-and-respect
|
||||
- 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/ker-chant
|
||||
- id: ldc-web/projets/l-hours
|
||||
- id: ldc-web/projets/la-boutique-du-canard
|
||||
- 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
|
||||
- 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
|
||||
- id: ldc-web/projets/loue-magie-de-noel
|
||||
- id: ldc-web/projets/matomo
|
||||
- id: ldc-web/projets/maitre-coq
|
||||
- id: ldc-web/projets/mairet
|
||||
- id: ldc-web/projets/maison-couthouis
|
||||
- id: ldc-web/projets/marie
|
||||
- id: ldc-web/projets/marie-restauration
|
||||
- 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
|
||||
- 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/qualimaine
|
||||
- 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
|
||||
|
|
@ -42,13 +68,12 @@ ci_access:
|
|||
- id: ldc-web/projets/sbv
|
||||
- id: ldc-web/projets/share-secure-content
|
||||
- id: ldc-web/projets/showroom/showroom-bo
|
||||
- id: ldc-web/projets/showroom-bo-instances/drosed
|
||||
- id: ldc-web/projets/showroom-bo-instances/maitre-coq
|
||||
- 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/uwil-ui
|
||||
- id: ldc-web/projets/volailles-ardeche
|
||||
- id: ldc-web/projets/volailles-challans
|
||||
- id: ldc-web/projets/volena
|
||||
|
||||
observability:
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
| FluxCD | no flux | 2.3.0 | 2.3.0 | 2.13.0 |
|
||||
| Git-agent | 16.9.3 | 16.9.3 | 17.1.0 | 2.30 |
|
||||
| Git-runner | 16.9.1 | 16.9.1 | 17.0.1 | 0.62.1 |
|
||||
| MariaDB | 10.10 | 1.13.2 | 1.13.2 | 18.2.4 |
|
||||
| Prometheus | 0.60.1 | 0.74.0 | 0.74.0 | 60.2.0 |
|
||||
| Traefik | 2.9.6 | 3.0.2 | 3.0.2 | 28.3.0 |
|
||||
| Velero | 1.10.1 | 1.13.2 | 1.13.2 | 6.7.0 |
|
||||
|
|
|
|||
|
|
@ -1,39 +0,0 @@
|
|||
# Migration de la base de données mariadb pour un projet LDC-WEB
|
||||
|
||||
### Prérequis
|
||||
|
||||
1) Avoir l'accès maintainer pour le projet
|
||||
2) Avoir accès à l'ancienne, comme à la nouvelle base de données (ip publique autorisée)
|
||||
|
||||
### Maintenance du site
|
||||
|
||||
Avant de migrer la base de données, il est nécessaire de mettre le site en maintenance pour éviter
|
||||
d'insérer des données dans l'ancienne base pendant la migration de la nouvelle.
|
||||
|
||||
1) Depuis Lens :
|
||||
- Exécuter un shell dans le pod du projet
|
||||
- `php artisan down`
|
||||
2) En CLI :
|
||||
- `export POD_NAME=<nom_du_pod>`
|
||||
- `export NAMESPACE=<namespace>`
|
||||
- `kubectl --kubeconfig="~/.kube/ldc-web-prod" exec "${POD_NAME}" -n ${NAMESPACE} -- php artisan down`
|
||||
|
||||
### Migration de la base
|
||||
|
||||
Utiliser le script de migration `migrate.sh`
|
||||
```
|
||||
export DB_NAME=
|
||||
export PASSWORD=
|
||||
sh migrate.sh
|
||||
```
|
||||
|
||||
Si le user est différent du nom de la base : `export USER_NAME=`
|
||||
|
||||
### Modification du projet
|
||||
|
||||
Dans la ressource `configMap` du fichier `manifest.yaml` :
|
||||
1) Modifier la variable `DB_HOST`, mettre `mysql-e884938b-o403ac517.database.cloud.ovh.net`
|
||||
2) Ajouter la variable `DB_PORT`, mettre `20184`
|
||||
3) Commit/Merge dans la branche souhaitée
|
||||
4) Déployer et réactiver le site (`php artisan up`)
|
||||
5) Vérifier le fonctionnement du site et la présence des données migrées
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
## MOTS DE PASSE ##
|
||||
new_password='' # A SURCHARGER
|
||||
old_password='' # A SURCHARGER
|
||||
|
||||
## BASES DE DONNEES
|
||||
new_host='mysql-e884938b-o403ac517.database.cloud.ovh.net'
|
||||
new_port=20184
|
||||
|
||||
old_host='51.91.81.188'
|
||||
old_port=54322
|
||||
|
||||
# Si le user est le même que le nom de base
|
||||
if [[ -n "$USER" ]]; then
|
||||
USER=$DB_NAME
|
||||
fi
|
||||
|
||||
# Créer la nouvelle base - user - privilèges
|
||||
query="CREATE DATABASE IF NOT EXISTS \`${DB_NAME}\`;CREATE USER IF NOT EXISTS \`${USER}\`@'%' IDENTIFIED BY '${PASSWORD}';GRANT ALL PRIVILEGES ON \`${DB_NAME}\`.* TO \`${USER}\`@'%';"
|
||||
|
||||
mariadb -h ${new_host} -P ${new_port} -u avnadmin --password=${new_password} -e "${query}"
|
||||
|
||||
# Dump ancienne base
|
||||
mysqldump -h ${old_host} -P ${old_port} -u root --password=${old_password} ${DB_NAME} > /tmp/${DB_NAME}.sql
|
||||
|
||||
# Load nouvelle base
|
||||
mariadb -h ${new_host} -P ${new_port} -u avnadmin --password=${new_password} ${DB_NAME} < /tmp/${DB_NAME}.sql
|
||||
|
||||
# Supprimer le dump
|
||||
rm /tmp/${DB_NAME}.sql
|
||||
|
|
@ -22,7 +22,7 @@ spec:
|
|||
namespace: flux-system
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: cluster-k8s
|
||||
name: flux-system
|
||||
timeout: 5m
|
||||
|
||||
---
|
||||
|
|
@ -40,5 +40,5 @@ spec:
|
|||
namespace: flux-system
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: cluster-k8s
|
||||
name: flux-system
|
||||
timeout: 5m
|
||||
|
|
|
|||
32
flux/kustomizations/crowdsec.yaml
Normal file
32
flux/kustomizations/crowdsec.yaml
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: crowdsec
|
||||
namespace: flux-system
|
||||
spec:
|
||||
interval: 1m0s
|
||||
path: ./infrastructure/crowdsec
|
||||
prune: false
|
||||
healthChecks:
|
||||
- apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: HelmRepository
|
||||
name: crowdsec
|
||||
namespace: common-services
|
||||
- apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
name: crowdsec
|
||||
namespace: common-services
|
||||
- apiVersion: v1
|
||||
kind: Pod
|
||||
name: vault-0
|
||||
namespace: common-services
|
||||
dependsOn:
|
||||
- name: namespaces
|
||||
namespace: flux-system
|
||||
- name: external-secrets-resources
|
||||
namespace: flux-system
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: flux-system
|
||||
timeout: 5m
|
||||
|
|
@ -13,5 +13,5 @@ spec:
|
|||
namespace: flux-system
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: cluster-k8s
|
||||
name: flux-system
|
||||
namespace: flux-system
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ spec:
|
|||
namespace: flux-system
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: cluster-k8s
|
||||
name: flux-system
|
||||
healthChecks:
|
||||
- apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: HelmRepository
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ spec:
|
|||
namespace: flux-system
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: cluster-k8s
|
||||
name: flux-system
|
||||
healthChecks:
|
||||
- apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: HelmRepository
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ spec:
|
|||
prune: false
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: cluster-k8s
|
||||
name: flux-system
|
||||
dependsOn:
|
||||
- name: namespaces
|
||||
namespace: flux-system
|
||||
|
|
@ -40,7 +40,7 @@ spec:
|
|||
namespace: flux-system
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: cluster-k8s
|
||||
name: flux-system
|
||||
namespace: flux-system
|
||||
healthChecks:
|
||||
- apiVersion: source.toolkit.fluxcd.io/v1
|
||||
|
|
@ -68,6 +68,6 @@ spec:
|
|||
namespace: flux-system
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: cluster-k8s
|
||||
name: flux-system
|
||||
namespace: flux-system
|
||||
timeout: 10m
|
||||
|
|
|
|||
|
|
@ -1,15 +1,17 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- cert-manager.yaml
|
||||
- flux-resources.yaml
|
||||
- gitlab-agent.yaml
|
||||
- gitlab-runner.yaml
|
||||
- hashicorp-vault.yaml
|
||||
- ldc-custom.yaml
|
||||
- mariadb.yaml
|
||||
- meilisearch.yaml
|
||||
- namespaces.yaml
|
||||
- prometheus-stack.yaml
|
||||
- traefik.yaml
|
||||
- quickchart.yaml
|
||||
- cert-manager.yaml
|
||||
- flux-resources.yaml
|
||||
- gitlab-agent.yaml
|
||||
- gitlab-runner.yaml
|
||||
- hashicorp-vault.yaml
|
||||
- ldc-custom.yaml
|
||||
- meilisearch.yaml
|
||||
- namespaces.yaml
|
||||
- prometheus-stack.yaml
|
||||
- rabbitmq.yaml
|
||||
- traefik.yaml
|
||||
- quickchart.yaml
|
||||
- netdata.yaml
|
||||
- crowdsec.yaml
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ spec:
|
|||
prune: true
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: cluster-k8s
|
||||
name: flux-system
|
||||
dependsOn:
|
||||
- name: prometheus-stack
|
||||
namespace: flux-system
|
||||
|
|
|
|||
|
|
@ -22,5 +22,5 @@ spec:
|
|||
namespace: flux-system
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: cluster-k8s
|
||||
name: flux-system
|
||||
timeout: 5m
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ spec:
|
|||
namespace: flux-system
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: cluster-k8s
|
||||
name: flux-system
|
||||
healthChecks:
|
||||
- apiVersion: v1
|
||||
kind: Namespace
|
||||
|
|
|
|||
|
|
@ -2,25 +2,31 @@
|
|||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: mariadb
|
||||
name: netdata
|
||||
namespace: flux-system
|
||||
spec:
|
||||
interval: 30s
|
||||
path: ./infrastructure/mariadb
|
||||
interval: 1m0s
|
||||
path: ./infrastructure/netdata
|
||||
prune: false
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: cluster-k8s
|
||||
dependsOn:
|
||||
- name: external-secrets-resources
|
||||
namespace: flux-system
|
||||
healthChecks:
|
||||
- apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: HelmRepository
|
||||
name: bitnami
|
||||
name: netdata
|
||||
namespace: common-services
|
||||
- apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
name: mariadb
|
||||
name: netdata
|
||||
namespace: common-services
|
||||
- apiVersion: v1
|
||||
kind: Pod
|
||||
name: vault-0
|
||||
namespace: common-services
|
||||
dependsOn:
|
||||
- name: namespaces
|
||||
namespace: flux-system
|
||||
- name: external-secrets-resources
|
||||
namespace: flux-system
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: flux-system
|
||||
timeout: 5m
|
||||
|
|
@ -10,7 +10,7 @@ spec:
|
|||
prune: false
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: cluster-k8s
|
||||
name: flux-system
|
||||
dependsOn:
|
||||
- name: external-secrets-resources
|
||||
namespace: flux-system
|
||||
|
|
|
|||
|
|
@ -22,5 +22,5 @@ spec:
|
|||
namespace: flux-system
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: cluster-k8s
|
||||
name: flux-system
|
||||
timeout: 5m
|
||||
|
|
|
|||
26
flux/kustomizations/rabbitmq.yaml
Normal file
26
flux/kustomizations/rabbitmq.yaml
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: rabbitmq
|
||||
namespace: flux-system
|
||||
spec:
|
||||
interval: 1m0s
|
||||
path: ./infrastructure/rabbitmq
|
||||
prune: false
|
||||
healthChecks:
|
||||
- apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: HelmRepository
|
||||
name: bitnami
|
||||
namespace: common-services
|
||||
- apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
name: rabbitmq
|
||||
namespace: common-services
|
||||
dependsOn:
|
||||
- name: namespaces
|
||||
namespace: flux-system
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: flux-system
|
||||
timeout: 5m
|
||||
|
|
@ -22,5 +22,5 @@ spec:
|
|||
namespace: flux-system
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: cluster-k8s
|
||||
name: flux-system
|
||||
timeout: 5m
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -3,7 +3,7 @@
|
|||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: GitRepository
|
||||
metadata:
|
||||
name: cluster-k8s
|
||||
name: flux-system
|
||||
namespace: flux-system
|
||||
spec:
|
||||
interval: 1m0s
|
||||
|
|
@ -24,4 +24,4 @@ spec:
|
|||
prune: true
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: cluster-k8s
|
||||
name: flux-system
|
||||
|
|
|
|||
|
|
@ -9,4 +9,4 @@ spec:
|
|||
prune: false
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: cluster-k8s
|
||||
name: flux-system
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -3,7 +3,7 @@
|
|||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: GitRepository
|
||||
metadata:
|
||||
name: cluster-k8s
|
||||
name: flux-system
|
||||
namespace: flux-system
|
||||
spec:
|
||||
interval: 1m0s
|
||||
|
|
@ -24,4 +24,4 @@ spec:
|
|||
prune: true
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: cluster-k8s
|
||||
name: flux-system
|
||||
|
|
|
|||
|
|
@ -9,4 +9,4 @@ spec:
|
|||
prune: false
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: cluster-k8s
|
||||
name: flux-system
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ spec:
|
|||
chart:
|
||||
spec:
|
||||
chart: cert-manager
|
||||
version: 1.15.0
|
||||
version: 1.17.2
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: cert-manager
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ spec:
|
|||
dnsNames:
|
||||
- '*.${REVIEW_DOMAIN_NAME}'
|
||||
secretName: wildcard-k8s-ldc
|
||||
revisionHistoryLimit: 1
|
||||
issuerRef:
|
||||
name: letsencrypt-production-dns01
|
||||
kind: ClusterIssuer
|
||||
|
|
@ -22,6 +23,7 @@ spec:
|
|||
dnsNames:
|
||||
- '*.${STAGING_DOMAIN_NAME}'
|
||||
secretName: wildcard-k8s-ldc
|
||||
revisionHistoryLimit: 1
|
||||
issuerRef:
|
||||
name: letsencrypt-production-dns01
|
||||
kind: ClusterIssuer
|
||||
|
|
@ -36,6 +38,7 @@ spec:
|
|||
dnsNames:
|
||||
- '*.${PRODUCTION_DOMAIN_NAME}'
|
||||
secretName: wildcard-k8s-ldc
|
||||
revisionHistoryLimit: 1
|
||||
issuerRef:
|
||||
name: letsencrypt-production-dns01
|
||||
kind: ClusterIssuer
|
||||
|
|
|
|||
92
infrastructure/crowdsec/helm-release.yaml
Normal file
92
infrastructure/crowdsec/helm-release.yaml
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: crowdsec
|
||||
namespace: common-services
|
||||
spec:
|
||||
interval: 5m
|
||||
chart:
|
||||
spec:
|
||||
chart: crowdsec
|
||||
version: 0.24.0
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: crowdsec
|
||||
namespace: common-services
|
||||
values:
|
||||
container_runtime: containerd
|
||||
|
||||
image:
|
||||
tag: v1.7.8
|
||||
|
||||
agent:
|
||||
acquisition:
|
||||
- namespace: common-services
|
||||
podName: traefik-*
|
||||
program: traefik
|
||||
env:
|
||||
- name: COLLECTIONS
|
||||
value: "crowdsecurity/traefik"
|
||||
|
||||
secrets:
|
||||
externalSecret:
|
||||
name: crowdsec-lapi-secret
|
||||
csLapiSecretKey: "CS_LAPI_SECRET"
|
||||
registrationTokenKey: "REGISTRATION_TOKEN"
|
||||
|
||||
lapi:
|
||||
replicas: 2
|
||||
storeCAPICredentialsInSecret: true
|
||||
storeLAPICscliCredentialsInSecret: true
|
||||
persistentVolume:
|
||||
data:
|
||||
enabled: false
|
||||
config:
|
||||
enabled: false
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: crowdsec-lapi-secret
|
||||
|
||||
config:
|
||||
config.yaml.local: |
|
||||
api:
|
||||
client:
|
||||
# the log processor will remove delete itself from LAPI when stopping.
|
||||
unregister_on_exit: true
|
||||
server:
|
||||
auto_registration: # Activate if not using TLS for authentication
|
||||
enabled: true
|
||||
token: "${CROWDSEC_REGISTRATION_TOKEN}" # /!\ Do not modify this variable (Cluster K8S gitlab var)
|
||||
allowed_ranges: # /!\ Make sure to adapt to the pod IP ranges used by your cluster
|
||||
- "127.0.0.1/32"
|
||||
- "192.168.0.0/16"
|
||||
- "10.0.0.0/8"
|
||||
- "172.16.0.0/12"
|
||||
db_config:
|
||||
type: mysql
|
||||
user: ${CROWDSEC_DB_USER}
|
||||
password: ${CROWDSEC_DB_PWD}
|
||||
db_name: ${CROWDSEC_DB_NAME}
|
||||
host: ${DB_HOST}
|
||||
port: ${DB_PORT}
|
||||
flush:
|
||||
bouncers_autodelete:
|
||||
api_key: 1h
|
||||
agents_autodelete:
|
||||
login_password: 6h
|
||||
cert: 6h
|
||||
|
||||
appsec:
|
||||
enabled: true
|
||||
acquisitions:
|
||||
- source: appsec
|
||||
listen_addr: "0.0.0.0:7422"
|
||||
path: /
|
||||
appsec_configs:
|
||||
- crowdsecurity/appsec-default
|
||||
- crowdsecurity/crs
|
||||
labels:
|
||||
type: appsec
|
||||
env:
|
||||
- name: COLLECTIONS
|
||||
value: "crowdsecurity/appsec-virtual-patching crowdsecurity/appsec-crs crowdsecurity/appsec-generic-rules"
|
||||
8
infrastructure/crowdsec/helm-repository.yaml
Normal file
8
infrastructure/crowdsec/helm-repository.yaml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: HelmRepository
|
||||
metadata:
|
||||
name: crowdsec
|
||||
namespace: common-services
|
||||
spec:
|
||||
interval: 1h0m0s
|
||||
url: https://crowdsecurity.github.io/helm-charts
|
||||
|
|
@ -9,7 +9,7 @@ spec:
|
|||
chart:
|
||||
spec:
|
||||
chart: gitlab-agent
|
||||
version: 1.24.0
|
||||
version: 2.29.0
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: gitlab-agent
|
||||
|
|
@ -17,7 +17,7 @@ spec:
|
|||
values:
|
||||
|
||||
image:
|
||||
tag: v16.9.2
|
||||
tag: v19.2.0
|
||||
|
||||
config:
|
||||
kasAddress: "wss://lab.s-web.fr/-/kubernetes-agent/"
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ spec:
|
|||
chart:
|
||||
spec:
|
||||
chart: gitlab-runner
|
||||
version: 0.62.1
|
||||
version: 0.91.2
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: gitlab-runner
|
||||
|
|
@ -17,7 +17,7 @@ spec:
|
|||
values:
|
||||
|
||||
image:
|
||||
tag: alpine-v16.9.1
|
||||
tag: alpine-v19.2.2
|
||||
|
||||
gitlabUrl: https://lab.s-web.fr
|
||||
|
||||
|
|
|
|||
|
|
@ -5,27 +5,30 @@ metadata:
|
|||
namespace: common-services
|
||||
spec:
|
||||
schedule: "* * * * *"
|
||||
suspend: false # géré explicitement par Git (corrige le drift de suspension manuelle)
|
||||
concurrencyPolicy: Forbid
|
||||
startingDeadlineSeconds: 60
|
||||
successfulJobsHistoryLimit: 1
|
||||
failedJobsHistoryLimit: 2
|
||||
failedJobsHistoryLimit: 3
|
||||
jobTemplate:
|
||||
spec:
|
||||
backoffLimit: 2
|
||||
activeDeadlineSeconds: 120
|
||||
template:
|
||||
spec:
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 10001
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
containers:
|
||||
- name: vault-auto-unseal
|
||||
image: registry.s-web.fr/ldc-web/k8s-vault-unseal:1.0.0
|
||||
image: registry.s-web.fr/ldc-web/k8s-vault-unseal:1.1.0
|
||||
imagePullPolicy: IfNotPresent
|
||||
command: ["python", "main.py", "-u", "http://vault.common-services:8200", "-t", "${DOLLAR}(VAULT_TOKEN)",
|
||||
"-k", "${DOLLAR}(UNSEAL_KEY_1)", "-k", "${DOLLAR}(UNSEAL_KEY_2)", "-k", "${DOLLAR}(UNSEAL_KEY_3)",
|
||||
"-k", "${DOLLAR}(UNSEAL_KEY_4)", "-k", "${DOLLAR}(UNSEAL_KEY_5)"]
|
||||
command: ["python", "main.py", "-u", "http://vault.common-services:8200"]
|
||||
env:
|
||||
- name: VAULT_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: vault-credentials
|
||||
key: token
|
||||
- name: PYTHONDONTWRITEBYTECODE
|
||||
value: "1"
|
||||
- name: UNSEAL_KEY_1
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
|
|
@ -51,6 +54,19 @@ spec:
|
|||
secretKeyRef:
|
||||
name: vault-credentials
|
||||
key: unseal_key_5
|
||||
resources:
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 32Mi
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 64Mi
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
readOnlyRootFilesystem: true
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
imagePullSecrets:
|
||||
- name: docker-registry-credentials
|
||||
restartPolicy: OnFailure
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ spec:
|
|||
chart:
|
||||
spec:
|
||||
chart: external-secrets
|
||||
version: 0.9.19
|
||||
version: 0.16.1
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: external-secrets
|
||||
|
|
@ -16,4 +16,4 @@ spec:
|
|||
values:
|
||||
|
||||
image:
|
||||
tag: v0.9.19
|
||||
tag: v0.16.1
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
apiVersion: external-secrets.io/v1beta1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: crowdsec-lapi-secret
|
||||
namespace: common-services
|
||||
spec:
|
||||
refreshInterval: 15s
|
||||
secretStoreRef:
|
||||
name: vault-secret-store
|
||||
kind: ClusterSecretStore
|
||||
target:
|
||||
name: crowdsec-lapi-secret
|
||||
creationPolicy: Owner
|
||||
data:
|
||||
- secretKey: CS_LAPI_SECRET
|
||||
remoteRef:
|
||||
key: secret/data/crowdsec/lapi
|
||||
property: CS_LAPI_SECRET
|
||||
- secretKey: REGISTRATION_TOKEN
|
||||
remoteRef:
|
||||
key: secret/data/crowdsec/lapi
|
||||
property: REGISTRATION_TOKEN
|
||||
- secretKey: ENROLL_KEY
|
||||
remoteRef:
|
||||
key: secret/data/crowdsec/lapi
|
||||
property: ENROLL_KEY
|
||||
- secretKey: ENROLL_INSTANCE_NAME
|
||||
remoteRef:
|
||||
key: secret/data/crowdsec/lapi
|
||||
property: ENROLL_INSTANCE_NAME
|
||||
- secretKey: ENROLL_TAGS
|
||||
remoteRef:
|
||||
key: secret/data/crowdsec/lapi
|
||||
property: ENROLL_TAGS
|
||||
- secretKey: BOUNCER_KEY_traefik
|
||||
remoteRef:
|
||||
key: secret/data/crowdsec/lapi
|
||||
property: BOUNCER_KEY_traefik
|
||||
|
|
@ -7,8 +7,10 @@ resources:
|
|||
- gitlab-agent.yaml
|
||||
- gitlab-runner.yaml
|
||||
- hashicorp-vault.yaml
|
||||
- mariadb.yaml
|
||||
- prometheus-stack.yaml
|
||||
- review.yaml
|
||||
- staging.yaml
|
||||
- production.yaml
|
||||
- rabbitmq.yaml
|
||||
- netdata.yaml
|
||||
- crowdsec.yaml
|
||||
|
|
|
|||
|
|
@ -1,28 +0,0 @@
|
|||
apiVersion: external-secrets.io/v1beta1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: mariadb-credentials
|
||||
namespace: common-services
|
||||
spec:
|
||||
refreshInterval: "15s"
|
||||
secretStoreRef:
|
||||
name: vault-secret-store
|
||||
kind: ClusterSecretStore
|
||||
target:
|
||||
name: mariadb-credentials
|
||||
template:
|
||||
engineVersion: v2
|
||||
type: Opaque
|
||||
data:
|
||||
mariadb-password: "{{ .password }}"
|
||||
mariadb-replication-password: "{{ .root_password }}"
|
||||
mariadb-root-password: "{{ .root_password }}"
|
||||
data:
|
||||
- secretKey: root_password
|
||||
remoteRef:
|
||||
key: secret/mariadb
|
||||
property: root_password
|
||||
- secretKey: password
|
||||
remoteRef:
|
||||
key: secret/mariadb
|
||||
property: password
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
---
|
||||
apiVersion: external-secrets.io/v1beta1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: netdata-claim
|
||||
namespace: common-services
|
||||
spec:
|
||||
refreshInterval: "15s"
|
||||
secretStoreRef:
|
||||
name: vault-secret-store
|
||||
kind: ClusterSecretStore
|
||||
target:
|
||||
name: netdata-claim
|
||||
data:
|
||||
- secretKey: NETDATA_CLAIM_TOKEN
|
||||
remoteRef:
|
||||
key: secret/netdata/claim
|
||||
property: NETDATA_CLAIM_TOKEN
|
||||
- secretKey: NETDATA_CLAIM_ROOMS
|
||||
remoteRef:
|
||||
key: secret/netdata/claim
|
||||
property: NETDATA_CLAIM_ROOMS
|
||||
|
||||
---
|
||||
apiVersion: external-secrets.io/v1beta1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: netdata-stream
|
||||
namespace: common-services
|
||||
spec:
|
||||
refreshInterval: "15s"
|
||||
secretStoreRef:
|
||||
name: vault-secret-store
|
||||
kind: ClusterSecretStore
|
||||
target:
|
||||
name: netdata-stream
|
||||
data:
|
||||
- secretKey: APIKEY
|
||||
remoteRef:
|
||||
key: secret/netdata/stream
|
||||
property: APIKEY
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
apiVersion: external-secrets.io/v1beta1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: rabbitmq-credentials
|
||||
namespace: common-services
|
||||
spec:
|
||||
refreshInterval: "15s"
|
||||
secretStoreRef:
|
||||
name: vault-secret-store
|
||||
kind: ClusterSecretStore
|
||||
target:
|
||||
name: rabbitmq-credentials
|
||||
template:
|
||||
engineVersion: v2
|
||||
type: Opaque
|
||||
data:
|
||||
rabbitmq-password: "{{ .password }}"
|
||||
data:
|
||||
- secretKey: password
|
||||
remoteRef:
|
||||
key: secret/rabbitmq
|
||||
property: password
|
||||
|
|
@ -8,7 +8,7 @@ spec:
|
|||
chart:
|
||||
spec:
|
||||
chart: vault
|
||||
version: 0.28.1
|
||||
version: 0.30.0
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: hashicorp
|
||||
|
|
@ -18,14 +18,11 @@ spec:
|
|||
injector:
|
||||
metrics:
|
||||
enabled: true
|
||||
image:
|
||||
tag: "1.4.2"
|
||||
agentImage:
|
||||
tag: "1.17.2"
|
||||
server:
|
||||
image:
|
||||
tag: "1.17.2"
|
||||
ingress:
|
||||
enabled: false
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
# Liveness tolérante au seal : un Vault scellé renvoie 200 (sealedcode/uninitcode)
|
||||
# pour ne pas tuer le pod en boucle avant que l'auto-unseal n'agisse.
|
||||
path: "/v1/sys/health?standbyok=true&sealedcode=200&uninitcode=200"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- helm-repository.yaml
|
||||
- helm-release.yaml
|
||||
- auto-unseal.yaml
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- helm-repository.yaml
|
||||
- helm-release.yaml
|
||||
- auto-unseal.yaml
|
||||
|
|
|
|||
|
|
@ -49,6 +49,23 @@ metadata:
|
|||
kubernetes.io/service-account.name: svc-karl-muller
|
||||
type: kubernetes.io/service-account-token
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: svc-jeremy-munsch
|
||||
namespace: kube-system
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: jeremy-munsch-secret
|
||||
namespace: kube-system
|
||||
annotations:
|
||||
kubernetes.io/service-account.name: svc-jeremy-munsch
|
||||
type: kubernetes.io/service-account-token
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
|
|
@ -59,15 +76,18 @@ roleRef:
|
|||
kind: ClusterRole
|
||||
name: view
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: svc-vincent-bridier
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-noah-lancien
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-karl-muller
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-vincent-bridier
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-noah-lancien
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-karl-muller
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-jeremy-munsch
|
||||
namespace: kube-system
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
|
|
@ -76,40 +96,40 @@ metadata:
|
|||
creationTimestamp: null
|
||||
name: cr-ldc-web-metrics
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services/portforward
|
||||
- services/proxy
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- apiGroups:
|
||||
- apiextensions.k8s.io
|
||||
resources:
|
||||
- customresourcedefinitions
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- traefik.io
|
||||
resources:
|
||||
- ingressroutes
|
||||
- ingressroutetcps
|
||||
- ingressrouteudps
|
||||
- middlewares
|
||||
- middlewaretcps
|
||||
- tlsoptions
|
||||
- tlsstores
|
||||
- traefikservices
|
||||
- serverstransports
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services/portforward
|
||||
- services/proxy
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- apiGroups:
|
||||
- apiextensions.k8s.io
|
||||
resources:
|
||||
- customresourcedefinitions
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- traefik.io
|
||||
resources:
|
||||
- ingressroutes
|
||||
- ingressroutetcps
|
||||
- ingressrouteudps
|
||||
- middlewares
|
||||
- middlewaretcps
|
||||
- tlsoptions
|
||||
- tlsstores
|
||||
- traefikservices
|
||||
- serverstransports
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
|
|
@ -121,15 +141,18 @@ roleRef:
|
|||
kind: ClusterRole
|
||||
name: cr-ldc-web-metrics
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: svc-vincent-bridier
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-noah-lancien
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-karl-muller
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-vincent-bridier
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-noah-lancien
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-karl-muller
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-jeremy-munsch
|
||||
namespace: kube-system
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
|
|
@ -138,12 +161,12 @@ metadata:
|
|||
creationTimestamp: null
|
||||
name: cr-admin-web-ldc-namespace
|
||||
rules:
|
||||
- apiGroups:
|
||||
- "*"
|
||||
resources:
|
||||
- "*"
|
||||
verbs:
|
||||
- "*"
|
||||
- apiGroups:
|
||||
- "*"
|
||||
resources:
|
||||
- "*"
|
||||
verbs:
|
||||
- "*"
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
|
|
@ -152,15 +175,18 @@ metadata:
|
|||
name: rb-admin-web-ldc-namespace-review
|
||||
namespace: review
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: svc-vincent-bridier
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-noah-lancien
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-karl-muller
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-vincent-bridier
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-noah-lancien
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-karl-muller
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-jeremy-munsch
|
||||
namespace: kube-system
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: cr-admin-web-ldc-namespace
|
||||
|
|
@ -173,15 +199,18 @@ metadata:
|
|||
name: rb-admin-web-ldc-namespace-staging
|
||||
namespace: staging
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: svc-vincent-bridier
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-noah-lancien
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-karl-muller
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-vincent-bridier
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-noah-lancien
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-karl-muller
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-jeremy-munsch
|
||||
namespace: kube-system
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: cr-admin-web-ldc-namespace
|
||||
|
|
@ -194,15 +223,18 @@ metadata:
|
|||
name: rb-admin-web-ldc-namespace-production
|
||||
namespace: production
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: svc-vincent-bridier
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-noah-lancien
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-karl-muller
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-vincent-bridier
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-noah-lancien
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-karl-muller
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-jeremy-munsch
|
||||
namespace: kube-system
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: cr-admin-web-ldc-namespace
|
||||
|
|
@ -215,9 +247,18 @@ metadata:
|
|||
name: rb-admin-web-ldc-namespace-common-services
|
||||
namespace: common-services
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: svc-vincent-bridier
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-vincent-bridier
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-noah-lancien
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-karl-muller
|
||||
namespace: kube-system
|
||||
- kind: ServiceAccount
|
||||
name: svc-jeremy-munsch
|
||||
namespace: kube-system
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: cr-admin-web-ldc-namespace
|
||||
|
|
|
|||
|
|
@ -1,30 +0,0 @@
|
|||
---
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: mariadb
|
||||
namespace: common-services
|
||||
spec:
|
||||
interval: 1m0s
|
||||
chart:
|
||||
spec:
|
||||
chart: mariadb
|
||||
version: 18.2.4
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: bitnami
|
||||
namespace: common-services
|
||||
values:
|
||||
|
||||
image:
|
||||
tag: 11.3.2-debian-12-r6
|
||||
|
||||
auth:
|
||||
existingSecret: mariadb-credentials
|
||||
|
||||
primary:
|
||||
persistence:
|
||||
storageClass: "csi-cinder-high-speed"
|
||||
size: 60Gi
|
||||
|
||||
resourcesPreset: "${MARIADB_RESOURCES_REQUEST}"
|
||||
117
infrastructure/netdata/helm-release.yaml
Normal file
117
infrastructure/netdata/helm-release.yaml
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
---
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: netdata
|
||||
namespace: common-services
|
||||
spec:
|
||||
interval: 1m0s
|
||||
|
||||
chart:
|
||||
spec:
|
||||
chart: netdata
|
||||
version: 3.7.158
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: netdata
|
||||
namespace: common-services
|
||||
|
||||
# Injecte APIKEY depuis un Secret (pas en clair dans Git)
|
||||
valuesFrom:
|
||||
- kind: Secret
|
||||
name: netdata-stream
|
||||
valuesKey: APIKEY
|
||||
targetPath: APIKEY
|
||||
|
||||
values:
|
||||
image:
|
||||
tag: v2.8.5
|
||||
|
||||
# Service interne uniquement
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 19999
|
||||
|
||||
# Pas d'exposition
|
||||
ingress:
|
||||
enabled: false
|
||||
|
||||
# Pas d'auto-update des pods en prod critique
|
||||
restarter:
|
||||
enabled: false
|
||||
|
||||
# Parent = point de centralisation + health/alerting (par défaut chart)
|
||||
parent:
|
||||
enabled: true
|
||||
port: 19999
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: "${NETDATA_PARENT_REQUESTS_CPU}"
|
||||
memory: "${NETDATA_PARENT_REQUESTS_RAM}"
|
||||
limits:
|
||||
cpu: "${NETDATA_PARENT_LIMITS_CPU}"
|
||||
memory: "${NETDATA_PARENT_LIMITS_RAM}"
|
||||
|
||||
# PV parent recommandés (db + alarms)
|
||||
database:
|
||||
persistence: true
|
||||
volumesize: 40Gi # /var/cache/netdata
|
||||
alarms:
|
||||
persistence: true
|
||||
volumesize: 4Gi # /var/lib/netdata
|
||||
|
||||
# Claiming via Secret envFrom
|
||||
claiming:
|
||||
enabled: true
|
||||
token: ""
|
||||
rooms: ""
|
||||
url: "https://api.netdata.cloud"
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: netdata-claim
|
||||
|
||||
# Child DaemonSet
|
||||
child:
|
||||
enabled: true
|
||||
hostNetwork: true
|
||||
dnsPolicy: ClusterFirstWithHostNet
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: "${NETDATA_CHILD_REQUESTS_CPU}"
|
||||
memory: "${NETDATA_CHILD_REQUESTS_RAM}"
|
||||
limits:
|
||||
cpu: "${NETDATA_CHILD_LIMITS_CPU}"
|
||||
memory: "${NETDATA_CHILD_LIMITS_RAM}"
|
||||
|
||||
persistence:
|
||||
enabled: true
|
||||
hostPath: /var/lib/netdata-k8s-child
|
||||
|
||||
# Hardening UI sur les nodes: bind localhost uniquement
|
||||
configs:
|
||||
netdata:
|
||||
enabled: true
|
||||
path: /etc/netdata/netdata.conf
|
||||
data: |
|
||||
[db]
|
||||
mode = ram
|
||||
retention = "${NETDATA_CHILD_RETENTION}"
|
||||
update every = "${NETDATA_CHILD_COLLECT_INTERVAL}"
|
||||
[web]
|
||||
bind to = localhost:19999
|
||||
[health]
|
||||
enabled = no
|
||||
[ml]
|
||||
enabled = no
|
||||
|
||||
# Claiming via Secret envFrom (token PAS en clair ici)
|
||||
claiming:
|
||||
enabled: true
|
||||
token: ""
|
||||
rooms: ""
|
||||
url: "https://api.netdata.cloud"
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: netdata-claim
|
||||
9
infrastructure/netdata/helm-repository.yaml
Normal file
9
infrastructure/netdata/helm-repository.yaml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: HelmRepository
|
||||
metadata:
|
||||
name: netdata
|
||||
namespace: common-services
|
||||
spec:
|
||||
interval: 1h0m0s
|
||||
url: https://netdata.github.io/helmchart/
|
||||
5
infrastructure/netdata/kustomization.yaml
Normal file
5
infrastructure/netdata/kustomization.yaml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- helm-repository.yaml
|
||||
- helm-release.yaml
|
||||
|
|
@ -9,7 +9,7 @@ spec:
|
|||
chart:
|
||||
spec:
|
||||
chart: kube-prometheus-stack
|
||||
version: 62.2.1
|
||||
version: 72.0.1
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: prometheus-community
|
||||
|
|
@ -18,7 +18,7 @@ spec:
|
|||
|
||||
prometheusOperator:
|
||||
image:
|
||||
tag: v0.76.0
|
||||
tag: v0.82.0
|
||||
|
||||
grafana:
|
||||
defaultDashboardsTimezone: Europe/Paris
|
||||
|
|
@ -37,4 +37,4 @@ spec:
|
|||
storageClassName: "csi-cinder-classic"
|
||||
resources:
|
||||
requests:
|
||||
storage: 20Gi
|
||||
storage: 40Gi
|
||||
|
|
|
|||
24
infrastructure/rabbitmq/helm-release.yaml
Normal file
24
infrastructure/rabbitmq/helm-release.yaml
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: rabbitmq
|
||||
namespace: common-services
|
||||
spec:
|
||||
interval: 1m0s
|
||||
chart:
|
||||
spec:
|
||||
chart: rabbitmq
|
||||
version: 16.0.3
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: bitnami
|
||||
namespace: common-services
|
||||
values:
|
||||
global:
|
||||
defaultStorageClass: "csi-cinder-high-speed"
|
||||
image:
|
||||
tag: 4.0.1
|
||||
auth:
|
||||
username: rabbitmq
|
||||
existingPasswordSecret: rabbitmq-credentials
|
||||
|
|
@ -1,10 +1,9 @@
|
|||
---
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: HelmRepository
|
||||
metadata:
|
||||
name: bitnami
|
||||
namespace: common-services
|
||||
spec:
|
||||
interval: 1h0m0s
|
||||
url: oci://registry-1.docker.io/bitnamicharts
|
||||
type: "oci"
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: HelmRepository
|
||||
metadata:
|
||||
name: bitnami
|
||||
namespace: common-services
|
||||
spec:
|
||||
interval: 1h0m0s
|
||||
url: oci://registry-1.docker.io/bitnamicharts
|
||||
type: "oci"
|
||||
5
infrastructure/rabbitmq/kustomization.yaml
Normal file
5
infrastructure/rabbitmq/kustomization.yaml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- helm-repository.yaml
|
||||
- helm-release.yaml
|
||||
|
|
@ -1,261 +1,481 @@
|
|||
---
|
||||
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}"
|
||||
|
||||
- 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: 35.2.0
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: traefik
|
||||
namespace: common-services
|
||||
values:
|
||||
image:
|
||||
tag: v3.3.6
|
||||
|
||||
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=${OVH_LOAD_BALANCER_EGRESS_IP}/32"
|
||||
- "--entryPoints.websecure.proxyProtocol.trustedIPs=${OVH_LOAD_BALANCER_EGRESS_IP}/32"
|
||||
- "--entryPoints.websecure.forwardedHeaders.trustedIPs=${OVH_LOAD_BALANCER_EGRESS_IP}/32"
|
||||
|
||||
additionalArguments:
|
||||
#- "--log.level=DEBUG"
|
||||
- "--entrypoints.web.http.middlewares=common-services-crowdsec-bouncer@kubernetescrd"
|
||||
- "--entrypoints.websecure.http.middlewares=common-services-crowdsec-bouncer@kubernetescrd"
|
||||
|
||||
deployment:
|
||||
replicas: 2
|
||||
|
||||
podDisruptionBudget:
|
||||
enabled: true
|
||||
minAvailable: 1
|
||||
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: traefik
|
||||
app.kubernetes.io/instance: traefik-common-services
|
||||
topologyKey: kubernetes.io/hostname
|
||||
|
||||
ports:
|
||||
traefik:
|
||||
port: 9000
|
||||
expose:
|
||||
default: false
|
||||
protocol: TCP
|
||||
web:
|
||||
redirections:
|
||||
entryPoint:
|
||||
to: websecure
|
||||
scheme: https
|
||||
websecure:
|
||||
port: 8443
|
||||
expose:
|
||||
default: true
|
||||
exposedPort: 443
|
||||
protocol: TCP
|
||||
tls:
|
||||
enabled: true
|
||||
metrics:
|
||||
port: 9100
|
||||
expose:
|
||||
default: false
|
||||
protocol: TCP
|
||||
|
||||
providers:
|
||||
kubernetesCRD:
|
||||
enabled: true
|
||||
ingresssClass: traefik
|
||||
kubernetesIngress:
|
||||
enabled: true
|
||||
|
||||
experimental:
|
||||
plugins:
|
||||
bouncer:
|
||||
moduleName: github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin
|
||||
version: v1.4.5
|
||||
|
||||
volumes:
|
||||
- name: crowdsec-lapi-secret
|
||||
mountPath: /etc/traefik/crowdsec
|
||||
type: secret
|
||||
secretName: crowdsec-lapi-secret
|
||||
|
||||
service:
|
||||
enabled: true
|
||||
type: LoadBalancer
|
||||
annotations:
|
||||
loadbalancer.ovhcloud.com/class: "octavia"
|
||||
loadbalancer.openstack.org/proxy-protocol: "v2"
|
||||
loadbalancer.openstack.org/keep-floatingip: "true"
|
||||
# Protection Flux : empêche la suppression accidentelle
|
||||
kustomize.toolkit.fluxcd.io/prune: disabled
|
||||
spec:
|
||||
externalTrafficPolicy: Local
|
||||
|
||||
ingressRoute:
|
||||
dashboard:
|
||||
enabled: true
|
||||
|
||||
extraObjects:
|
||||
- apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: crowdsec-bouncer
|
||||
namespace: common-services
|
||||
spec:
|
||||
plugin:
|
||||
bouncer:
|
||||
forwardedHeadersTrustedIps: "${OVH_LOAD_BALANCER_EGRESS_IP}/32"
|
||||
enabled: true
|
||||
crowdsecMode: stream
|
||||
crowdsecLapiScheme: http
|
||||
crowdsecLapiHost: crowdsec-service.common-services.svc.cluster.local:8080
|
||||
crowdsecLapiPath: /
|
||||
crowdsecLapiKeyFile: /etc/traefik/crowdsec/BOUNCER_KEY_traefik
|
||||
crowdsecAppsecEnabled: true
|
||||
crowdsecAppsecHost: crowdsec-appsec-service.common-services.svc.cluster.local:7422
|
||||
crowdsecAppsecPath: /
|
||||
crowdsecAppsecFailureBlock: true
|
||||
crowdsecAppsecUnreachableBlock: true
|
||||
crowdsecAppsecBodyLimit: 10485760
|
||||
|
||||
- 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: Middleware
|
||||
metadata:
|
||||
name: admin-ldc-whitelist
|
||||
namespace: common-services
|
||||
spec:
|
||||
ipAllowList:
|
||||
sourceRange:
|
||||
- 163.172.132.215 # Proxy Cloud Navigation LDC
|
||||
- 51.159.133.41 # Proxy Cloud Navigation LDC
|
||||
- 51.159.82.143 # Proxy Cloud Navigation LDC
|
||||
- 135.125.42.187 # Proxy Cloud Navigation LDC
|
||||
- 37.64.103.132 # Willow Creation
|
||||
- 88.86.232.178 # Cafel
|
||||
- 57.128.69.87 # K8S Node 1
|
||||
- 57.128.110.168 # K8S Node 2
|
||||
- 57.128.111.33 # K8S Node 3
|
||||
- 54.38.0.22 # K8S Node 4
|
||||
- 57.128.71.23 # K8S Node 5
|
||||
- 51.68.88.158/32 # prod-k8s-ldc-web-nopreempt-node-796d8b
|
||||
- 51.68.92.100/32 # prod-k8s-ldc-web-nopreempt-node-8f841b
|
||||
- 51.68.92.60/32 # prod-k8s-ldc-web-nopreempt-node-399aa9
|
||||
- 51.68.87.150/32 # prod-k8s-ldc-web-nopreempt-node-b5417b
|
||||
- 51.68.90.203/32 # prod-k8s-ldc-web-nopreempt-node-e3ac48
|
||||
- 137.74.211.112/32 # dev-test-k8s-ldc-web-nopreempt-node-17257c
|
||||
- 146.59.240.51/32 # dev-test-k8s-ldc-web-nopreempt-node-54e828
|
||||
- 146.59.241.151/32 # dev-test-k8s-ldc-web-nopreempt-node-93017a
|
||||
- 46.18.126.208/28 # LDC
|
||||
- 62.193.56.48/32 # OPENevents - Bureau Neuville
|
||||
- 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
|
||||
- 3.77.67.4 # UptimeRobot
|
||||
- 3.79.134.69 # UptimeRobot
|
||||
- 18.192.166.72 # UptimeRobot
|
||||
- 18.193.252.127 # UptimeRobot
|
||||
- 52.28.162.93 # UptimeRobot
|
||||
- 52.59.43.236 # UptimeRobot
|
||||
- 63.178.84.147 # UptimeRobot
|
||||
- 24.144.78.39 # UptimeRobot
|
||||
- 24.144.78.185 # UptimeRobot
|
||||
- 64.225.81.248 # UptimeRobot
|
||||
- 64.225.82.147 # UptimeRobot
|
||||
- 143.198.249.237 # UptimeRobot
|
||||
- 143.198.250.89 # UptimeRobot
|
||||
- 143.244.196.21 # UptimeRobot
|
||||
- 143.244.196.211 # UptimeRobot
|
||||
- 152.42.149.135 # UptimeRobot
|
||||
- 159.223.243.219 # UptimeRobot
|
||||
- 161.35.247.201 # UptimeRobot
|
||||
- 167.99.18.52 # UptimeRobot
|
||||
- 188.166.201.79 # UptimeRobot
|
||||
- 206.189.241.133 # UptimeRobot
|
||||
- 209.38.53.7 # UptimeRobot
|
||||
- 49.13.24.81 # UptimeRobot
|
||||
- 49.13.130.29 # UptimeRobot
|
||||
- 49.13.134.145 # UptimeRobot
|
||||
- 78.47.98.55 # UptimeRobot
|
||||
- 88.99.80.227 # UptimeRobot
|
||||
- 142.132.180.39 # UptimeRobot
|
||||
- 157.90.155.240 # UptimeRobot
|
||||
- 157.90.156.63 # UptimeRobot
|
||||
- 168.119.53.160 # UptimeRobot
|
||||
- 168.119.96.239 # UptimeRobot
|
||||
- 49.13.164.148 # UptimeRobot
|
||||
- 49.13.167.123 # UptimeRobot
|
||||
- 78.46.190.63 # UptimeRobot
|
||||
- 78.47.173.76 # UptimeRobot
|
||||
- 128.140.41.193 # UptimeRobot
|
||||
- 128.140.106.114 # UptimeRobot
|
||||
- 159.69.158.189 # UptimeRobot
|
||||
- 167.235.143.113 # UptimeRobot
|
||||
- 168.119.123.75 # UptimeRobot
|
||||
- 78.46.215.1 # UptimeRobot
|
||||
- 91.99.101.207 # UptimeRobot
|
||||
- 46.224.188.186 # BugSmash
|
||||
- 178.156.178.124 # BugSmash
|
||||
- 5.161.29.18 # BugSmash
|
||||
|
||||
# AJOUT : Service Octavia en parallèle
|
||||
- apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: traefik-octavia
|
||||
namespace: common-services
|
||||
annotations:
|
||||
loadbalancer.ovhcloud.com/class: "octavia"
|
||||
loadbalancer.openstack.org/proxy-protocol: "v2"
|
||||
loadbalancer.openstack.org/keep-floatingip: "true"
|
||||
# Protection Flux : empêche la suppression accidentelle
|
||||
kustomize.toolkit.fluxcd.io/prune: disabled
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
externalTrafficPolicy: Local
|
||||
loadBalancerIP: "${TRAEFIK_LOAD_BALANCER_IP_OCTAVIA}"
|
||||
selector:
|
||||
app.kubernetes.io/name: traefik
|
||||
app.kubernetes.io/instance: traefik-common-services
|
||||
ports:
|
||||
- name: web
|
||||
port: 80
|
||||
targetPort: 8000
|
||||
protocol: TCP
|
||||
- name: websecure
|
||||
port: 443
|
||||
targetPort: 8443
|
||||
protocol: TCP
|
||||
|
||||
- apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: blackhole
|
||||
namespace: common-services
|
||||
spec:
|
||||
# Placeholder : jamais contacté, le middleware renvoie 403 avant.
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: 80
|
||||
|
||||
- apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: deny-ip-blocklist
|
||||
namespace: common-services
|
||||
spec:
|
||||
# ipAllowList rejette en 403
|
||||
ipAllowList:
|
||||
sourceRange:
|
||||
- 192.0.2.1/32 # TEST-NET-1 (RFC 5737) : ne matche aucun client réel => deny
|
||||
|
||||
- apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: security-ip-blocklist
|
||||
namespace: common-services
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- kind: Rule
|
||||
match: >-
|
||||
ClientIP(`45.88.138.45/32`) ||
|
||||
ClientIP(`8.34.210.32/32`) ||
|
||||
ClientIP(`8.34.210.37/32`) ||
|
||||
ClientIP(`8.34.210.42/32`) ||
|
||||
ClientIP(`8.34.210.43/32`) ||
|
||||
ClientIP(`8.34.210.45/32`) ||
|
||||
ClientIP(`34.68.34.65/32`) ||
|
||||
ClientIP(`34.68.34.66/32`) ||
|
||||
ClientIP(`34.68.34.67/32`) ||
|
||||
ClientIP(`34.68.34.69/32`) ||
|
||||
ClientIP(`34.68.34.71/32`) ||
|
||||
ClientIP(`34.68.34.72/32`) ||
|
||||
ClientIP(`34.68.34.77/32`) ||
|
||||
ClientIP(`34.68.34.79/32`) ||
|
||||
ClientIP(`34.68.34.81/32`) ||
|
||||
ClientIP(`34.68.34.84/32`) ||
|
||||
ClientIP(`94.74.106.96/32`) ||
|
||||
ClientIP(`20.220.225.223/32`) ||
|
||||
ClientIP(`52.182.173.140/32`)
|
||||
priority: 100000
|
||||
middlewares:
|
||||
- name: deny-ip-blocklist
|
||||
namespace: common-services
|
||||
services:
|
||||
- name: blackhole
|
||||
port: 80
|
||||
|
||||
- apiVersion: discovery.k8s.io/v1
|
||||
kind: EndpointSlice
|
||||
metadata:
|
||||
name: blackhole
|
||||
namespace: common-services
|
||||
labels:
|
||||
kubernetes.io/service-name: blackhole
|
||||
addressType: IPv4
|
||||
endpoints:
|
||||
- addresses:
|
||||
- 192.0.2.1 # TEST-NET-1 : non-routable, jamais contacté
|
||||
conditions:
|
||||
ready: true
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
protocol: TCP
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue