Skip to content

Commit 38d4e28

Browse files
committed
set topology for MicroShift to SingleReplica
1 parent 1cef4af commit 38d4e28

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

pkg/clioptions/clusterdiscovery/provider.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ func DecodeProvider(providerTypeOrJSON string, dryRun, discover bool, clusterSta
125125
config.HasNoOptionalCapabilities = true
126126
// Currently, for the sake of testing, MicroShift can always be assumed to be using OVNKubernetes
127127
config.NetworkPlugin = "OVNKubernetes"
128+
config.SingleReplicaTopology = true
128129
}
129130

130131
return config, nil

pkg/test/ginkgo/cmd_runsuite.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,13 @@ func determineEnvironmentFlags(ctx context.Context, upgrade bool, dryRun bool) (
792792
AddNetworkStack(config.IPFamily).
793793
AddExternalConnectivity(determineExternalConnectivity(config))
794794

795+
if config.SingleReplicaTopology {
796+
// In cases like Microshift, we will not be able to determine the clusterState,
797+
// so topology will be unset unless we default it properly here
798+
singleReplicaTopology := configv1.SingleReplicaTopologyMode
799+
envFlagBuilder.AddTopology(&singleReplicaTopology)
800+
}
801+
795802
clientConfig, err := clientconfigv1.NewForConfig(restConfig)
796803
if err != nil {
797804
return nil, err

0 commit comments

Comments
 (0)