Skip to content

Commit

Permalink
uninstall: when --wait is specified, use foreground deletion.
Browse files Browse the repository at this point in the history
By default, the helm libraries will use background cascading delete which
means the call to do helm uninstall returns following the deployment being removed.

This means that running workloads, such as hubble-relay, may continue to be in the terminating state
following `cilium uninstall --wait` exiting.

We depend on this behavior in CI E2E to clean up and reuse clusters for testing Cilium in different configurations.

In flakes such as: cilium/cilium#30993 it seems like the old Hubble Pods are bleeding into the "fresh" install.
These should be harmless, however this is triggering failures of the [no-error-logs] assertion in the following connectivity tests.

This change will provide a more thorough uninstall procedure in this case.

Signed-off-by: Tom Hadlaw <[email protected]>
  • Loading branch information
tommyp1ckles committed Feb 28, 2024
1 parent a698082 commit 8fa1ac0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions install/uninstall.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ func (k *K8sUninstaller) Log(format string, a ...interface{}) {
func (k *K8sUninstaller) UninstallWithHelm(ctx context.Context, actionConfig *action.Configuration) error {
helmClient := action.NewUninstall(actionConfig)
helmClient.Wait = k.params.Wait
if k.params.Wait {
helmClient.DeletionPropagation = "foreground"
}
helmClient.Timeout = k.params.Timeout
if _, err := helmClient.Run(defaults.HelmReleaseName); err != nil {
return err
Expand Down

0 comments on commit 8fa1ac0

Please sign in to comment.