You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/content/en/docs/_index.md
+5-6Lines changed: 5 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,17 +12,16 @@ on such components that are or contain Kubernetes operators themselves.
12
12
It can therefore serve as a starting point to develop [SAP Kyma module operators](https://github.com/kyma-project/template-operator),
13
13
but can also be used independently of Kyma.
14
14
15
-
Regarding its mission statement, this project could be compared with the [Operator Lifecycle Manager (OLM)](https://olm.operatorframework.io/).
15
+
Regarding its mission statement, this project can be compared with the [Operator Lifecycle Manager (OLM)](https://olm.operatorframework.io/).
16
16
However, other than OLM, which follows a generic modelling approach, component-operator-runtime encourages the development of opinionated,
17
17
concretely modeled, component-specific operators. This makes the resulting logic much more explicit, and also allows to react better on
18
18
specific lifecycle needs of the managed component.
19
19
20
20
Of course, components might equally be managed by using generic Kustomization or Helm chart deployers (such as provided by [ArgoCD](https://argoproj.github.io/) or [FluxCD](https://fluxcd.io/flux/)).
21
21
However, these tools have certain weaknesses when it is about to deploy other operators, i.e. components which extend the Kubernetes API,
22
-
e.g. by adding custom resource definitions, aggregated API servers, according controllers, and admission webhooks.
23
-
For example these generic controllers tend to produce race conditions or dead locks upon first installation or deletion of the managed components.
22
+
e.g. by adding custom resource definitions, aggregated API servers, according controllers, or admission webhooks.
23
+
For example these generic solutions tend to produce race conditions or dead locks upon first installation or deletion of the managed components.
24
24
This is where component-operator-runtime tries to act in a smarter and more robust way.
25
25
26
-
This website provides the full technical documentation for the project, and can be
27
-
used as a reference; if you feel that there's anything missing, please let us know
28
-
or [raise a PR](https://github.com/sap/component-operator-runtime/pulls) to add it.
26
+
If you want to report bugs, or request new features or enhancements, please [open an issue](https://github.com/sap/component-operator-runtime/issues)
27
+
or [raise a pull request](https://github.com/sap/component-operator-runtime/pulls).
Copy file name to clipboardExpand all lines: website/content/en/docs/concepts/_index.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,5 +12,6 @@ Usually (but not necessarily) the managed component contains one or multiple oth
12
12
13
13
Other than existing tools addressing this case, such as the [Operator Lifecycle Manager (OLM)](https://olm.operatorframework.io/),
14
14
this project proposes a more opinionated programming model. That is, the idea is to represent the managed component by an own custom resource type,
15
-
which (usually) would be instantiated only once in the cluster. We feel encouraged to go this way, as many community projects (e.g. Istio), are following the same pattern.
16
-
The component-operator-runtime framework now provides a generic controller, implemented as [controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) reonciler, to facilitate the development of the according controller logic for the custom resource type modeling the component.
15
+
which (usually) will be instantiated only once in the cluster. We feel encouraged to go this way, as many community projects are following the pattern of providing dedicated lifecycle operators.
16
+
17
+
The component-operator-runtime framework plugs into the [controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) SDK by implementing the controller-runtime `Reconciler` interface.
Copy file name to clipboardExpand all lines: website/content/en/docs/concepts/dependents.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ To be more precise, assume for example, that the managed component contains some
17
17
Then, if the component resource would be deleted, none of the component's dependent objects would be touched as long as there exist foreign
18
18
instances of the managed custom resource definition in the cluster.
19
19
20
-
In some special situations however, it is desirable to have more control on the lifecycle of the dependent objects.
20
+
In some special situations, it is desirable to have even more control on the lifecycle of the dependent objects.
21
21
To support such cases, the `Generator` implementation can set the following annotations in the manifests of the dependents:
22
22
-`mycomponent-operator.mydomain.io/reconcile-policy`: defines how the object is reconciled; can be one of:
23
23
-`on-object-change` (which is the default): the object will be reconciled whenever its generated manifest changes
@@ -26,8 +26,8 @@ To support such cases, the `Generator` implementation can set the following anno
26
26
-`mycomponent-operator.mydomain.io/update-policy`: defines how the object (if existing) is updated; can be one of:
27
27
-`default` (which is the default): a regular update (i.e. PUT) call will be made to the Kubernetes API server
28
28
-`recreate`: if the object would be updated, it will be deleted and recreated instead
29
-
-`mycomponent-operator.mydomain.io/order`: the order at which this object will be reconciled; dependents will be reconciled order by order; that is, objects of the same order will be deployed in the canonical order, and the controller will only proceed to the next order if all objects of previous orders are ready; specified orders can be negative or positive numbers between -32768 and 32767, objects with no explicit order set are treated as order 0.
30
-
-`mycomponent-operator.mydomain.io/purge-order`: (optional) the order after which this object will be purged
29
+
-`mycomponent-operator.mydomain.io/order`: the order at which this object will be reconciled; dependents will be reconciled order by order; that is, objects of the same order will be deployed in the canonical order, and the controller will only proceed to the next order if all objects of previous orders are ready; specified orders can be negative or positive numbers between -32768 and 32767, objects with no explicit order set are treated as if they would specify order 0.
30
+
-`mycomponent-operator.mydomain.io/purge-order`: (optional) the order by which this object will be purged
31
31
32
32
Note that, in the above paragraph, `mycomponent-operator.mydomain.io` has to be replaced with whatever was passed as `name` when calling `NewReconciler()`.
The passed type parameter `T Component`would be the concrete runtime type of the custom resource type. Furthermore,
29
+
The passed type parameter `T Component`is the concrete runtime type of the component's custom resource type. Furthermore,
30
30
-`name` is supposed to be a unique name (typically a DNS name) uniquely identifying this component operator in the cluster; ìt will be used in annotations, labels, for leader election, ...
31
-
-`client` is a controller-runtime `client.Client`, having all the needed privileges to manage the dependent objects (probably it will have cluster-admin rights); the `client` must bypass informer caches for the following types:
31
+
-`client`, `discoveryClient`, `eventRecorder` and `scheme` are deprecated and will be removed in future releases; they can be passed as `nil`
32
+
-`resourceGenerator` is an implementation of the `Generator` interface, describing how the dependent objects are rendered from the component's spec.
33
+
34
+
The object returned by `NewReconciler` implements the controller-runtime `Reconciler` interface, and can therefore be used as a drop-in
35
+
in kubebuilder managed projects. After creation, the reconciler has to be registered with the responsible controller-runtime manager instance by calling
0 commit comments