Skip to content

Commit

Permalink
Merge pull request #611 from computate/minio-with-dex-on-test
Browse files Browse the repository at this point in the history
Adding support for dex in the test cluster
  • Loading branch information
computate authored Nov 27, 2024
2 parents 3777e4b + 664e64b commit ab67db3
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 0 deletions.
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

0 comments on commit ab67db3

Please sign in to comment.