Skip to content

Finalize removal of embedded cluster api feature #1795

@salasberryfin

Description

@salasberryfin

Description

With #1793, Turtles chart will no longer apply any pre-install hooks, which used to:

  • Set embedded-cluster-api feature of Rancher to false.
  • Remove conflicting mutating and validating webhooks.

However, this won't be enough to get Turtles running until it is installed as a system chart: rancher/rancher#52067. For this reason, the test and dev environments are patched to apply these removed operations during environment setup and before the chart is applied.

These added patches to keep Turtles functioning as an extension for the time being, need to be removed entirely when eventually Rancher does all this work for us.

Finally, the documentation includes references to the removed tasks that need to be removed: https://github.com/rancher/turtles-docs/blob/dbceadfe6f93ac12df57985c8156ed24e25b251b/docs/next/modules/en/pages/tutorials/quickstart.adoc?plain=1#L64

Definition of Done

  • The updated chart is installed as a system chart with Rancher.
  • Documentation does not mention embedded cluster api feature or webhook cleanup.
  • Turtles test and dev environments no longer need to apply the patched configuration and Turtles will just work as installed together with Rancher.

E2E Test

// this is a temporary workaround for installing turtles chart as extension
// after the pre-install hook has been removed and before it becomes a part of Rancher.
By("Disabling Rancher embedded CAPI")
Expect(turtlesframework.Apply(ctx, input.BootstrapClusterProxy, e2e.RancherTurtlesPreInstall)).To(Succeed())
webhooks := map[string]string{
"mutatingwebhookconfiguration": "mutating-webhook-configuration",
"validatingwebhookconfiguration": "validating-webhook-configuration",
}
for wtype, wname := range webhooks {
By("Removing " + wname + " webhook")
cmd := exec.Command("kubectl", []string{
"--kubeconfig", input.BootstrapClusterProxy.GetKubeconfigPath(),
"delete",
wtype, wname,
"--ignore-not-found",
}...)

Development environment

pre_install_configuration() {
kubectl apply -f test/e2e/data/rancher/pre-turtles-install.yaml
kubectl delete \
mutatingwebhookconfiguration mutating-webhook-configuration \
--ignore-not-found
kubectl delete \
validatingwebhookconfiguration validating-webhook-configuration \
--ignore-not-found

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/installationkind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.

    Type

    Projects

    Status

    Team Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions