Context
PR #3856 migrated the dev cluster registry from a host-side container to an in-cluster Kubernetes deployment. This removed teardownRegistry, which was the only consumer of ContainerEngineOverride in the delete path.
Problem
The --container-engine flag on func cluster delete (cmd/cluster.go:233-234) is now dead code. It parses and stores a value in ContainerEngineOverride, but nothing in Delete() reads it.
Evidence:
Delete() (pkg/cluster/delete.go:21-55) uses cfg.Kubeconfig(), cfg.kind(), cfg.Name, and cfg.SkipRegistryConfig. It never calls cfg.ContainerEngine().
- The only callsite of
ContainerEngine() in the cluster package is getKindNodeIPs (kubernetes.go:143), which runs during create, not delete.
revertHostRegistry() auto-detects engines via hasCommand(), completely ignoring the override.
Tested empirically: func cluster delete --container-engine=podman behaves identically to func cluster delete — the flag is silently ignored.
Suggested fix
Remove the --container-engine flag and ContainerEngineOverride from newClusterDeleteConfig() in cmd/cluster.go. Also remove it from the PreRunE: bindEnv(...) call and the usage template.
/kind cleanup
Context
PR #3856 migrated the dev cluster registry from a host-side container to an in-cluster Kubernetes deployment. This removed
teardownRegistry, which was the only consumer ofContainerEngineOverridein the delete path.Problem
The
--container-engineflag onfunc cluster delete(cmd/cluster.go:233-234) is now dead code. It parses and stores a value inContainerEngineOverride, but nothing inDelete()reads it.Evidence:
Delete()(pkg/cluster/delete.go:21-55) usescfg.Kubeconfig(),cfg.kind(),cfg.Name, andcfg.SkipRegistryConfig. It never callscfg.ContainerEngine().ContainerEngine()in the cluster package isgetKindNodeIPs(kubernetes.go:143), which runs during create, not delete.revertHostRegistry()auto-detects engines viahasCommand(), completely ignoring the override.Tested empirically:
func cluster delete --container-engine=podmanbehaves identically tofunc cluster delete— the flag is silently ignored.Suggested fix
Remove the
--container-engineflag andContainerEngineOverridefromnewClusterDeleteConfig()incmd/cluster.go. Also remove it from thePreRunE: bindEnv(...)call and the usage template./kind cleanup