Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve documentation of defaultCompositeDeletePolicy #686

Merged
merged 4 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ Zone.Identifier
######################
.vscode/*

# PyCharm #
######################
.idea/

# Common Python Venv #
######################
venv/*
Expand Down
34 changes: 23 additions & 11 deletions content/master/concepts/composite-resource-definitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -626,17 +626,29 @@ XRDs can set default parameters for composite resources and Claims.
<!-- vale off -->
#### defaultCompositeDeletePolicy
<!-- vale on -->
The `defaultCompositeDeletePolicy` defines the deletion policy for composite
resources and claims.

Using a `defaultCompositeDeletePolicy: Background` policy deletes
the composite resource or Claim and relies on Kubernetes to delete the remaining
dependent objects, like managed resources or secrets.

Using `defaultCompositeDeletePolicy: Foreground` causes Kubernetes to attach a
`foregroundDeletion` finalizer to the composite resource or Claim. Kubernetes
deletes all the dependent objects before deleting the composite resource or
Claim.
The `defaultCompositeDeletePolicy` defines the default value for the claim's
`compositeDeletePolicy` property if the user doesn't specify a value when creating
the claim. The claim controller uses the `compositeDeletePolicy` property to specify
the propagation policy when deleting the associated composite.
The `compositeDeletePolicy` doesn't apply to standalone composites that don't have
associated claims.

Using a `defaultCompositeDeletePolicy: Background` policy causes the CRD for the claim to have
the default value `Background` for the `compositeDeletePolicy` property.
When a deleted claim has the `compositeDeletePolicy` property set to `Background`
the claim controller deletes the composite resource using the propagation policy `background`
and returns, relying on Kubernetes to delete the remaining child objects,
like managed resources, nested composites, secrets, etc.
bobh66 marked this conversation as resolved.
Show resolved Hide resolved

Using `defaultCompositeDeletePolicy: Foreground` causes the CRD for the claim to have
the `compositeDeletePolicy` default value `Foreground`. When a deleted claim has the
`compositeDeletePolicy` property set to `Foreground` the controller
deletes the associated composite using the propagation policy `foreground`. This causes Kubernetes
to use foreground cascading deletion which deletes all child resources before deleting the
parent resource. The claim controller waits for the composite deletion to finish before returning.

When creating a claim the user can override the `defaultCompositeDeletePolicy` by including
the `spec.compositeDeletePolicy` property with either the `Background` or `Foreground` value.

The default value is `defaultCompositeDeletePolicy: Background`.

Expand Down
34 changes: 23 additions & 11 deletions content/v1.13/concepts/composite-resource-definitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -631,17 +631,29 @@ XRDs can set default parameters for composite resources and Claims.
<!-- vale off -->
#### defaultCompositeDeletePolicy
<!-- vale on -->
The `defaultCompositeDeletePolicy` defines the deletion policy for composite
resources and claims.

Using a `defaultCompositeDeletePolicy: Background` policy deletes
the composite resource or Claim and relies on Kubernetes to delete the remaining
dependent objects, like managed resources or secrets.

Using `defaultCompositeDeletePolicy: Foreground` causes Kubernetes to attach a
`foregroundDeletion` finalizer to the composite resource or Claim. Kubernetes
deletes all the dependent objects before deleting the composite resource or
Claim.
The `defaultCompositeDeletePolicy` defines the default value for the claim's
`compositeDeletePolicy` property if the user doesn't specify a value when creating
the claim. The claim controller uses the `compositeDeletePolicy` property to specify
the propagation policy when deleting the associated composite.
The `compositeDeletePolicy` doesn't apply to standalone composites that don't have
associated claims.

Using a `defaultCompositeDeletePolicy: Background` policy causes the CRD for the claim to have
the default value `Background` for the `compositeDeletePolicy` property.
When a deleted claim has the `compositeDeletePolicy` property set to `Background`
the claim controller deletes the composite resource using the propagation policy `background`
and returns, relying on Kubernetes to delete the remaining child objects,
like managed resources, nested composites, secrets, etc.
bobh66 marked this conversation as resolved.
Show resolved Hide resolved

Using `defaultCompositeDeletePolicy: Foreground` causes the CRD for the claim to have
the `compositeDeletePolicy` default value `Foreground`. When a deleted claim has the
`compositeDeletePolicy` property set to `Foreground` the controller
deletes the associated composite using the propagation policy `foreground`. This causes Kubernetes
to use foreground cascading deletion which deletes all child resources before deleting the
parent resource. The claim controller waits for the composite deletion to finish before returning.

When creating a claim the user can override the `defaultCompositeDeletePolicy` by including
the `spec.compositeDeletePolicy` property with either the `Background` or `Foreground` value.

The default value is `defaultCompositeDeletePolicy: Background`.

Expand Down
33 changes: 23 additions & 10 deletions content/v1.14/concepts/composite-resource-definitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -626,17 +626,30 @@ XRDs can set default parameters for composite resources and Claims.
<!-- vale off -->
#### defaultCompositeDeletePolicy
<!-- vale on -->
The `defaultCompositeDeletePolicy` defines the deletion policy for composite
resources and claims.
The `defaultCompositeDeletePolicy` defines the default value for the claim's
`compositeDeletePolicy` property if the user doesn't specify a value when creating
the claim. The claim controller uses the `compositeDeletePolicy` property to specify
the propagation policy when deleting the associated composite.
The `compositeDeletePolicy` doesn't apply to standalone composites that don't have
associated claims.

Using a `defaultCompositeDeletePolicy: Background` policy causes the CRD for the claim to have
the default value `Background` for the `compositeDeletePolicy` property.
When a deleted claim has the `compositeDeletePolicy` property set to `Background`
the claim controller deletes the composite resource using the propagation policy `background`
and returns, relying on Kubernetes to delete the remaining child objects,
like managed resources, nested composites, secrets, etc.
bobh66 marked this conversation as resolved.
Show resolved Hide resolved

Using `defaultCompositeDeletePolicy: Foreground` causes the CRD for the claim to have
the `compositeDeletePolicy` default value `Foreground`. When a deleted claim has the
`compositeDeletePolicy` property set to `Foreground` the controller
deletes the associated composite using the propagation policy `foreground`. This causes Kubernetes
to use foreground cascading deletion which deletes all child resources before deleting the
parent resource. The claim controller waits for the composite deletion to finish before returning.

When creating a claim the user can override the `defaultCompositeDeletePolicy` by including
the `spec.compositeDeletePolicy` property with either the `Background` or `Foreground` value.

Using a `defaultCompositeDeletePolicy: Background` policy deletes
the composite resource or Claim and relies on Kubernetes to delete the remaining
dependent objects, like managed resources or secrets.

Using `defaultCompositeDeletePolicy: Foreground` causes Kubernetes to attach a
`foregroundDeletion` finalizer to the composite resource or Claim. Kubernetes
deletes all the dependent objects before deleting the composite resource or
Claim.

The default value is `defaultCompositeDeletePolicy: Background`.

Expand Down
Loading