Skip to content

Commit

Permalink
Enable CAAPF by default
Browse files Browse the repository at this point in the history
Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>
  • Loading branch information
Danil-Grigorev committed Jan 15, 2025
1 parent ab93db1 commit 0d27b9d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 17 deletions.
2 changes: 1 addition & 1 deletion charts/rancher-turtles/questions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ questions:
label: Propagate CAPI Labels
group: "Rancher Turtles Features Settings"
- variable: rancherTurtles.features.addon-provider-fleet.enabled
default: false
default: true
description: "Enable Fleet Addon Provider functionality in Rancher Turtles"
type: boolean
label: Seamless integration with Fleet and CAPI
Expand Down
7 changes: 7 additions & 0 deletions charts/rancher-turtles/templates/addon-provider-fleet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,17 @@ data:
cluster:
patchResource: true
setOwnerReferences: true
hostNetwork: true
selector:
matchLabels:
cluster-api.cattle.io/rancher-auto-import: "true"
matchExpressions:
- key: cluster-api.cattle.io/disable-fleet-auto-import
operator: DoesNotExist
namespaceSelector:
matchLabels:
cluster-api.cattle.io/rancher-auto-import: "true"
matchExpressions:
- key: cluster-api.cattle.io/disable-fleet-auto-import
operator: DoesNotExist
{{- end }}
2 changes: 1 addition & 1 deletion charts/rancher-turtles/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ rancherTurtles:
imageVersion: v0.0.0
imagePullPolicy: IfNotPresent
addon-provider-fleet:
enabled: false
enabled: true
agent-tls-mode:
enabled: false
cluster-api-operator:
Expand Down
7 changes: 0 additions & 7 deletions test/e2e/suites/chart-upgrade/chart_upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
_ "embed"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "sigs.k8s.io/controller-runtime/pkg/envtest/komega"

"github.com/rancher/turtles/test/e2e"
Expand All @@ -33,7 +32,6 @@ import (
appsv1 "k8s.io/api/apps/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

turtlesframework "github.com/rancher/turtles/test/framework"
capiframework "sigs.k8s.io/cluster-api/test/framework"
)

Expand Down Expand Up @@ -61,8 +59,6 @@ var _ = Describe("Chart upgrade functionality should work", Label(e2e.ShortTestL

testenv.DeployChartMuseum(ctx, chartMuseumDeployInput)

rtInput.AdditionalValues["rancherTurtles.features.addon-provider-fleet.enabled"] = "true"

upgradeInput := testenv.UpgradeRancherTurtlesInput{
BootstrapClusterProxy: bootstrapClusterProxy,
AdditionalValues: rtInput.AdditionalValues,
Expand All @@ -78,9 +74,6 @@ var _ = Describe("Chart upgrade functionality should work", Label(e2e.ShortTestL
Namespace: e2e.RancherTurtlesNamespace,
}},
}, e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)

By("Setting the CAAPF config to use hostNetwork")
Expect(turtlesframework.Apply(ctx, bootstrapClusterProxy, e2e.AddonProviderFleetHostNetworkPatch)).To(Succeed())
})

upgradeInput.PostUpgradeSteps = append(upgradeInput.PostUpgradeSteps, func() {
Expand Down
4 changes: 0 additions & 4 deletions test/e2e/suites/import-gitops-v3/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,12 @@ var _ = SynchronizedBeforeSuite(
testenv.DeployRancherTurtles(ctx, testenv.DeployRancherTurtlesInput{
BootstrapClusterProxy: setupClusterResult.BootstrapClusterProxy,
CAPIProvidersYAML: e2e.CapiProviders,
AdditionalValues: map[string]string{
"rancherTurtles.features.addon-provider-fleet.enabled": "true",
},
WaitForDeployments: append(
testenv.DefaultDeployments,
testenv.NamespaceName{
Name: "caapf-controller-manager",
Namespace: e2e.RancherTurtlesNamespace,
}),
ConfigurationPatches: [][]byte{e2e.AddonProviderFleetHostNetworkPatch},
})

if !shortTestOnly() && !localTestOnly() {
Expand Down
4 changes: 0 additions & 4 deletions test/e2e/suites/import-gitops/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,13 @@ var _ = SynchronizedBeforeSuite(
testenv.DeployRancherTurtles(ctx, testenv.DeployRancherTurtlesInput{
BootstrapClusterProxy: setupClusterResult.BootstrapClusterProxy,
CAPIProvidersYAML: e2e.CapiProviders,
AdditionalValues: map[string]string{
"rancherTurtles.features.addon-provider-fleet.enabled": "true",
},
WaitForDeployments: append(
testenv.DefaultDeployments,
testenv.NamespaceName{
Name: "caapf-controller-manager",
Namespace: e2e.RancherTurtlesNamespace,
},
),
ConfigurationPatches: [][]byte{e2e.AddonProviderFleetHostNetworkPatch},
})
} else {
testenv.DeployRancherTurtles(ctx, testenv.DeployRancherTurtlesInput{
Expand Down

0 comments on commit 0d27b9d

Please sign in to comment.