mirror of https://github.com/crossplane/docs.git
docs snapshot for crossplane version `master`
This commit is contained in:
parent
20f1f01115
commit
86391397c0
|
@ -310,6 +310,25 @@ never deletes the external resource in the provider.
|
||||||
> means Crossplane will allow immutable fields to be changed, but will not
|
> means Crossplane will allow immutable fields to be changed, but will not
|
||||||
> actually make the desired change. This is tracked in [this issue][issue-727].
|
> actually make the desired change. This is tracked in [this issue][issue-727].
|
||||||
|
|
||||||
|
#### Pausing Reconciliations
|
||||||
|
If a managed resource being reconciled by the [managed reconciler], has the
|
||||||
|
`crossplane.io/paused` annotation with its value set to `true` as in the
|
||||||
|
following example, then further reconciliations are paused on that resource
|
||||||
|
after emitting an event with the type `Synced`, the status `False`,
|
||||||
|
and the reason `ReconcilePaused`:
|
||||||
|
```yaml
|
||||||
|
apiVersion: ec2.aws.upbound.io/v1beta1
|
||||||
|
kind: VPC
|
||||||
|
metadata:
|
||||||
|
name: paused-vpc
|
||||||
|
annotations:
|
||||||
|
crossplane.io/paused: "true"
|
||||||
|
...
|
||||||
|
```
|
||||||
|
Reconciliations on the managed resource will resume once the
|
||||||
|
`crossplane.io/paused` annotation is removed or its value is set
|
||||||
|
to anything other than `true`.
|
||||||
|
|
||||||
### External Name
|
### External Name
|
||||||
|
|
||||||
By default the name of the managed resource is used as the name of the external
|
By default the name of the managed resource is used as the name of the external
|
||||||
|
@ -462,3 +481,4 @@ including Velero.
|
||||||
[issue-727]: https://github.com/crossplane/crossplane/issues/727
|
[issue-727]: https://github.com/crossplane/crossplane/issues/727
|
||||||
[issue-1143]: https://github.com/crossplane/crossplane/issues/1143
|
[issue-1143]: https://github.com/crossplane/crossplane/issues/1143
|
||||||
[managed-api-patterns]: https://github.com/crossplane/crossplane/blob/master/design/one-pager-managed-resource-api-design.md
|
[managed-api-patterns]: https://github.com/crossplane/crossplane/blob/master/design/one-pager-managed-resource-api-design.md
|
||||||
|
[managed reconciler]: https://github.com/crossplane/crossplane-runtime/blob/84e629b9589852df1322ff1eae4c6e7639cf6e99/pkg/reconciler/managed/reconciler.go#L637
|
|
@ -373,6 +373,45 @@ spec:
|
||||||
fromFieldPath: metadata.labels[some-important-label]
|
fromFieldPath: metadata.labels[some-important-label]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Pause Annotation
|
||||||
|
There is an annotation named `crossplane.io/paused` that you can use on
|
||||||
|
Composite Resources and Composite Resource Claims to temporarily pause
|
||||||
|
reconciliations of their respective controllers on them. An example
|
||||||
|
for a Composite Resource Claim is as follows:
|
||||||
|
```yaml
|
||||||
|
apiVersion: test.com/v1alpha1
|
||||||
|
kind: MyResource
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
crossplane.io/paused: true
|
||||||
|
namespace: upbound-system
|
||||||
|
name: my-resource
|
||||||
|
spec:
|
||||||
|
parameters:
|
||||||
|
tagValue: demo-test
|
||||||
|
compositionRef:
|
||||||
|
name: example
|
||||||
|
```
|
||||||
|
where `MyResource` is a Composite Resource Claim kind.
|
||||||
|
When a Composite Resource or a Claim has the `crossplane.io/paused` annotation
|
||||||
|
with its value set to `true`, the Composite Resource controller or the Claim
|
||||||
|
controller pauses reconciliations on the resource until
|
||||||
|
the annotation is removed or its value set to something other than `true`.
|
||||||
|
Before temporarily pausing reconciliations, an event with the type `Synced`,
|
||||||
|
the status `False`, and the reason `ReconcilePaused` is emitted
|
||||||
|
on the resource.
|
||||||
|
Please also note that annotations on a Composite Resource Claim are propagated
|
||||||
|
to the associated Composite Resource but when the
|
||||||
|
`crossplane.io/paused: true` annotation is added to a Claim, because
|
||||||
|
reconciliations on the Claim are now paused, this newly added annotation
|
||||||
|
will not be propagated. However, whenever the annotation's value is set to a
|
||||||
|
non-`true` value, reconciliations on the Claim will now resume, and thus the
|
||||||
|
annotation will now be propagated to the associated Composite Resource
|
||||||
|
with a non-`true` value. An implication of the described behavior is that
|
||||||
|
pausing reconciliations on the Claim will not inherently pause reconciliations
|
||||||
|
on the associated Composite Resource.
|
||||||
|
|
||||||
|
|
||||||
### Patch Types
|
### Patch Types
|
||||||
|
|
||||||
You can use the following types of patch in a `Composition`:
|
You can use the following types of patch in a `Composition`:
|
||||||
|
|
Loading…
Reference in New Issue