Skip to content

Commit cb077a4

Browse files
authored
Merge pull request #3917 from Ankitasw/set-default-lb
Always populate ControlPlaneLoadBalancer type as classic if not provided by user
2 parents fa92da8 + 93b740f commit cb077a4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

api/v1beta2/defaults.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,12 @@ func SetDefaults_AWSClusterSpec(s *AWSClusterSpec) { //nolint:golint,stylecheck
6363
}
6464
if s.ControlPlaneLoadBalancer == nil {
6565
s.ControlPlaneLoadBalancer = &AWSLoadBalancerSpec{
66-
Scheme: &ELBSchemeInternetFacing,
67-
LoadBalancerType: LoadBalancerTypeClassic,
66+
Scheme: &ELBSchemeInternetFacing,
6867
}
6968
}
69+
if s.ControlPlaneLoadBalancer.LoadBalancerType == "" {
70+
s.ControlPlaneLoadBalancer.LoadBalancerType = LoadBalancerTypeClassic
71+
}
7072
}
7173

7274
// SetDefaults_Labels is used to default cluster scope resources for clusterctl move.

0 commit comments

Comments
 (0)