File tree Expand file tree Collapse file tree
pkg/cloudprovider/vsphereparavirtual/config Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,6 +49,8 @@ const (
4949 SupervisorServiceAccountNameEnv string = "SUPERVISOR_CLUSTER_SERVICEACCOUNT_SECRET_NAME"
5050 // SupervisorAPIServerFQDN reads supervisor service API server's fully qualified domain name from env
5151 SupervisorAPIServerFQDN string = "supervisor.default.svc"
52+ // InternalSupervisorHostnameOverrideEnv allows overriding the default supervisor hostname
53+ InternalSupervisorHostnameOverrideEnv string = "INTERNAL_SUPERVISOR_HOSTNAME_OVERRIDE"
5254)
5355
5456// SupervisorEndpoint is the supervisor cluster endpoint
@@ -131,8 +133,14 @@ func GetRestConfig(svConfigPath string) (*rest.Config, error) {
131133 return nil , err
132134 }
133135
136+ supervisorHostname := SupervisorAPIServerFQDN
137+ if override := os .Getenv (InternalSupervisorHostnameOverrideEnv ); override != "" {
138+ klog .V (4 ).Infof ("Using supervisor hostname override: %s" , override )
139+ supervisorHostname = override
140+ }
141+
134142 return & rest.Config {
135- Host : "https://" + net .JoinHostPort (SupervisorAPIServerFQDN , svEndpoint .Port ),
143+ Host : "https://" + net .JoinHostPort (supervisorHostname , svEndpoint .Port ),
136144 TLSClientConfig : rest.TLSClientConfig {
137145 CAData : rootCA ,
138146 },
You can’t perform that action at this time.
0 commit comments