From 90388571a8a50cf60c24e5af15f666b9d561d580 Mon Sep 17 00:00:00 2001 From: Hasan Turken Date: Mon, 7 Aug 2023 17:03:39 +0300 Subject: [PATCH] Remove duplicate late init sections & sync v1.13 with master Signed-off-by: Hasan Turken --- content/master/concepts/managed-resources.md | 20 ++++++---------- content/v1.13/concepts/managed-resources.md | 25 ++++++++++++-------- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/content/master/concepts/managed-resources.md b/content/master/concepts/managed-resources.md index 5a6846a74..2acdaa984 100644 --- a/content/master/concepts/managed-resources.md +++ b/content/master/concepts/managed-resources.md @@ -61,8 +61,9 @@ Provider deletes the managed resource but doesn't delete the external resource. #### Interaction with management policies If a resource configures a Crossplane -[management policy](#managementpolicies), the management policy takes precedence -over the `deletionPolicy` setting, unless it's the default management policy. +[management policy](#managementpolicies) and the related management policy alpha +feature is enabled, the management policy takes precedence over the +`deletionPolicy` setting, unless it's the default management policy. {{< table "table table-sm table-hover">}} | managementPolicies | deletionPolicy | result | @@ -113,13 +114,6 @@ inside a Provider's web console, Crossplane reverts that change back to what's configured in the `forProvider` setting. {{< /hint >}} -#### Late initialization - -After the external resource creation, providers add some provider defaulted -settings not manually set to the `forProvider` field of the created managed -resource object into their respected `forProvider` fields. -Use `kubectl describe ` to view the applied values. - #### Referencing other resources Some fields in a managed resource may depend on values from other managed @@ -229,7 +223,7 @@ resource object is deleted from Kubernetes and the `deletionPolicy` is {{< /hint >}} -#### Late Initialization +#### Late initialization For some of the optional fields, users rely on the default that the cloud provider chooses for them. Since Crossplane treats the managed resource as the @@ -309,10 +303,10 @@ spec: {{}} -The managed resource `managementPolicies` option is an alpha feature. +The managed resource `managementPolicies` option is an alpha feature. -Enable `managementPolicies` in a provider with `--enable-management-policies` -in a +Enable `managementPolicies` in a provider with `--enable-management-policies` +in a [ControllerConfig]({{}}). {{< /hint >}} diff --git a/content/v1.13/concepts/managed-resources.md b/content/v1.13/concepts/managed-resources.md index 60521d0d2..2acdaa984 100644 --- a/content/v1.13/concepts/managed-resources.md +++ b/content/v1.13/concepts/managed-resources.md @@ -56,7 +56,7 @@ Provider deletes the managed resource but doesn't delete the external resource. #### Options * `deletionPolicy: Delete` - **Default** - Delete the external resource when deleting the managed resource. -* `deletionPolicy: Orphan` - Leave the external resource when deleting the managed resource. +* `deletionPolicy: Orphan` - Leave the external resource when deleting the managed resource. #### Interaction with management policies @@ -65,7 +65,7 @@ If a resource configures a Crossplane feature is enabled, the management policy takes precedence over the `deletionPolicy` setting, unless it's the default management policy. -{{< table >}} +{{< table "table table-sm table-hover">}} | managementPolicies | deletionPolicy | result | |-----------------------------|------------------|---------| | "*" (default) | Delete (default) | Delete | @@ -114,13 +114,6 @@ inside a Provider's web console, Crossplane reverts that change back to what's configured in the `forProvider` setting. {{< /hint >}} -#### Late Initialization - -After the external resource creation, providers add some provider defaulted -settings not manually set to the `forProvider` field of the created managed -resource object into their respected `forProvider` fields. -Use `kubectl describe ` to view the applied values. - #### Referencing other resources Some fields in a managed resource may depend on values from other managed @@ -230,6 +223,19 @@ resource object is deleted from Kubernetes and the `deletionPolicy` is {{< /hint >}} +#### Late initialization + +For some of the optional fields, users rely on the default that the cloud +provider chooses for them. Since Crossplane treats the managed resource as the +source of the truth, values of those fields need to exist in `spec` of the +managed resource. In each reconciliation, Crossplane will fill the value of +a field that's left empty by the user but is assigned a value by the provider. +For example, there could be two fields like `region` and `availabilityZone` and +you might want to give only `region` and leave the availability zone to be +chosen by the cloud provider. In that case, if the provider assigns an +availability zone, Crossplane gets that value and fills `availabilityZone`. Note +that if the field is already filled, the controller won't override its value. + ### initProvider @@ -558,7 +564,6 @@ Read the guide for details on using StoreConfig objects. {{< /hint >}} - ## Annotations Crossplane applies a standard set of Kubernetes `annotations` to managed