Improve documentation of defaultCompositeDeletePolicy (#686)

* Improve documentation of defaultCompositeDeletePolicy

Signed-off-by: Bob Haddleton <bob.haddleton@nokia.com>

* Fix vale errors

Signed-off-by: Bob Haddleton <bob.haddleton@nokia.com>

* Fix last vale error

Signed-off-by: Bob Haddleton <bob.haddleton@nokia.com>

* Update content/master/concepts/composite-resource-definitions.md

Co-authored-by: Pete Lumbis <pete@upbound.io>
Signed-off-by: Bob Haddleton <bob.haddleton@nokia.com>

---------

Signed-off-by: Bob Haddleton <bob.haddleton@nokia.com>
Co-authored-by: Pete Lumbis <pete@upbound.io>
This commit is contained in:
Bob Haddleton 2024-01-29 08:44:04 -06:00 committed by GitHub
parent be7876b2b1
commit 653d7c6d31
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 68 additions and 27 deletions

4
.gitignore vendored
View File

@ -42,6 +42,10 @@ Zone.Identifier
######################
.vscode/*
# PyCharm #
######################
.idea/
# Common Python Venv #
######################
venv/*

View File

@ -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.
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 deletes
the composite resource or Claim and relies on Kubernetes to delete the remaining
dependent objects, like managed resources or secrets.
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 and 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.
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`.

View File

@ -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.
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 deletes
the composite resource or Claim and relies on Kubernetes to delete the remaining
dependent objects, like managed resources or secrets.
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 and 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.
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`.

View File

@ -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 deletes
the composite resource or Claim and relies on Kubernetes to delete the remaining
dependent objects, like managed resources or secrets.
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 and secrets.
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 `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`.