Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for dex in the test cluster #611

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cluster-scope/overlays/nerc-ocp-test/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ resources:
- ../common
- ../../base/rbac.authorization.k8s.io/clusterroles/allow-edit-rbac
- ../../base/core/namespaces/openshift-gitops
- ../../base/core/namespaces/dex
- externalsecrets
- secretstores
- issuers
Expand Down
46 changes: 46 additions & 0 deletions dex/overlays/nerc-ocp-test/configmaps/files/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
issuer: https://dex-dex.apps.ocp-test.nerc.mghpcc.org

storage:
type: memory

web:
http: "0.0.0.0:5556"

grpc:
addr: "0.0.0.0:5557"

telemetry:
http: "0.0.0.0:5558"

oauth2:
skipApprovalScreen: true

staticClients:
- id: grafana
name: Grafana
redirectURIs:
- https://grafana.apps.ocp-test.nerc.mghpcc.org/login/generic_oauth
secretEnv: GRAFANA_SECRET
- id: minio
name: MinIO
redirectURIs:
- https://minio-console-minio.apps.ocp-test.nerc.mghpcc.org/oauth_callback
- https://minio-minio.apps.ocp-test.nerc.mghpcc.org/oauth_callback
secretEnv: MINIO_IDENTITY_OPENID_CLIENT_SECRET
- id: ai-telemetry
name: AI Telemetry
redirectURIs:
- https://keycloak.apps.obs.nerc.mghpcc.org/realms/NERC/broker/OpenShift/endpoint
secretEnv: AI_TELEMETRY_AUTH_SECRET

connectors:
- type: openshift
id: openshift
name: OpenShift
config:
issuer: https://kubernetes.default.svc
clientID: system:serviceaccount:dex:dex
clientSecret: $OPENSHIFT_CLIENT_SECRET
redirectURI: https://dex-dex.apps.ocp-test.nerc.mghpcc.org/callback
groups:
- system:authenticated
10 changes: 10 additions & 0 deletions dex/overlays/nerc-ocp-test/configmaps/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

commonAnnotations:
kustomize.config.k8s.io/behavior: merge

configMapGenerator:
- files:
- files/config.yaml
name: dex
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: dex-clients
spec:
dataFrom:
- extract:
key: nerc-ocp-test/dex/dex-clients
8 changes: 8 additions & 0 deletions dex/overlays/nerc-ocp-test/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: dex
resources:
- ../../base
- configmaps
patches:
- path: externalsecrets/dex-clients_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ auth:
- koku-metrics-operator
- curator-system
- csi-wekafsplugin
- dex
name: secret-reader
policies:
- nerc-common-reader
Expand Down