From 8c24302d8ee0a55a92cb3a514b5b21dc6b1bf344 Mon Sep 17 00:00:00 2001 From: Dario Tranchitella Date: Wed, 13 Jul 2022 21:55:26 +0200 Subject: [PATCH] fix: no need to point to https port when using ingress --- internal/resources/constants.go | 8 -------- internal/resources/kubeconfig.go | 8 -------- 2 files changed, 16 deletions(-) delete mode 100644 internal/resources/constants.go diff --git a/internal/resources/constants.go b/internal/resources/constants.go deleted file mode 100644 index 7b6c6f5..0000000 --- a/internal/resources/constants.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2022 Clastix Labs -// SPDX-License-Identifier: Apache-2.0 - -package resources - -const ( - defaultIngressPort = 443 -) diff --git a/internal/resources/kubeconfig.go b/internal/resources/kubeconfig.go index 3b420d6..041b197 100644 --- a/internal/resources/kubeconfig.go +++ b/internal/resources/kubeconfig.go @@ -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