operator-lifecycle-manager icon indicating copy to clipboard operation
operator-lifecycle-manager copied to clipboard

Need set labels to operator generated k8s resources(deployments, sts, cm, secret, pvc, route etc.)

Open suridaddy opened this issue 3 years ago • 2 comments

Type of question

Ask way to set labels to generated k8s resources by operator

Question

We want to set some labels on the generated k8s resources(by operator). The lables may contains following info:

  • app:
  • creator:
  • ...

Do we have any way to achieve this?

Environment

[root@aries-bastion ~]# oc get clusterversion
NAME      VERSION   AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.8.26    True        False         73d     Cluster version is 4.8.26
[root@aries-bastion ~]# oc version
Client Version: 4.6.27
Server Version: 4.8.26
Kubernetes Version: v1.21.6+bb8d50a

suridaddy avatar Mar 21 '22 16:03 suridaddy

This is duplicate to #2161. You can set some labels without OLM change. Some resources need OLM change and the rest need API changes and OLM changes. https://github.com/operator-framework/operator-lifecycle-manager/issues/2161#issuecomment-954102793

akihikokuroda avatar Mar 22 '22 16:03 akihikokuroda

Hi @suridaddy there doesn't seem to be a concrete desire to enable the functionality discussed in #2161 as that requires changing the CSV spec which is not something we want to modify at this point. Maybe we can discuss an alternative solution that fits your use case?

exdx avatar Mar 31 '22 19:03 exdx