Skip to content

Commit 6a4dddd

Browse files
committed
clarify declarative API in custom controller docs
The content describing a declarative API in the custom controller section of the custom resources doc was confusing: > A declarative API allows you to declare or specify the desired state of your resource **and tries to keep the current state of Kubernetes objects in sync with the desired state**. The controller interprets the structured data as a record of the user's desired state, and continually maintains this state. (emphasis added) It is not the declarative API that tries to keep the current state of the objects in sync with the desired state. It's the controller that does that. I've reworded this paragraph to hopefully clarify this. Closes Issue #29348 Signed-off-by: Jay Pipes <[email protected]>
1 parent a33eb6b commit 6a4dddd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

content/en/docs/concepts/extend-kubernetes/api-extension/custom-resources.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ On their own, custom resources let you store and retrieve structured data.
3535
When you combine a custom resource with a *custom controller*, custom resources
3636
provide a true _declarative API_.
3737

38-
A [declarative API](/docs/concepts/overview/kubernetes-api/)
39-
allows you to _declare_ or specify the desired state of your resource and tries to
40-
keep the current state of Kubernetes objects in sync with the desired state.
41-
The controller interprets the structured data as a record of the user's
42-
desired state, and continually maintains this state.
38+
The Kubernetes [declarative API](/docs/concepts/overview/kubernetes-api/)
39+
enforces a separation of responsibilities. You declare the desired state of
40+
your resource. The Kubernetes controller keeps the current state of Kubernetes
41+
objects in sync with your declared desired state. This is in contrast to an
42+
imperative API, where you *instruct* a server what to do.
4343

4444
You can deploy and update a custom controller on a running cluster, independently
4545
of the cluster's lifecycle. Custom controllers can work with any kind of resource,

0 commit comments

Comments
 (0)