|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * extensions/arch/operator-controller.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: CONCEPT |
| 6 | + |
| 7 | +[id="olmv1-object-ownership_{context}"] |
| 8 | += Object ownership for cluster extensions |
| 9 | + |
| 10 | +In {olmv1-first}, a Kubernetes object can only be owned by a single `ClusterExtension` object at a time. This ensures that objects within an {product-title} cluster are managed consistently and prevents conflicts between multiple cluster extensions attempting to control the same object. |
| 11 | + |
| 12 | +[id="olmv1-single-ownership_{context}"] |
| 13 | +== Single ownership |
| 14 | + |
| 15 | +The core ownership principle enforced by {olmv1} is that each object can only have one cluster extension as its owner. This prevents overlapping or conflicting management by multiple cluster extensions, ensuring that each object is uniquely associated with only one bundle. |
| 16 | + |
| 17 | +.Implications of single ownership |
| 18 | + |
| 19 | +* Bundles that provide a `CustomResourceDefinition` (CRD) object can only be installed once. |
| 20 | ++ |
| 21 | +Bundles provide CRDs, which are part of a `ClusterExtension` object. This means you can install a bundle only once in a cluster. Attempting to install another bundle that provides the same CRD results in failure, as each custom resource can have only one cluster extension as its owner. |
| 22 | + |
| 23 | +* Cluster extensions cannot share objects. |
| 24 | ++ |
| 25 | +The single-owner policy of {olmv1} means that cluster extensions cannot share ownership of any objects. If one cluster extension manages a specific object, such as a `Deployment`, `CustomResourceDefinition`, or `Service` object, another cluster extension cannot claim ownership of the same object. Any attempt to do so is blocked by {olmv1}. |
| 26 | + |
| 27 | +[id="olmv1-error-messages_{context}"] |
| 28 | +== Error messages |
| 29 | + |
| 30 | +When a conflict occurs due to multiple cluster extensions attempting to manage the same object, Operator Controller returns an error message indicating the ownership conflict, such as the following: |
| 31 | + |
| 32 | +.Example error message |
| 33 | +[source,text] |
| 34 | +---- |
| 35 | +CustomResourceDefinition 'logfilemetricexporters.logging.kubernetes.io' already exists in namespace 'kubernetes-logging' and cannot be managed by operator-controller |
| 36 | +---- |
| 37 | + |
| 38 | +This error message signals that the object is already being managed by another cluster extension and cannot be reassigned or shared. |
| 39 | + |
| 40 | +[id="olmv1-ownership-considerations_{context}"] |
| 41 | +== Considerations |
| 42 | + |
| 43 | +As a cluster or extension administrator, review the following considerations: |
| 44 | + |
| 45 | +Uniqueness of bundles:: |
| 46 | +Ensure that Operator bundles providing the same CRDs are not installed more than once. This can prevent potential installation failures due to ownership conflicts. |
| 47 | + |
| 48 | +Avoid object sharing:: |
| 49 | +If you need different cluster extensions to interact with similar resources, ensure they are managing separate objects. Cluster extensions cannot jointly manage the same object due to the single-owner enforcement. |
0 commit comments