Skip to content

Commit

Permalink
Merge pull request #2780 from openshift-cherrypick-robot/cherry-pick-…
Browse files Browse the repository at this point in the history
…2766-to-release-4.17

Bug 2307823:[release-4.17] use qualified name upto ".svc" for endpoint svc in native storageclient
  • Loading branch information
openshift-merge-bot[bot] authored Sep 3, 2024
2 parents b7858f1 + 04f7929 commit 821403a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions controllers/storagecluster/storageclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ func (s *storageClient) ensureCreated(r *StorageClusterReconciler, storagecluste
}
storageClient.Spec.OnboardingTicket = token
}
// the controller of storageclient is running in same namespace and should be able to resolve the endpoint
// via servicename:serviceport irrespective of clusterip/nodeport/lb
storageClient.Spec.StorageProviderEndpoint = fmt.Sprintf("%s:%d", ocsProviderServerName, ocsProviderServicePort)
// we could just use svcName:port however in-cluster traffic from "*.svc" is generally not proxied and
// we using qualified name upto ".svc" makes connection not go through any proxies.
storageClient.Spec.StorageProviderEndpoint = fmt.Sprintf("%s.%s.svc:%d", ocsProviderServerName, storagecluster.Namespace, ocsProviderServicePort)
return nil
})
if err != nil {
Expand Down

0 comments on commit 821403a

Please sign in to comment.