Skip to content

Commit 5be1d97

Browse files
Merge pull request #29904 from smg247/microshift-single-replica
TRT-2068: additional defaults for MicroShift
2 parents ccf190a + c79bb50 commit 5be1d97

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

pkg/clioptions/clusterdiscovery/provider.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ 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
129+
// Currently, for the sake of testing, MicroShift can always be assumed to be using ipv4
130+
config.IPFamily = "ipv4"
128131
}
129132

130133
return config, nil

pkg/test/ginkgo/cmd_runsuite.go

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,11 +787,24 @@ func determineEnvironmentFlags(ctx context.Context, upgrade bool, dryRun bool) (
787787

788788
envFlagBuilder := &extensions.EnvironmentFlagsBuilder{}
789789
envFlagBuilder.
790-
AddPlatform(config.ProviderName).
791790
AddNetwork(config.NetworkPlugin).
792791
AddNetworkStack(config.IPFamily).
793792
AddExternalConnectivity(determineExternalConnectivity(config))
794793

794+
platform := config.ProviderName
795+
// MicroShift is defined as "skeleton" in the providerName, but the flag should be "none"
796+
if platform == "skeleton" {
797+
platform = "none"
798+
}
799+
envFlagBuilder.AddPlatform(platform)
800+
801+
if config.SingleReplicaTopology {
802+
// In cases like Microshift, we will not be able to determine the clusterState,
803+
// so topology will be unset unless we default it properly here
804+
singleReplicaTopology := configv1.SingleReplicaTopologyMode
805+
envFlagBuilder.AddTopology(&singleReplicaTopology)
806+
}
807+
795808
clientConfig, err := clientconfigv1.NewForConfig(restConfig)
796809
if err != nil {
797810
return nil, err

0 commit comments

Comments
 (0)