Skip to content

Update OLM to use UID for OG Labels #31

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

Merged
merged 1 commit into from
May 1, 2020

Conversation

awgreene
Copy link
Member

@awgreene awgreene commented Apr 30, 2020

Problem:
OLM applies an "OperatorGroup Label" to namespaces which makes it easy
to select namespaces that are included in an OperatorGroup.

Currently, OLM applies a label with a blank value whose key is equal to
"olm.operatorgroup/OperatorGroup Namespace.OperatorGroup Name".
Kubernetes limits the lengths of label values and keys to 63 characters.
This limit can easily be overcome when the OperatorGroup has a long name
or when it is deployed in a namespace with a long name.

Solution:
Update OLM to use "olm.operatorgroup.uid/" as the key for
OperatorGroup labels. The length of this label will always be 58
characters as UIDs are 36 characters long.

@openshift-ci-robot openshift-ci-robot added bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Apr 30, 2020
@openshift-ci-robot
Copy link

@awgreene: This pull request references Bugzilla bug 1830031, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.5.0) matches configured target release for branch (4.5.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1830031: Update OLM to use UID for OG Labels

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.

@openshift-ci-robot
Copy link

@awgreene: This pull request references Bugzilla bug 1830031, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.5.0) matches configured target release for branch (4.5.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1830031: Update OLM to use UID for OG Labels

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.

Copy link
Contributor

@benluddy benluddy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Are you satisfied with the existing test coverage for related behaviors?

@awgreene awgreene changed the title Bug 1830031: Update OLM to use UID for OG Labels Update OLM to use UID for OG Labels May 1, 2020
@openshift-ci-robot openshift-ci-robot removed bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels May 1, 2020
@openshift-ci-robot
Copy link

@awgreene: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

In response to this:

Update OLM to use UID for OG Labels

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.

@awgreene awgreene force-pushed the og-labels branch 2 times, most recently from 6c07270 to 89af2c2 Compare May 1, 2020 12:12
Copy link
Member

@ecordell ecordell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 1, 2020
@Bowenislandsong
Copy link
Member

/lgtm with a minor nit.

@Bowenislandsong
Copy link
Member

/approve

@Bowenislandsong Bowenislandsong added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 1, 2020
Copy link
Member

@njhale njhale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

Looks good. I think at some point we want to remove the helpers from the type definitions. Maybe we should write decorator types?

@openshift-ci-robot
Copy link

New changes are detected. LGTM label has been removed.

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label May 1, 2020
Problem:
OLM applies an "OperatorGroup Label" to namespaces which makes it easy
to select namespaces that are included in an OperatorGroup.

Currently, OLM applies a label with a blank value whose key is equal to
"olm.operatorgroup/<OperatorGroup Namespace>.<OperatorGroup Name>".
Kubernetes limits the lengths of label values and keys to 63 characters.
This limit can easily be overcome when the OperatorGroup has a long name
or when it is deployed in a namespace with a long name.

Solution:
Update OLM to use "olm.operatorgroup.uid/<OperatorGroup UID>" as the key for
OperatorGroup labels. The length of this label will always be 58
characters as UIDs are 36 characters long.
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants