@@ -41,13 +41,19 @@ import (
4141)
4242
4343const (
44- bootstrapKubeadmPath = "providers.bootstrapKubeadm.enabled"
45- controlplaneKubeadmPath = "providers.controlplaneKubeadm.enabled"
46- dockerPath = "providers.infrastructureDocker.enabled"
47- awsPath = "providers.infrastructureAWS.enabled"
48- azurePath = "providers.infrastructureAzure.enabled"
49- gcpPath = "providers.infrastructureGCP.enabled"
50- vspherePath = "providers.infrastructureVSphere.enabled"
44+ providerEnabledKey = "enabled"
45+ providerVerbosityKey = "manager.verbosity"
46+ debugVerbosityValue = "5"
47+
48+ bootstrapRKE2Path = "providers.bootstrapRKE2."
49+ controlplaneRKE2Path = "providers.controlplaneRKE2."
50+ bootstrapKubeadmPath = "providers.bootstrapKubeadm."
51+ controlplaneKubeadmPath = "providers.controlplaneKubeadm."
52+ dockerPath = "providers.infrastructureDocker."
53+ awsPath = "providers.infrastructureAWS."
54+ azurePath = "providers.infrastructureAzure."
55+ gcpPath = "providers.infrastructureGCP."
56+ vspherePath = "providers.infrastructureVSphere."
5157
5258 defaultOCIRegistry = "registry.rancher.com/rancher/cluster-api-controller-components"
5359
@@ -172,19 +178,29 @@ func DeployRancherTurtlesProviders(ctx context.Context, input DeployRancherTurtl
172178 for _ , p := range providerList {
173179 provider := strings .TrimSpace (strings .ToLower (p ))
174180 switch provider {
181+ case "rke2" :
182+ values [bootstrapRKE2Path + providerVerbosityKey ] = debugVerbosityValue
183+ values [controlplaneRKE2Path + providerVerbosityKey ] = debugVerbosityValue
175184 case "kubeadm" :
176- values [bootstrapKubeadmPath ] = "true"
177- values [controlplaneKubeadmPath ] = "true"
185+ values [bootstrapKubeadmPath + providerEnabledKey ] = "true"
186+ values [bootstrapKubeadmPath + providerVerbosityKey ] = debugVerbosityValue
187+ values [controlplaneKubeadmPath + providerEnabledKey ] = "true"
188+ values [controlplaneKubeadmPath + providerVerbosityKey ] = debugVerbosityValue
178189 case "docker" , "capd" :
179- values [dockerPath ] = "true"
190+ values [dockerPath + providerEnabledKey ] = "true"
191+ values [dockerPath + providerVerbosityKey ] = debugVerbosityValue
180192 case "aws" , "capa" :
181- values [awsPath ] = "true"
193+ values [awsPath + providerEnabledKey ] = "true"
194+ values [awsPath + providerVerbosityKey ] = debugVerbosityValue
182195 case "azure" , "capz" :
183- values [azurePath ] = "true"
196+ values [azurePath + providerEnabledKey ] = "true"
197+ values [azurePath + providerVerbosityKey ] = debugVerbosityValue
184198 case "gcp" , "capg" :
185- values [gcpPath ] = "true"
199+ values [gcpPath + providerEnabledKey ] = "true"
200+ values [gcpPath + providerVerbosityKey ] = debugVerbosityValue
186201 case "vsphere" , "capv" :
187- values [vspherePath ] = "true"
202+ values [vspherePath + providerEnabledKey ] = "true"
203+ values [vspherePath + providerVerbosityKey ] = debugVerbosityValue
188204 case "" , "all" :
189205 default :
190206 log .FromContext (ctx ).Info ("Unknown provider in TURTLES_PROVIDERS, ignoring" , "provider" , provider )
@@ -295,13 +311,22 @@ func runProviderMigration(ctx context.Context, scriptPath, kubeconfigPath string
295311}
296312
297313func enableAllProviders (values map [string ]string ) {
298- values [bootstrapKubeadmPath ] = "true"
299- values [controlplaneKubeadmPath ] = "true"
300- values [dockerPath ] = "true"
301- values [awsPath ] = "true"
302- values [azurePath ] = "true"
303- values [gcpPath ] = "true"
304- values [vspherePath ] = "true"
314+ values [bootstrapRKE2Path + providerVerbosityKey ] = debugVerbosityValue
315+ values [controlplaneRKE2Path + providerVerbosityKey ] = debugVerbosityValue
316+ values [bootstrapKubeadmPath + providerEnabledKey ] = "true"
317+ values [bootstrapKubeadmPath + providerVerbosityKey ] = debugVerbosityValue
318+ values [controlplaneKubeadmPath + providerEnabledKey ] = "true"
319+ values [controlplaneKubeadmPath + providerVerbosityKey ] = debugVerbosityValue
320+ values [dockerPath + providerEnabledKey ] = "true"
321+ values [dockerPath + providerVerbosityKey ] = debugVerbosityValue
322+ values [awsPath + providerEnabledKey ] = "true"
323+ values [awsPath + providerVerbosityKey ] = debugVerbosityValue
324+ values [azurePath + providerEnabledKey ] = "true"
325+ values [azurePath + providerVerbosityKey ] = debugVerbosityValue
326+ values [gcpPath + providerEnabledKey ] = "true"
327+ values [gcpPath + providerVerbosityKey ] = debugVerbosityValue
328+ values [vspherePath + providerEnabledKey ] = "true"
329+ values [vspherePath + providerVerbosityKey ] = debugVerbosityValue
305330}
306331
307332func getAdoptArgsForEnabledProviders (enabled []string , values map [string ]string ) []string {
@@ -335,25 +360,25 @@ func getAdoptArgsForEnabledProviders(enabled []string, values map[string]string)
335360
336361func getEnabledCAPIProviders (values map [string ]string ) []string {
337362 out := []string {}
338- if values [bootstrapKubeadmPath ] == "true" {
363+ if values [bootstrapKubeadmPath + providerEnabledKey ] == "true" {
339364 out = append (out , providerKubeadmBootstrap )
340365 }
341- if values [controlplaneKubeadmPath ] == "true" {
366+ if values [controlplaneKubeadmPath + providerEnabledKey ] == "true" {
342367 out = append (out , providerKubeadmControlPlane )
343368 }
344- if values [dockerPath ] == "true" {
369+ if values [dockerPath + providerEnabledKey ] == "true" {
345370 out = append (out , providerDocker )
346371 }
347- if values [awsPath ] == "true" {
372+ if values [awsPath + providerEnabledKey ] == "true" {
348373 out = append (out , providerAWS )
349374 }
350- if values [azurePath ] == "true" {
375+ if values [azurePath + providerEnabledKey ] == "true" {
351376 out = append (out , providerAzure )
352377 }
353- if values [gcpPath ] == "true" {
378+ if values [gcpPath + providerEnabledKey ] == "true" {
354379 out = append (out , providerGCP )
355380 }
356- if values [vspherePath ] == "true" {
381+ if values [vspherePath + providerEnabledKey ] == "true" {
357382 out = append (out , providerVSphere )
358383 }
359384 return out
0 commit comments