From fe0481c30432188b5d491dbcd52b011a60f4aee8 Mon Sep 17 00:00:00 2001 From: Matt Moyer Date: Wed, 2 Dec 2020 10:47:01 -0600 Subject: [PATCH] In integration test env, deploy a ClusterIP service and register that with Dex. Signed-off-by: Matt Moyer --- hack/lib/tilt/Tiltfile | 1 + hack/prepare-for-integration-tests.sh | 3 ++- test/deploy/dex/dex.yaml | 3 +-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hack/lib/tilt/Tiltfile b/hack/lib/tilt/Tiltfile index e657e967..0c176e2c 100644 --- a/hack/lib/tilt/Tiltfile +++ b/hack/lib/tilt/Tiltfile @@ -103,6 +103,7 @@ k8s_yaml(local([ '--data-value-yaml', 'service_http_nodeport_nodeport=31234', '--data-value-yaml', 'service_https_nodeport_port=443', '--data-value-yaml', 'service_https_nodeport_nodeport=31243', + '--data-value-yaml', 'service_https_clusterip_port=443', '--data-value-yaml', 'custom_labels={mySupervisorCustomLabelName: mySupervisorCustomLabelValue}', ])) # Tell tilt to watch all of those files for changes. diff --git a/hack/prepare-for-integration-tests.sh b/hack/prepare-for-integration-tests.sh index 11e1fbf8..97bdcceb 100755 --- a/hack/prepare-for-integration-tests.sh +++ b/hack/prepare-for-integration-tests.sh @@ -230,6 +230,7 @@ if ! tilt_mode; then --data-value-yaml 'service_http_nodeport_nodeport=31234' \ --data-value-yaml 'service_https_nodeport_port=443' \ --data-value-yaml 'service_https_nodeport_nodeport=31243' \ + --data-value-yaml 'service_https_clusterip_port=443' \ >"$manifest" kapp deploy --yes --app "$supervisor_app_name" --diff-changes --file "$manifest" @@ -302,7 +303,7 @@ export PINNIPED_TEST_SUPERVISOR_UPSTREAM_OIDC_ISSUER=https://dex.dex.svc.cluster export PINNIPED_TEST_SUPERVISOR_UPSTREAM_OIDC_ISSUER_CA_BUNDLE="${test_ca_bundle_pem}" export PINNIPED_TEST_SUPERVISOR_UPSTREAM_OIDC_CLIENT_ID=pinniped-supervisor export PINNIPED_TEST_SUPERVISOR_UPSTREAM_OIDC_CLIENT_SECRET=pinniped-supervisor-secret -export PINNIPED_TEST_SUPERVISOR_UPSTREAM_OIDC_CALLBACK_URL=https://127.0.0.1:12345/some/path/callback +export PINNIPED_TEST_SUPERVISOR_UPSTREAM_OIDC_CALLBACK_URL=https://pinniped-supervisor-clusterip.supervisor.svc.cluster.local/some/path/callback export PINNIPED_TEST_SUPERVISOR_UPSTREAM_OIDC_USERNAME=pinny@example.com export PINNIPED_TEST_SUPERVISOR_UPSTREAM_OIDC_PASSWORD=password diff --git a/test/deploy/dex/dex.yaml b/test/deploy/dex/dex.yaml index bd078f24..6a5ecfec 100644 --- a/test/deploy/dex/dex.yaml +++ b/test/deploy/dex/dex.yaml @@ -28,8 +28,7 @@ staticClients: name: 'Pinniped Supervisor' secret: pinniped-supervisor-secret redirectURIs: - - #@ "http://127.0.0.1:" + str(data.values.ports.cli) + "/callback" - - #@ "http://[::1]:" + str(data.values.ports.cli) + "/callback" + - https://pinniped-supervisor-clusterip.supervisor.svc.cluster.local/some/path/callback enablePasswordDB: true staticPasswords: - username: "pinny"