Skip to content

Commit

Permalink
apply suggestion
Browse files Browse the repository at this point in the history
apply suggestion
  • Loading branch information
jiuker committed Aug 8, 2024
1 parent 38b0e0d commit c4ceb8d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/utils/miniojob/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,17 +172,17 @@ 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{
Name: fmt.Sprintf("%s-job-secret", jobCR.Name),
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",
},
Expand Down

0 comments on commit c4ceb8d

Please sign in to comment.