Skip to content

Commit

Permalink
Add https:// to service URL in EEC (#3804)
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanHauth authored Sep 18, 2024
1 parent da71084 commit 1393e2a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/controllers/dynakube/extension/eec/reconciler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ func TestEnvironmentVariables(t *testing.T) {
assert.Equal(t, corev1.EnvVar{Name: envExtensionsModuleExecPathName, Value: envExtensionsModuleExecPath}, statefulSet.Spec.Template.Spec.Containers[0].Env[4])
assert.Equal(t, corev1.EnvVar{Name: envDsInstallDirName, Value: envDsInstallDir}, statefulSet.Spec.Template.Spec.Containers[0].Env[5])
assert.Equal(t, corev1.EnvVar{Name: envK8sClusterId, Value: dk.Status.KubeSystemUUID}, statefulSet.Spec.Template.Spec.Containers[0].Env[6])
assert.Equal(t, corev1.EnvVar{Name: envK8sExtServiceUrl, Value: dk.Name + consts.ExtensionsControllerSuffix + "." + dk.Namespace}, statefulSet.Spec.Template.Spec.Containers[0].Env[7])
assert.Equal(t, corev1.EnvVar{Name: envK8sExtServiceUrl, Value: "https://" + dk.Name + consts.ExtensionsControllerSuffix + "." + dk.Namespace}, statefulSet.Spec.Template.Spec.Containers[0].Env[7])
assert.Equal(t, corev1.EnvVar{Name: envDSTokenPath, Value: eecTokenMountPath + "/" + consts.OtelcTokenSecretKey}, statefulSet.Spec.Template.Spec.Containers[0].Env[8])
assert.Equal(t, corev1.EnvVar{Name: envHttpsCertPathPem, Value: envEecHttpsCertPathPem}, statefulSet.Spec.Template.Spec.Containers[0].Env[9])
assert.Equal(t, corev1.EnvVar{Name: envHttpsPrivKeyPathPem, Value: envEecHttpsPrivKeyPathPem}, statefulSet.Spec.Template.Spec.Containers[0].Env[10])
Expand Down
3 changes: 2 additions & 1 deletion pkg/controllers/dynakube/extension/eec/statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ const (
httpsCertMountPath = "/var/lib/dynatrace/remotepluginmodule/secrets/https"
extensionsControllerTlsSecretName = "extensions-controller-tls"
runtimeConfigurationFilename = "runtimeConfiguration"
serviceUrlScheme = "https://"

// misc
logVolumeName = "log"
Expand Down Expand Up @@ -210,7 +211,7 @@ func buildContainerEnvs(dk *dynakube.DynaKube) []corev1.EnvVar {
{Name: envExtensionsModuleExecPathName, Value: envExtensionsModuleExecPath},
{Name: envDsInstallDirName, Value: envDsInstallDir},
{Name: envK8sClusterId, Value: dk.Status.KubeSystemUUID},
{Name: envK8sExtServiceUrl, Value: servicename.BuildFQDN(dk)},
{Name: envK8sExtServiceUrl, Value: serviceUrlScheme + servicename.BuildFQDN(dk)},
{Name: envDSTokenPath, Value: eecTokenMountPath + "/" + consts.OtelcTokenSecretKey},
{Name: envHttpsCertPathPem, Value: envEecHttpsCertPathPem},
{Name: envHttpsPrivKeyPathPem, Value: envEecHttpsPrivKeyPathPem},
Expand Down

0 comments on commit 1393e2a

Please sign in to comment.