Skip to content

Commit 621b294

Browse files
committed
Check for DualStack featuregates for AWS and Azure
1 parent 26ea4a0 commit 621b294

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

pkg/network/render.go

Lines changed: 13 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,14 @@ func renderAdditionalRoutingCapabilities(conf *operv1.NetworkSpec, manifestDir s
10111011

10121012
return out, nil
10131013
}
1014+
1015+
func updateDualStackPlatforms(featureGates featuregates.FeatureGate) {
1016+
for _, fg := range featureGates.KnownFeatures() {
1017+
if fg == apifeatures.FeatureGateAWSDualStackInstall && featureGates.Enabled(apifeatures.FeatureGateAWSDualStackInstall) {
1018+
dualStackPlatforms.Insert(string(configv1.AWSPlatformType))
1019+
}
1020+
if fg == apifeatures.FeatureGateAzureDualStackInstall && featureGates.Enabled(apifeatures.FeatureGateAzureDualStackInstall) {
1021+
dualStackPlatforms.Insert(string(configv1.AzurePlatformType))
1022+
}
1023+
}
1024+
}

0 commit comments

Comments
 (0)