Skip to content

Conversation

@stefanprodan
Copy link
Member

@stefanprodan stefanprodan commented May 13, 2025

The WaitForTermination deletion policy blocks and waits for the managed resources to be removed from etcd by the Kubernetes garbage collector. The wait time is determined by the .spec.timeout field. If a timeout occurs, the controller will log an error and will allow the Kustomization to be deleted while the managed resources will be left in the cluster.

Example:

apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
  name: podinfo
  namespace: default
spec:
  interval: 30m
  retryInterval: 5m
  targetNamespace: default
  sourceRef:
    kind: GitRepository
    name: podinfo
  path: "./kustomize"
  deletionPolicy: WaitForTermination
  prune: true
  timeout: 2m

Fix: #711

@stefanprodan stefanprodan requested a review from matheuscscp May 13, 2025 11:30
@stefanprodan stefanprodan added enhancement New feature or request area/api API related issues and pull requests labels May 13, 2025
@stefanprodan stefanprodan force-pushed the gc-wait-for-termination branch from 0495258 to 413118e Compare May 13, 2025 13:31
Copy link
Member

@matheuscscp matheuscscp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@stefanprodan stefanprodan merged commit 55be958 into main May 23, 2025
5 checks passed
@stefanprodan stefanprodan deleted the gc-wait-for-termination branch May 23, 2025 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/api API related issues and pull requests enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Garbage collection concurrency issue

3 participants