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

Use static selector labels for EL svc/deployments #513

Merged
merged 1 commit into from
Apr 1, 2020

Conversation

dibyom
Copy link
Member

@dibyom dibyom commented Apr 1, 2020

Previously, if a user added an extra label, we'd propagate that to the
deployment and services. However, in addition, we'd also update the selector
fields in both deployments and services to use this additional label. This is
unnecessary since the static set of default labels that we add on each resource
is enough to match and do not need to be updated throughout the lifecycle of
the resources.

Fixes #463

This PR replaces #510. Changes are:

  1. E2E test removed: The test was port-forwarding to the pod which does not test the failure scenario described in Labels on event listener break service selector #463 i.e. the service cannot forward to the Pods due to mismatched selector labels. The reconciler test has been updated to ensure that the service/deployment selector matches. Also, verified manually by updating labels, and triggering the EL via the service address (as opposed to port-forwarding to the Pod)

Changes

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

See the contribution guide for more details.

@tekton-robot tekton-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 1, 2020
@tekton-robot tekton-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Apr 1, 2020
Previously, if a user added an extra label, we'd propagate that to the
deployment and services.  However, in addition, we'd also update the selector
fields in both deployments and services to use this additional label. This is
unnecessary since the static set of default labels that we add on each resource
is enough to match and do not need to be updated throughout the lifecycle of
the resources.

Fixes tektoncd#463

Co-Authored-By: Vincent Tereso <[email protected]>

Signed-off-by: Dibyo Mukherjee <[email protected]>
@tekton-robot
Copy link

The following is the coverage report on pkg/.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/v1alpha1/eventlistener/eventlistener.go 70.6% 69.3% -1.2

@tekton-robot
Copy link

The following is the coverage report on pkg/.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/v1alpha1/eventlistener/eventlistener.go 70.6% 69.3% -1.2

@dibyom dibyom marked this pull request as ready for review April 1, 2020 18:37
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 1, 2020
@dibyom dibyom added this to the Triggers v0.4.0 milestone Apr 1, 2020
@dibyom dibyom requested a review from ncskier April 1, 2020 18:37
Copy link
Member

@ncskier ncskier left a comment

Choose a reason for hiding this comment

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

I manually tested this too, and it looks good 👍
/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 1, 2020
@tekton-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ncskier

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

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 1, 2020
@tekton-robot tekton-robot merged commit b44b004 into tektoncd:master Apr 1, 2020
@dibyom dibyom deleted the FixLabels branch April 1, 2020 19:22
@dibyom dibyom mentioned this pull request Apr 1, 2020
3 tasks
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. cla: yes lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Labels on event listener break service selector
4 participants