mirror of
https://github.com/clastix/kamaji.git
synced 2026-08-26 00:47:20 +00:00
fix: no need to point to https port when using ingress
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
// Copyright 2022 Clastix Labs
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package resources
|
||||
|
||||
const (
|
||||
defaultIngressPort = 443
|
||||
)
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user