Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set labels for the operator Deployment created via the ClusterServiceVersion #2054

Merged
merged 1 commit into from
Mar 25, 2021

Conversation

dmvolod
Copy link
Contributor

@dmvolod dmvolod commented Mar 19, 2021

Description of the change:
With this changes is possible to set custom labels for Deployment in addition to the system labels set by the OLM. This labels should be present in the labels fields of the deployments section.

Motivation for the change:
Would like the ability to set labels for the operator Deployment created via the ClusterServiceVersion.
Only owner labels are set by OLM, and the operator Deployment is limited to setting the DeploymentSpec, with no ability to set any metadata such as labels.
Custom operator deployment labels is very desirable feature, for example when we need to lookup operator deployment from the operator code itself and the name of this deployment could be change potentially and we don't want to change the logic every update. Only custom CSV based labels could help in this case.

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Docs updated or added to /docs
  • Commit messages sensible and descriptive

Closes #1522

@openshift-ci-robot openshift-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 19, 2021
@openshift-ci-robot
Copy link
Collaborator

Hi @dmvolod. Thanks for your PR.

I'm waiting for a operator-framework member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

…Version

Signed-off-by: Dmitry Volodin <dmvolod@gmail.com>
@timflannagan
Copy link
Contributor

/ok-to-test
/test all

@openshift-ci-robot openshift-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 23, 2021
@ecordell
Copy link
Member

/approve

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dmvolod, ecordell

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 24, 2021
@kevinrizza
Copy link
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 25, 2021
@dmvolod
Copy link
Contributor Author

dmvolod commented Mar 25, 2021

/retest

@openshift-merge-robot openshift-merge-robot merged commit 9af0b53 into operator-framework:master Mar 25, 2021
@dmvolod
Copy link
Contributor Author

dmvolod commented Mar 25, 2021

@kevinrizza , @ecordell is there any chance to backport this feature to one of the release 4.6, 4.7, 4.8 or 4.9 or backports are only for bugs?
Thanks in advance.

@kevinrizza
Copy link
Member

@dmvolod for openshift backports are exclusively for bugs unfortuntely

@prabhjotbawa
Copy link

prabhjotbawa commented Jan 4, 2023

Has this feature been rolled out to any of the 4.10 OpenShift releases? I followed the instructions and added the labels to the CSV but when it gets applied on the cluster, I don't see the labels getting persisted.
Openshit release: 4.10.45
I checked the olm version from olm-operator as shown below:

$ olm --version
OLM version: 0.19.0
git commit: 7837ef293f6d68073efdddab1f8af7309ebdec94

Is this feature released yet?

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set labels for the operator Deployment created via the ClusterServiceVersion
7 participants