Skip to content

Commit 04321cb

Browse files
committed
update internal objects proposal
1 parent c26a5e2 commit 04321cb

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

doc/contributors/design-proposals/internal-objects.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,19 @@ A good example of this is the [Apache CouchDB Operator](https://operatorhub.io/o
1818

1919
### Implementation
2020

21-
#### New CRD annotation
21+
#### New CSV annotation
2222

23-
The behavior is straightforward, when a CRD is managed as part of the Operator installation, it can be marked with an annotation which is available for downstream tools to read and hide the CRD where applicable. This should be backwards compatible as a no-op, so it can be considered progressive enhancement.
23+
The behavior is straightforward, when a CRD is managed as part of the Operator installation, it can be marked as managed by the Operator, but also that it is an internal resource, not to be used by an end-user. This is an annotation on the CSV of `spec.owned.customresourcedefinitions.name` names, which is available for downstream tools to read and hide the CRD where applicable. This should be backwards compatible as a no-op, so it can be considered progressive enhancement.
2424

2525
```
26-
kind: CustomResourceDefinition
27-
apiVersion: apiextensions.k8s.io/v1beta1
26+
apiVersion: operators.coreos.com/v1alpha1
27+
kind: ClusterServiceVersion
2828
metadata:
29-
name: hivetables.metering.openshift.io
29+
name: couchdb-operator-v1.2.3
3030
annotations:
31-
operators.operatorframework.io/internal-object:true
32-
operators.operatorframework.io/data-object:true
31+
apps.operatorframework.io/internal-objects:
32+
- '(Internal) CouchDB Formation Lock'
33+
- '(Internal) CouchDB Recipe'
3334
spec:
3435
...
3536
status
@@ -48,8 +49,8 @@ status
4849

4950
It is a common practice for an Operator to utilize CRDs "under the hood" to internally accomplish a task. For example, a database Operator might have a Replication CRD that is created whenever an end-user creates a Database object with `replication: true`.
5051

51-
If this Replication CRD is not meant for manipulation by end-users, it can be hidden by submitting it's definition with the `operators.operatorframework.io/internal-object` annotation set to true.
52+
If this Replication CRD is not meant for manipulation by end-users, it can be hidden by including its name within the `apps.operatorframework.io/internal-objects` annotation's array of values.
5253

53-
If there exists a CRD that is only meant for tracking data, it can also be annotated with `operators.operatorframework.io/data-object` set to true.
54+
If there exists a CRD that is only meant for tracking data, it can also be included within the `app.operatorframework.io/data-object` array.
5455

5556
Before marking one of your CRDs as internal, make sure that any debugging information or configuration that might be required to manage the application is reflected on the CR's status or spec block.

0 commit comments

Comments
 (0)