feat: add hydra-oidc component

This commit is contained in:
wpetit 2023-02-01 14:02:39 +01:00
parent 51535d76bf
commit 2a479a1f86
6 changed files with 89 additions and 1 deletions

View File

@ -0,0 +1,12 @@
hydra:
apps:
- id: oidc
title:
fr: Connexion OIDC
en: Login OIDC
description:
fr: Authentification avec OpenID Connect
en: Authentication with OpenID Connect
login_url: "%env(string:HYDRA_DISPATCHER_OIDC_LOGIN_URL)%"
consent_url: "%env(string:HYDRA_DISPATCHER_OIDC_CONSENT_URL)%"
logout_url: "%env(string:HYDRA_DISPATCHER_OIDC_LOGOUT_URL)%"

View File

@ -0,0 +1,23 @@
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
resources:
- ./resources/hydra-oidc-deployment.yaml
- ./resources/hydra-oidc-service.yaml
configMapGenerator:
- name: hydra-oidc-env
literals:
- APP_ENV=prod
- APP_DEBUG=false
- name: hydra-dispatcher-apps
behavior: merge
files:
- ./files/hydra/oidc.yaml
patchesJson6902:
- target:
version: v1
kind: ConfigMap
name: hydra-dispatcher-env
path: patches/hydra-dispatcher-env.yaml

View File

@ -0,0 +1,9 @@
- op: replace
path: "/data/HYDRA_DISPATCHER_OIDC_LOGIN_URL"
value: http://hydra-oidc/login
- op: replace
path: "/data/HYDRA_DISPATCHER_OIDC_CONSENT_URL"
value: http://hydra-oidc/consent
- op: replace
path: "/data/HYDRA_DISPATCHER_OIDC_LOGOUT_URL"
value: http://hydra-oidc/logout

View File

@ -0,0 +1,29 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
io.kompose.service: hydra-oidc
name: hydra-oidc
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: hydra-oidc
strategy:
type: Recreate
template:
metadata:
labels:
io.kompose.service: hydra-oidc
spec:
containers:
- name: hydra-oidc
image: reg.cadoles.com/cadoles/hydra-oidc-v1:v0.0.0-159-gd91e77b
envFrom:
- configMapRef:
name: hydra-oidc-env
ports:
- containerPort: 80
resources: {}
restartPolicy: Always

View File

@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
labels:
io.kompose.service: hydra-oidc
name: hydra-oidc
spec:
ports:
- name: hydra-oidc
port: 80
selector:
io.kompose.service: hydra-oidc
status:
loadBalancer: {}

View File

@ -6,4 +6,5 @@ resources:
- ./resources/hydra-dispatcher
components:
- ./components/hydra-cnpg-database
- ./components/hydra-cnpg-database
- ./components/hydra-oidc