Open ppatierno opened 3 years ago
In general, I think this is probably a reasonable feature request -- there are probably some rough edges around generically applying this sort of projection to all of the resources that get created as a result of OLM's CSV controller though. I think that we wouldn't necessarily be opposed to something like this making its way in as an explicit feature in the CSV spec, although I imagine it would be simpler to just wait until the newer bundle API spec that allows you to define arbitrary kube resources as your operator is implemented. Please see https://github.com/operator-framework/rukpak for more details, as that is where most of the work in that area will end up.
The current OLM seems to allow setting labels on the
deployments
in the CSV via alabel
field (why it's not plural?)https://github.com/operator-framework/operator-lifecycle-manager/blob/15790a8a2f07fe65a3dbf5a45a54d35e20f2cce9/vendor/github.com/operator-framework/api/pkg/operators/v1alpha1/clusterserviceversion_types.go#L65
I was wondering why it doesn't allow to set annotations as well. Labels are not always usable because of their limit to 63 chars for values (https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set), while this limit doesn't exist for annotations (https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set).