Skip to content

Commit 4696a48

Browse files
committed
Check for DualStack featuregates for AWS and Azure
1 parent 02abe35 commit 4696a48

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

pkg/network/render.go

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ var dualStackPlatforms = sets.NewString(
3636
string(configv1.NonePlatformType),
3737
string(configv1.VSpherePlatformType),
3838
string(configv1.OpenStackPlatformType),
39-
string(configv1.AWSPlatformType),
40-
string(configv1.AzurePlatformType),
4139
)
4240

4341
var conversionToDualStackPlatforms = sets.NewString(
@@ -174,6 +172,8 @@ func Render(operConf *operv1.NetworkSpec, clusterConf *configv1.NetworkSpec, man
174172
return nil, progressing, err
175173
}
176174

175+
updateDualStackPlatforms(featureGates)
176+
177177
log.Printf("Render phase done, rendered %d objects", len(objs))
178178
return objs, progressing, nil
179179
}
@@ -1011,3 +1011,15 @@ func renderAdditionalRoutingCapabilities(conf *operv1.NetworkSpec, manifestDir s
10111011

10121012
return out, nil
10131013
}
1014+
1015+
func updateDualStackPlatforms(featureGates featuregates.FeatureGate) {
1016+
switch {
1017+
case featureGates.Enabled(apifeatures.FeatureGateAWSDualStackInstall):
1018+
dualStackPlatforms.Insert(string(configv1.AWSPlatformType))
1019+
case featureGates.Enabled(apifeatures.FeatureGateAzureDualStackInstall):
1020+
dualStackPlatforms.Insert(string(configv1.AzurePlatformType))
1021+
default:
1022+
return
1023+
}
1024+
return
1025+
}

0 commit comments

Comments
 (0)