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

Updating k8s visibility will update the specific subroute's visibility. #4560

Merged
merged 2 commits into from
Jul 9, 2019

Conversation

andrew-su
Copy link
Member

In an effort to split up my larger PR.

This depends on PR #4559

Updating the service's visibility label (or removing it) will propagate to the actual visibility of the subroutes.

Once the service is created, the visibility is only controlled by the service. Updating the route's visibility will only affect new subroute's default visibility.

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Jun 27, 2019
@knative-prow-robot knative-prow-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. area/API API objects and controllers area/networking area/test-and-release It flags unit/e2e/conformance/perf test issues for product features labels Jun 27, 2019
Copy link
Contributor

@vagababov vagababov left a comment

Choose a reason for hiding this comment

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

github sorely needs diffbase :)

@andrew-su andrew-su force-pushed the minify/subroutes/3 branch 4 times, most recently from c2fe3d9 to 2781685 Compare July 4, 2019 16:04
@andrew-su andrew-su force-pushed the minify/subroutes/3 branch 3 times, most recently from 006cc78 to 904ebf9 Compare July 5, 2019 19:46
@andrew-su andrew-su force-pushed the minify/subroutes/3 branch from 904ebf9 to dfe5670 Compare July 8, 2019 14:07
@knative-metrics-robot
Copy link

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

File Old Coverage New Coverage Delta
pkg/reconciler/ingress/resources/virtual_service.go 100.0% 97.6% -2.4
pkg/reconciler/route/reconcile_resources.go 85.3% 85.6% 0.3
pkg/reconciler/route/resources/cluster_ingress.go 92.7% 90.9% -1.8
pkg/reconciler/route/resources/filters.go Do not exist 100.0%
pkg/reconciler/route/resources/labels/labels.go Do not exist 88.9%
pkg/reconciler/route/resources/service.go 85.7% 87.0% 1.3
pkg/reconciler/route/route.go 84.5% 84.2% -0.3
pkg/reconciler/route/traffic/traffic.go 93.2% 93.3% 0.1

@andrew-su andrew-su changed the title Updating k8s visibility will update the specific subroute's visibility. [wip] Updating k8s visibility will update the specific subroute's visibility. Jul 8, 2019
@knative-prow-robot knative-prow-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 8, 2019
@andrew-su andrew-su changed the title [wip] Updating k8s visibility will update the specific subroute's visibility. Updating k8s visibility will update the specific subroute's visibility. Jul 8, 2019
@knative-prow-robot knative-prow-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 8, 2019
@tcnghia
Copy link
Contributor

tcnghia commented Jul 8, 2019

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 8, 2019
@tcnghia
Copy link
Contributor

tcnghia commented Jul 8, 2019

/assign @mattmoor

for apis/OWNERS

@mattmoor
Copy link
Member

mattmoor commented Jul 9, 2019

/approve

The change to pkg/apis is just a comment change noting the expanded use of the label.

@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andrew-su, mattmoor, tcnghia

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-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 9, 2019
@mattmoor
Copy link
Member

mattmoor commented Jul 9, 2019

/retest

@knative-prow-robot knative-prow-robot merged commit 8862337 into knative:master Jul 9, 2019
@andrew-su andrew-su deleted the minify/subroutes/3 branch July 10, 2019 14:46
}

// SetVisibility sets the visibility on an ObjectMeta
func SetVisibility(meta *v1.ObjectMeta, isClusterLocal bool) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@andrew-su Should SetVisibility and SetLabel belong under route? If I'm understanding this correctly, they are not modifying route specific attributes

Copy link
Member Author

Choose a reason for hiding this comment

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

In the original implementation this took in a route object. I later switched it to just ObjectMeta. As this is currently the only usages of this is in the route reconciler, I didn't move it. Is there somewhere you think is a better fit?

Copy link
Contributor

Choose a reason for hiding this comment

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

@andrew-su ah I see. How about moving labels under pkg/reconciler/service?

Copy link
Member Author

@andrew-su andrew-su Jul 12, 2019

Choose a reason for hiding this comment

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

I don't think I agree with moving it to pkg/reconciler/service as that's specific to the knative service; the usage is currently used by the route reconciler, it doesn't make sense to me to reach into another reconciler's package to get this functionality. I can see it living in maybe under pkg. Perhaps even waiting until the functionality is required elsewhere to refactor it out to a more common location.

Copy link
Contributor

Choose a reason for hiding this comment

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

@andrew-su I see. Initially I thought it was a bit odd since it's operating on the service object, but was living under pkg/reconciler/route. I can't think of a good destination for it now. Like you said, we can move it to another location in the future

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. area/API API objects and controllers area/networking area/test-and-release It flags unit/e2e/conformance/perf test issues for product features cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants