Parameterize the supervisor_redirect_uri in the test env Dex.

Signed-off-by: Matt Moyer <moyerm@vmware.com>
This commit is contained in:
Matt Moyer 2020-12-03 12:45:56 -06:00
parent cb5e494815
commit 408fbe4f76
No known key found for this signature in database
GPG Key ID: EAE88AD172C5AE2D
4 changed files with 11 additions and 2 deletions

View File

@ -23,7 +23,10 @@ local_resource(
#
# Render the IDP installation manifest using ytt.
k8s_yaml(local(['ytt','--file', '../../../test/deploy/dex']))
k8s_yaml(local(['ytt',
'--file', '../../../test/deploy/dex',
'--data-value', 'supervisor_redirect_uri=https://pinniped-supervisor-clusterip.supervisor.svc.cluster.local/some/path/callback',
]))
# Tell tilt to watch all of those files for changes.
watch_file('../../../test/deploy/dex')

View File

@ -184,6 +184,10 @@ if ! tilt_mode; then
log_note "Deploying Dex to the cluster..."
ytt --file . >"$manifest"
ytt --file . \
--data-value "supervisor_redirect_uri=https://pinniped-supervisor-clusterip.supervisor.svc.cluster.local/some/path/callback" \
>"$manifest"
kubectl apply --dry-run=client -f "$manifest" # Validate manifest schema.
kapp deploy --yes --app dex --diff-changes --file "$manifest"

View File

@ -28,7 +28,7 @@ staticClients:
name: 'Pinniped Supervisor'
secret: pinniped-supervisor-secret
redirectURIs:
- https://pinniped-supervisor-clusterip.supervisor.svc.cluster.local/some/path/callback
- #@ data.values.supervisor_redirect_uri
enablePasswordDB: true
staticPasswords:
- username: "pinny"

View File

@ -15,3 +15,5 @@ ports:
#! External port where the proxy ends up exposed on localhost during tests. This value comes from
#! our Kind configuration which maps 127.0.0.1:12346 to port 31235 on the Kind worker node.
local: 12346
supervisor_redirect_uri: ""