diff --git a/pkg/utils/miniojob/types.go b/pkg/utils/miniojob/types.go index 70bad3ef311..f01ce1d8183 100644 --- a/pkg/utils/miniojob/types.go +++ b/pkg/utils/miniojob/types.go @@ -172,9 +172,9 @@ func (jobCommand *MinIOIntervalJobCommand) createJob(_ context.Context, _ client }, } baseEnvFrom = append(baseEnvFrom, jobCommand.CommandSpec.EnvFrom...) - scheme := "http://" + scheme := "http" if isTLS { - scheme = "https://" + scheme = "https" } secret := &corev1.Secret{ ObjectMeta: metav1.ObjectMeta{ @@ -182,7 +182,7 @@ func (jobCommand *MinIOIntervalJobCommand) createJob(_ context.Context, _ client Namespace: jobCR.Namespace, }, StringData: map[string]string{ - "MC_HOST_myminio": fmt.Sprintf("%s$(ACCESS_KEY):$(SECRET_KEY)@minio.%s.svc.%s", scheme, jobCR.Namespace, miniov2.GetClusterDomain()), + "MC_HOST_myminio": fmt.Sprintf("%s://$(ACCESS_KEY):$(SECRET_KEY)@minio.%s.svc.%s", scheme, jobCR.Namespace, miniov2.GetClusterDomain()), "MC_STS_ENDPOINT_myminio": fmt.Sprintf("https://sts.%s.svc.%s:%d/sts/%s", miniov2.GetNSFromFile(), miniov2.GetClusterDomain(), stsPort, jobCR.Namespace), "MC_WEB_IDENTITY_TOKEN_FILE_myminio": "/var/run/secrets/kubernetes.io/serviceaccount/token", },