sso-kustom/components/hydra-cnpg-database/kustomization.yaml
Philippe Caseiro 8075071f22 feat(resource): adding new hydra-maester resource
This allow to manage "Clients" with a CRD

from official doc:

The controller listens for Custom Resource which defines client registration request.
Once Custom resource is created, the controller register oauth2 client in hydra using
hydra's REST API.

Client Id, Client Secret and Identifier of the client in hydra are be stored in the
kubernetes as a secret and referenced in the applied CR. Reference is used to
identify in which kubernetes secret are stored mentioned properties.

Secret iscreated in the same namespace of applied CR. By default controller should
be deployed in the same pod as hydra. Service discovery will come in place in the future.
2023-06-12 14:07:51 +02:00

45 lines
816 B
YAML

apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
configurations:
- ./configurations/cnpg-cluster.yaml
resources:
- ./resources/hydra-cnpg-cluster.yaml
secretGenerator:
- name: hydra-postgres-admin
type: Secret
literals:
- username=postgres
- password=NotSoSecret
- name: hydra-postgres-user
type: Secret
literals:
- username=hydra
- password=NotSoSecret
vars:
- name: HYDRA_DATABASE_SERVICE_NAME
objref:
name: hydra-postgres
kind: Cluster
apiVersion: postgresql.cnpg.io/v1
fieldref:
fieldpath: metadata.name
patchesJson6902:
- target:
group: apps
version: v1
kind: Deployment
name: hydra
path: patches/hydra-deployment.yaml
- target:
group: batch
version: v1
kind: Job
name: hydra-migrate
path: patches/hydra-migrate-job.yaml