Remove support for using legacy ELB name

This commit is contained in:
Ciprian Hacman 2020-11-22 08:24:12 +02:00
parent b098ee01e5
commit ffe0af8629
1 changed files with 0 additions and 12 deletions

View File

@ -44,8 +44,6 @@ const (
clusterAutoscalerNodeTemplateTaint = "k8s.io/cluster-autoscaler/node-template/taint/"
)
var UseLegacyELBName = featureflag.New("UseLegacyELBName", featureflag.Bool(false))
// KopsModelContext is the kops model
type KopsModelContext struct {
iam.IAMModelContext
@ -60,16 +58,6 @@ type KopsModelContext struct {
func (m *KopsModelContext) GetELBName32(prefix string) string {
c := m.Cluster.ObjectMeta.Name
if UseLegacyELBName.Enabled() {
tokens := strings.Split(c, ".")
s := fmt.Sprintf("%s-%s", prefix, tokens[0])
if len(s) > 32 {
s = s[:32]
}
klog.Infof("UseLegacyELBName feature-flag is set; built legacy name %q", s)
return s
}
// The LoadBalancerName is exposed publicly as the DNS name for the load balancer.
// So this will likely become visible in a CNAME record - this is potentially some
// information leakage.