kubernetes-sigs/cluster-api-provider-aws

ELB Instance port for API should not be hardcoded

Open

#2,316 opened on Mar 21, 2021

View on GitHub
 (22 comments) (0 reactions) (1 assignee)Go (689 forks)auto 404
area/networkinghelp wantedkind/featureneeds-triagepriority/important-soon

Repository metrics

Stars
 (723 stars)
PR merge metrics
 (PR metrics pending)

Description

/kind feature

The ELB instance port for API is hardcoded to 6443 here https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/5d3c76211239b3700d1f69a36c7819f94c5b2609/pkg/cloud/services/elb/loadbalancer.go#L323

Even though the port can be configured in KubeadmControlPlane CR in InitConfiguration part:

https://pkg.go.dev/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta1#APIEndpoint KubeadmControlPlane.Spec.KubeadmConfigSpec.InitConfiguration.LocalAPIEndpoint.BindPort will set the port on API manifest to the desired value

If someone sets that value to something else than 6443 then it will create a broken CAPA cluster.

I would expect the controller to read this information and adjust the ELB config accordingly.

Environment:

  • Cluster-api-provider-aws version: v1alpha3 , cluster-api-aws-controller:v0.6.4

Contributor guide