Skip to content

Commit

Permalink
Remove duplicate late init sections & sync v1.13 with master
Browse files Browse the repository at this point in the history
Signed-off-by: Hasan Turken <turkenh@gmail.com>
  • Loading branch information
turkenh committed Aug 7, 2023
1 parent fbe86e6 commit 9038857
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 23 deletions.
20 changes: 7 additions & 13 deletions content/master/concepts/managed-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down Expand Up @@ -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 <managed_resource>` to view the applied values.

#### Referencing other resources

Some fields in a managed resource may depend on values from other managed
Expand Down Expand Up @@ -229,7 +223,7 @@ resource object is deleted from Kubernetes and the `deletionPolicy` is
<!-- vale write-good.Passive = YES -->
{{< /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
Expand Down Expand Up @@ -309,10 +303,10 @@ spec:
<!-- vale on -->

{{<hint "important" >}}
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]({{<ref "./providers#controller-configuration" >}}).
{{< /hint >}}

Expand Down
25 changes: 15 additions & 10 deletions content/v1.13/concepts/managed-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 |
Expand Down Expand Up @@ -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 <managed_resource>` to view the applied values.

#### Referencing other resources

Some fields in a managed resource may depend on values from other managed
Expand Down Expand Up @@ -230,6 +223,19 @@ resource object is deleted from Kubernetes and the `deletionPolicy` is
<!-- vale write-good.Passive = YES -->
{{< /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.

<!-- vale off -->
### initProvider
<!-- vale on -->
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9038857

Please sign in to comment.