fix: no need to point to https port when using ingress

This commit is contained in:
Dario Tranchitella
2022-07-14 06:57:10 +00:00
parent 84dce57039
commit 8c24302d8e
2 changed files with 0 additions and 16 deletions
-8
View File
@@ -1,8 +0,0 @@
// Copyright 2022 Clastix Labs
// SPDX-License-Identifier: Apache-2.0
package resources
const (
defaultIngressPort = 443
)
-8
View File
@@ -171,8 +171,6 @@ func (r *KubeconfigResource) mutate(ctx context.Context, tenantControlPlane *kam
func (r *KubeconfigResource) customizeConfig(config *kubeadm.Configuration) error {
switch r.KubeConfigFileName {
case kubeadmconstants.AdminKubeConfigFileName:
return r.ingressAsAdvertiseAddress(config)
case kubeadmconstants.ControllerManagerKubeConfigFileName:
return r.localhostAsAdvertiseAddress(config)
case kubeadmconstants.SchedulerKubeConfigFileName:
@@ -182,12 +180,6 @@ func (r *KubeconfigResource) customizeConfig(config *kubeadm.Configuration) erro
}
}
func (r *KubeconfigResource) ingressAsAdvertiseAddress(config *kubeadm.Configuration) error {
config.InitConfiguration.LocalAPIEndpoint.BindPort = defaultIngressPort
return nil
}
func (r *KubeconfigResource) localhostAsAdvertiseAddress(config *kubeadm.Configuration) error {
config.InitConfiguration.LocalAPIEndpoint.AdvertiseAddress = localhost