k8s-operatorhub / operatorhub.io

The OperatorHub.io website
Apache License 2.0
17 stars 12 forks source link

Hide the internal API kinds listed in operators.operatorframework.io/internal-objects #14

Open wallrj opened 2 years ago

wallrj commented 2 years ago

In https://docs.okd.io/4.9/operators/operator_sdk/osdk-generating-csvs.html#osdk-hiding-internal-objects_osdk-generating-csvs

It is common practice for Operators to use custom resource definitions (CRDs) internally to accomplish a task. These objects are not meant for users to manipulate and can be confusing to users of the Operator. For example, a database Operator might have a Replication CRD that is created whenever a user creates a Database object with replication: true.

As an Operator author, you can hide any CRDs in the user interface that are not meant for user manipulation by adding the operators.operatorframework.io/internal-objects annotation to the cluster service version (CSV) of your Operator.

For example, the couchdb operator have added these annotations:

https://github.com/k8s-operatorhub/community-operators/blob/81a8e860d17591a6acb946a581da4c669ca142d0/operators/couchdb-operator/2.2.1/manifests/couchdb-operator.clusterserviceversion.yaml#L84-L89

But the internal kinds "backups" and "buckets" still show up in the operatorhub.io preview page: image

So it looks like the authors of that operator have resorted to adding their own (Internal) prefix to the names of all those kinds.

They should be hidden by default.

J0zi commented 2 years ago

@dmesser what do you think?

dmesser commented 2 years ago

@J0zi that makes sense.