Compare commits
No commits in common. "fce733374cf07c1ee635021e176fe15c3f162b4b" and "61d9dade3b30c24ec89862ebb202b4b8e00fa841" have entirely different histories.
fce733374c
...
61d9dade3b
|
@ -5,10 +5,6 @@ resources:
|
||||||
- ./resources/hydra-oidc-deployment.yaml
|
- ./resources/hydra-oidc-deployment.yaml
|
||||||
- ./resources/hydra-oidc-service.yaml
|
- ./resources/hydra-oidc-service.yaml
|
||||||
|
|
||||||
generatorOptions:
|
|
||||||
labels:
|
|
||||||
com.cadoles.forge.sso-kustom/session: redis
|
|
||||||
|
|
||||||
configMapGenerator:
|
configMapGenerator:
|
||||||
- name: hydra-oidc-env
|
- name: hydra-oidc-env
|
||||||
literals:
|
literals:
|
||||||
|
@ -30,7 +26,6 @@ configMapGenerator:
|
||||||
- CLIENT_SECRET_FC=MyClientSecret
|
- CLIENT_SECRET_FC=MyClientSecret
|
||||||
- COOKIE_PATH=/
|
- COOKIE_PATH=/
|
||||||
- TRUSTED_PROXIES=127.0.0.1,REMOTE_ADDR
|
- TRUSTED_PROXIES=127.0.0.1,REMOTE_ADDR
|
||||||
- REDIS_DSN="redis://redis:6379"
|
|
||||||
# - name: hydra-dispatcher-apps
|
# - name: hydra-dispatcher-apps
|
||||||
# behavior: merge
|
# behavior: merge
|
||||||
# files:
|
# files:
|
||||||
|
@ -40,5 +35,5 @@ patchesJson6902:
|
||||||
- target:
|
- target:
|
||||||
version: v1
|
version: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
name: hydra-oidc-env
|
name: hydra-dispatcher-env
|
||||||
path: patches/hydra-oidc-env.yaml
|
path: patches/hydra-dispatcher-env.yaml
|
||||||
|
|
|
@ -18,7 +18,7 @@ spec:
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: hydra-oidc-php-fpm
|
- name: hydra-oidc-php-fpm
|
||||||
image: reg.cadoles.com/cadoles/hydra-oidc-base:2023.12.15-develop.1012.d57f2ad
|
image: reg.cadoles.com/cadoles/hydra-oidc-base:2023.11.17-develop.1657.761e035
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
args: ["/usr/sbin/php-fpm81", "-F", "-e"]
|
args: ["/usr/sbin/php-fpm81", "-F", "-e"]
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
|
@ -47,7 +47,7 @@ spec:
|
||||||
name: hydra-oidc-env
|
name: hydra-oidc-env
|
||||||
resources: {}
|
resources: {}
|
||||||
|
|
||||||
- image: reg.cadoles.com/cadoles/hydra-oidc-base:2023.12.15-develop.1012.d57f2ad
|
- image: reg.cadoles.com/cadoles/hydra-oidc-base:2023.11.17-develop.1657.761e035
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
name: hydra-oidc-nginx
|
name: hydra-oidc-nginx
|
||||||
args: ["/usr/sbin/nginx"]
|
args: ["/usr/sbin/nginx"]
|
||||||
|
|
|
@ -23,7 +23,7 @@ spec:
|
||||||
- configMapRef:
|
- configMapRef:
|
||||||
name: hydra-saml-env
|
name: hydra-saml-env
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 80
|
||||||
resources: {}
|
resources: {}
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
---
|
---
|
||||||
|
@ -37,7 +37,6 @@ spec:
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
port: 80
|
port: 80
|
||||||
targetPort: 8080
|
|
||||||
selector:
|
selector:
|
||||||
io.kompose.service: hydra-saml-remote-user
|
io.kompose.service: hydra-saml-remote-user
|
||||||
status:
|
status:
|
||||||
|
|
|
@ -5,10 +5,6 @@ resources:
|
||||||
- ./resources/hydra-sql-service.yaml
|
- ./resources/hydra-sql-service.yaml
|
||||||
- ./resources/hydra-sql-deployment.yaml
|
- ./resources/hydra-sql-deployment.yaml
|
||||||
|
|
||||||
generatorOptions:
|
|
||||||
labels:
|
|
||||||
com.cadoles.forge.sso-kustom/session: redis
|
|
||||||
|
|
||||||
configMapGenerator:
|
configMapGenerator:
|
||||||
- name: hydra-sql-env
|
- name: hydra-sql-env
|
||||||
literals:
|
literals:
|
||||||
|
@ -21,7 +17,7 @@ configMapGenerator:
|
||||||
- DSN_REMOTE_DATABASE="pgsql:host='postgres';port=5432;dbname=lasql"
|
- DSN_REMOTE_DATABASE="pgsql:host='postgres';port=5432;dbname=lasql"
|
||||||
- DB_USER="makeMeASecret"
|
- DB_USER="makeMeASecret"
|
||||||
- DB_PASSWORD="makeMeASecret"
|
- DB_PASSWORD="makeMeASecret"
|
||||||
- REDIS_DSN="redis://redis:6379"
|
- REDIS_DSN="redis://rfs-redis:26379?&redis_sentinel=mymaster"
|
||||||
- PEPPER="MakeMeABigSecret"
|
- PEPPER="MakeMeABigSecret"
|
||||||
- name: sql-login-config
|
- name: sql-login-config
|
||||||
files:
|
files:
|
||||||
|
|
|
@ -18,7 +18,7 @@ spec:
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: hydra-sql-fpm
|
- name: hydra-sql-fpm
|
||||||
image: reg.cadoles.com/cadoles/hydra-sql-base:2023.12.14-develop.1107.740a756
|
image: reg.cadoles.com/cadoles/hydra-sql-base:2023.12.12-develop.848.72e912f
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
args: ["/usr/sbin/php-fpm81", "-F", "-e"]
|
args: ["/usr/sbin/php-fpm81", "-F", "-e"]
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
|
@ -54,7 +54,7 @@ spec:
|
||||||
subPath: "sql_login.yaml"
|
subPath: "sql_login.yaml"
|
||||||
|
|
||||||
- name: hydra-sql-nginx
|
- name: hydra-sql-nginx
|
||||||
image: reg.cadoles.com/cadoles/hydra-sql-base:2023.12.14-develop.1107.740a756
|
image: reg.cadoles.com/cadoles/hydra-sql-base:2023.12.12-develop.848.72e912f
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
args: ["/usr/sbin/nginx"]
|
args: ["/usr/sbin/nginx"]
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
# Composant `redis`
|
|
||||||
|
|
||||||
### Description
|
|
||||||
|
|
||||||
Les applications `hydra-dispatcher`, `hydra-sql` et `hydra-oidc` stockent dorénavant le cache et les sessions utilisateur sur un serveur Redis.
|
|
||||||
Le DSN du serveur est défini dans leur variable d'environnement respective `REDIS_DSN`.
|
|
||||||
Les applications peuvent utiliser le mode `sentinel` de redis
|
|
||||||
Il est donc nécessaire donc nécessaire de disposer d'un serveur Redis pour utiliser ces applications.
|
|
||||||
|
|
||||||
### Principe général de fonctionnement
|
|
||||||
|
|
||||||
Un `RedisFailOver` crée un cluster redis en mode sentinel avec 3 réplicats chacun.
|
|
||||||
|
|
||||||
|
|
||||||
### Personnalisation
|
|
||||||
|
|
||||||
Via des `patches` sur la ressource `ConfigMap` via un label selector `com.cadoles.forge.sso-kustom/session=redis` il est possible de modifier la valeur du `REDIS_DSN`.
|
|
||||||
|
|
||||||
|
|
||||||
|Clé|Description|Exemple|
|
|
||||||
|---|-----------|-------|
|
|
||||||
|`REDIS_DSN`| DSN du cluster Redis | `redis://rfs-sso-redis:26379?&redis_sentinel=mymaster`
|
|
|
@ -1,11 +0,0 @@
|
||||||
apiVersion: kustomize.config.k8s.io/v1alpha1
|
|
||||||
kind: Component
|
|
||||||
|
|
||||||
resources:
|
|
||||||
- ./resources/redis-failover.yaml
|
|
||||||
|
|
||||||
patches:
|
|
||||||
- path: ./patches/hydra-apps.yaml
|
|
||||||
target:
|
|
||||||
kind: ConfigMap
|
|
||||||
labelSelector: "com.cadoles.forge.sso-kustom/session=redis"
|
|
|
@ -1,3 +0,0 @@
|
||||||
- op: replace
|
|
||||||
path: "/data/REDIS_DSN"
|
|
||||||
value: "redis://rfs-sso-redis:26379?&redis_sentinel=mymaster"
|
|
|
@ -1,21 +0,0 @@
|
||||||
apiVersion: databases.spotahome.com/v1
|
|
||||||
kind: RedisFailover
|
|
||||||
metadata:
|
|
||||||
name: sso-redis
|
|
||||||
spec:
|
|
||||||
sentinel:
|
|
||||||
replicas: 3
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 100m
|
|
||||||
limits:
|
|
||||||
memory: 100Mi
|
|
||||||
redis:
|
|
||||||
replicas: 3
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 100m
|
|
||||||
memory: 100Mi
|
|
||||||
limits:
|
|
||||||
cpu: 400m
|
|
||||||
memory: 500Mi
|
|
|
@ -0,0 +1 @@
|
||||||
|
# Documentation
|
|
@ -15,7 +15,7 @@ L'exemple est actuellement déployé avec le composant `hydra-saml` uniquement.
|
||||||
2. Déployer les opérateurs nécessaires au déploiement
|
2. Déployer les opérateurs nécessaires au déploiement
|
||||||
|
|
||||||
```
|
```
|
||||||
kubectl apply -k ./examples/k8s/kind/cluster --server-side
|
kubectl kustomize --enable-helm ./examples/k8s/kind/cluster | kubectl apply -f -
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Déployer l'application
|
3. Déployer l'application
|
||||||
|
|
|
@ -3,7 +3,6 @@ kind: Kustomization
|
||||||
resources:
|
resources:
|
||||||
- https://github.com/jetstack/cert-manager/releases/download/v1.13.2/cert-manager.yaml
|
- https://github.com/jetstack/cert-manager/releases/download/v1.13.2/cert-manager.yaml
|
||||||
- https://forge.cadoles.com/CadolesKube/c-kustom//base/cloudnative-pg-operator?ref=develop
|
- https://forge.cadoles.com/CadolesKube/c-kustom//base/cloudnative-pg-operator?ref=develop
|
||||||
- https://forge.cadoles.com/CadolesKube/c-kustom//base/redis?ref=develop
|
|
||||||
- https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml
|
- https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml
|
||||||
|
|
||||||
patchesJson6902:
|
patchesJson6902:
|
||||||
|
|
|
@ -15,4 +15,3 @@ components:
|
||||||
- ../../components/hydra-saml
|
- ../../components/hydra-saml
|
||||||
- ../../components/hydra-sql
|
- ../../components/hydra-sql
|
||||||
- ../../components/oidc-test
|
- ../../components/oidc-test
|
||||||
- ../../components/redis
|
|
||||||
|
|
|
@ -5,10 +5,6 @@ resources:
|
||||||
- ./resources/hydra-dispatcher-deployment.yaml
|
- ./resources/hydra-dispatcher-deployment.yaml
|
||||||
- ./resources/hydra-dispatcher-service.yaml
|
- ./resources/hydra-dispatcher-service.yaml
|
||||||
|
|
||||||
generatorOptions:
|
|
||||||
labels:
|
|
||||||
com.cadoles.forge.sso-kustom/session: redis
|
|
||||||
|
|
||||||
configMapGenerator:
|
configMapGenerator:
|
||||||
- name: hydra-dispatcher-env
|
- name: hydra-dispatcher-env
|
||||||
literals:
|
literals:
|
||||||
|
@ -25,7 +21,6 @@ configMapGenerator:
|
||||||
- COOKIE_PATH=/
|
- COOKIE_PATH=/
|
||||||
- DEFAULT_LOCALE=fr
|
- DEFAULT_LOCALE=fr
|
||||||
- APP_LOCALES=fr,en
|
- APP_LOCALES=fr,en
|
||||||
- REDIS_DSN="redis://redis:6379"
|
|
||||||
- name: hydra-dispatcher-apps
|
- name: hydra-dispatcher-apps
|
||||||
files:
|
files:
|
||||||
- apps.yaml=./files/hydra/default.yaml
|
- apps.yaml=./files/hydra/default.yaml
|
||||||
|
|
|
@ -18,7 +18,7 @@ spec:
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: hydra-dispatcher-php-fpm
|
- name: hydra-dispatcher-php-fpm
|
||||||
image: reg.cadoles.com/cadoles/hydra-dispatcher-base:2023.12.15-develop.903.b675347
|
image: reg.cadoles.com/cadoles/hydra-dispatcher-base:2023.11.23-develop.1635.0c3bdb6
|
||||||
args: ["/usr/sbin/php-fpm81", "-F", "-e"]
|
args: ["/usr/sbin/php-fpm81", "-F", "-e"]
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
exec:
|
exec:
|
||||||
|
@ -49,7 +49,7 @@ spec:
|
||||||
name: hydra-dispatcher-apps
|
name: hydra-dispatcher-apps
|
||||||
resources: {}
|
resources: {}
|
||||||
|
|
||||||
- image: reg.cadoles.com/cadoles/hydra-dispatcher-base:2023.12.15-develop.903.b675347
|
- image: reg.cadoles.com/cadoles/hydra-dispatcher-base:2023.11.23-develop.1635.0c3bdb6
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
name: hydra-dispatcher-nginx
|
name: hydra-dispatcher-nginx
|
||||||
args: ["/usr/sbin/nginx"]
|
args: ["/usr/sbin/nginx"]
|
||||||
|
|
Loading…
Reference in New Issue