diff --git a/deploy/deployment.yaml b/deploy/deployment.yaml index 543b8db3..35024701 100644 --- a/deploy/deployment.yaml +++ b/deploy/deployment.yaml @@ -25,7 +25,7 @@ data: #@yaml/text-templated-strings placeholder-name.yaml: | discovery: - url: (@= data.values.discovery_url @) + url: (@= data.values.discovery_url or "null" @) webhook: url: (@= data.values.webhook_url @) caBundle: (@= data.values.webhook_ca_bundle @) diff --git a/test/integration/logindiscoveryconfig_test.go b/test/integration/logindiscoveryconfig_test.go index bac62b17..5a5cc169 100644 --- a/test/integration/logindiscoveryconfig_test.go +++ b/test/integration/logindiscoveryconfig_test.go @@ -21,7 +21,6 @@ import ( func TestSuccessfulLoginDiscoveryConfig(t *testing.T) { namespaceName := library.Getenv(t, "PLACEHOLDER_NAME_NAMESPACE") - discoveryURL := library.Getenv(t, "PLACEHOLDER_NAME_DISCOVERY_URL") client := library.NewPlaceholderNameClientset(t) @@ -29,7 +28,7 @@ func TestSuccessfulLoginDiscoveryConfig(t *testing.T) { defer cancel() config := library.NewClientConfig(t) - expectedLDCSpec := expectedLDCSpec(config, discoveryURL) + expectedLDCSpec := expectedLDCSpec(config) configList, err := client. CrdsV1alpha1(). LoginDiscoveryConfigs(namespaceName). @@ -41,7 +40,6 @@ func TestSuccessfulLoginDiscoveryConfig(t *testing.T) { func TestReconcilingLoginDiscoveryConfig(t *testing.T) { namespaceName := library.Getenv(t, "PLACEHOLDER_NAME_NAMESPACE") - discoveryURL := library.Getenv(t, "PLACEHOLDER_NAME_DISCOVERY_URL") client := library.NewPlaceholderNameClientset(t) @@ -55,7 +53,7 @@ func TestReconcilingLoginDiscoveryConfig(t *testing.T) { require.NoError(t, err) config := library.NewClientConfig(t) - expectedLDCSpec := expectedLDCSpec(config, discoveryURL) + expectedLDCSpec := expectedLDCSpec(config) var actualLDC *crdsplaceholderv1alpha1.LoginDiscoveryConfig for i := 0; i < 10; i++ { @@ -72,9 +70,9 @@ func TestReconcilingLoginDiscoveryConfig(t *testing.T) { require.Equal(t, expectedLDCSpec, &actualLDC.Spec) } -func expectedLDCSpec(config *rest.Config, discoveryURL string) *crdsplaceholderv1alpha1.LoginDiscoveryConfigSpec { +func expectedLDCSpec(config *rest.Config) *crdsplaceholderv1alpha1.LoginDiscoveryConfigSpec { return &crdsplaceholderv1alpha1.LoginDiscoveryConfigSpec{ - Server: discoveryURL, + Server: config.Host, CertificateAuthorityData: base64.StdEncoding.EncodeToString(config.TLSClientConfig.CAData), } }