serving icon indicating copy to clipboard operation
serving copied to clipboard

consistent label selector for Service - include app label

Open a7i opened this issue 3 years ago • 6 comments

Proposed Changes

  • components such as controller, autoscaler use the selector label app while webhook and domainmapping-webhook use the role selector. This change includes the app label which brings consistency across all resources.

Note and Service and PodDisruptionBudget selectors are not immutable, meaning that they can change (unlike Deployment/StatefulSet).

Release Note

Add `app` label to Service selector for `webhook` and `domainmapping-webhook`.
Add `role` label to Service selector for `

a7i avatar Aug 31 '22 14:08 a7i

Welcome @a7i! It looks like this is your first PR to knative/serving 🎉

knative-prow[bot] avatar Aug 31 '22 14:08 knative-prow[bot]

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: a7i Once this PR has been reviewed and has the lgtm label, please assign tcnghia for approval by writing /assign @tcnghia in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

knative-prow[bot] avatar Aug 31 '22 14:08 knative-prow[bot]

Hi @a7i. Thanks for your PR.

I'm waiting for a knative 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.

knative-prow[bot] avatar Aug 31 '22 14:08 knative-prow[bot]

Thanks for the PR! /ok-to-test

@dprotaso any legacy reason why we preferred role over app for some components?

psschwei avatar Aug 31 '22 15:08 psschwei

Codecov Report

Base: 86.44% // Head: 86.47% // Increases project coverage by +0.02% :tada:

Coverage data is based on head (a1dbe09) compared to base (76005a0). Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13265      +/-   ##
==========================================
+ Coverage   86.44%   86.47%   +0.02%     
==========================================
  Files         196      196              
  Lines       14600    14600              
==========================================
+ Hits        12621    12625       +4     
+ Misses       1678     1675       -3     
+ Partials      301      300       -1     
Impacted Files Coverage Δ
pkg/autoscaler/statserver/server.go 78.10% <0.00%> (+0.72%) :arrow_up:
pkg/reconciler/configuration/configuration.go 84.36% <0.00%> (+1.42%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Aug 31 '22 15:08 codecov[bot]

The app label seems to be a requirement for istio telemetry. Also there is this issue https://github.com/knative/serving/issues/13168 that discusses avoiding using the label.

skonto avatar Sep 06 '22 14:09 skonto

Also there is this issue https://github.com/knative/serving/issues/13168 that discusses avoiding using the label.

That's referring to the app label we're automatically adding to the revision pods/deployment.

I think role is just a legacy thing we don't need anymore - it looks like it was part of the initial commit

dprotaso avatar Nov 09 '22 15:11 dprotaso

bump @a7i - you still interested in landing this PR?

dprotaso avatar Jan 13 '23 17:01 dprotaso

Let's make sure we have app in the selector and in a subsequent release we can drop the role label.

It's going to be tough to remove labels from Deployment selectors as they're immutable. It will require a forced recreate.

a7i avatar Jan 13 '23 18:01 a7i

It will require a forced recreate.

I see - then let's not worry about it then.

/lgtm /approve

dprotaso avatar Jan 13 '23 20:01 dprotaso

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: a7i, dprotaso

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

knative-prow[bot] avatar Jan 13 '23 20:01 knative-prow[bot]