feat(hydra-sql): adding new hydra login app

This commit is contained in:
Philippe Caseiro 2023-06-12 14:09:12 +02:00
parent 8075071f22
commit 9d60b4bbee
4 changed files with 85 additions and 0 deletions

View File

@ -0,0 +1,24 @@
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
resources:
- ./resources/hydra-sql-service.yaml
- ./resources/hydra-sql-deployment.yaml
configMapGenerator:
- name: hydra-sql-env
literals:
- ISSUER_URL="http://localhost:8000"
- BASE_URL='http://localhost:8080'
- HYDRA_ADMIN_BASE_URL='http://hydra:4445'
- APP_LOCALES="fr,en"
- HASH_ALGO_LEGACY="sha256, bcrypt"
- SECURITY_PATTERN="password,salt,pepper"
- DSN_REMOTE_DATABASE="pgsql:host='postgres';port=5432;dbname=lasql"
secretGenerator:
- name: login-db
literals:
- DB_USER=""
- DB_PASSWORD=""
- PEPPER=""

View File

@ -0,0 +1,46 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
io.kompose.service: hydra-sql
name: hydra-sql
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: hydra-sql
strategy:
type: Recreate
template:
metadata:
labels:
io.kompose.service: hydra-sql
spec:
containers:
- name: hydra-sql
image: reg.cadoles.com/cadoles/hydra-sql:latest
envFrom:
- configMapRef:
name: hydra-sql-env
- secret
env:
- name: DB_USER
valueFrom:
secretKeyRef:
name: login-db
key: DB_USER
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: login-db
key: DB_PASSWORD
- name: PEPPER
valueFrom:
secretKeyRef:
name: login-db
key: PEPPER
ports:
- containerPort: 80
resources: {}
restartPolicy: Always

View File

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

View File

@ -9,3 +9,4 @@ components:
- ./components/hydra-cnpg-database
- ./components/hydra-oidc
- ./components/hydra-saml
- ./components/hydra-sql