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

BZ 1331303 allocate route host on update if host is empty in spec #8677

Merged
merged 1 commit into from
Jun 9, 2016

Conversation

pweil-
Copy link

@pweil- pweil- commented Apr 28, 2016

@ramr since I had this code open I went ahead and made a PR for it.

@@ -31,7 +32,7 @@ func (a *testAllocator) GenerateHostname(*api.Route, *api.RouterShard) string {
return a.Hostname
}

func newStorage(t *testing.T, allocator *testAllocator) (*REST, *etcdtesting.EtcdTestServer) {
func newStorage(t *testing.T, allocator routetypes.RouteAllocator) (*REST, *etcdtesting.EtcdTestServer) {
Copy link
Author

Choose a reason for hiding this comment

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

@ramr I changed this to the interface because we were not actually testing nil allocators correctly

@smarterclayton
Copy link
Contributor

We want to remove server side allocation going forward, since the routers do that now.

@smarterclayton
Copy link
Contributor

smarterclayton commented Apr 28, 2016

I'm not opposed to fixing the gap, but spec = "" is "let the routers assign it"

@ramr
Copy link
Contributor

ramr commented Apr 28, 2016

@pweil- changes look good - I did start one out as well but this is good.
I think that this might need the allocator set on the update/status strategy as well.

@smarterclayton yeah its in 2 places - this can be removed once we set a default value to the router subdomain so that the routers do assign it.

Edited I think this will need one more change.

@ramr
Copy link
Contributor

ramr commented Apr 28, 2016

[test]

@smarterclayton
Copy link
Contributor

smarterclayton commented Apr 28, 2016 via email

@ramr
Copy link
Contributor

ramr commented Apr 28, 2016

Looks like strategy is set correctly for update. So changes LGTM

@pweil-
Copy link
Author

pweil- commented Apr 29, 2016

So there was an interesting use case for online that this actually helps. They wanted to be able to allow admins to set route hosts on routes but not regular users. Since we don't have field level authorization I think they're going to check groups in admission and clear out route hosts from there. I guess they could do that in a customized router impl but the userInfo isn't available at that point.

The override in the router seems good and useful but it seems to me that this works well with the shard allocation (which is server side) which would allow you to set host overrides per shard. Just something to consider.

@smarterclayton
Copy link
Contributor

I was talking to Miciah about not doing that though :). Since routers can
be run by end users, the routers themselves need to implement admission,
and they won't have access to the "who".

On Apr 29, 2016, at 8:43 AM, Paul Weil [email protected] wrote:

So there was an interesting use case for online that this actually helps.
They wanted to be able to allow admins to set route hosts on routes but not
regular users. Since we don't have field level authorization I think
they're going to check groups in admission and clear out route hosts from
there. I guess they could do that in a customized router impl but the
userInfo isn't available at that point.

The override in the router seems good and useful but it seems to me that
this works well with the shard allocation (which is server side) which
would allow you to set host overrides per shard. Just something to consider.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#8677 (comment)

@smarterclayton
Copy link
Contributor

[test]

@pweil-
Copy link
Author

pweil- commented Jun 8, 2016

re[test]

@ramr if there are no objections I'll merge after tests pass again

@pweil- pweil- force-pushed the route-update-host branch from 8388ce2 to 1e92fe5 Compare June 8, 2016 14:18
@ramr
Copy link
Contributor

ramr commented Jun 8, 2016

@pweil- no objections to merging and re [test]

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 1e92fe5

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/4614/)

@smarterclayton
Copy link
Contributor

[merge]

On Wed, Jun 8, 2016 at 3:35 PM, OpenShift Bot [email protected]
wrote:

continuous-integration/openshift-jenkins/test FAILURE (
https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/4614/)


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#8677 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ABG_p8inOO81swYtUV3vyNVOZPUvkniKks5qJxmDgaJpZM4ISTwn
.

@openshift-bot
Copy link
Contributor

openshift-bot commented Jun 8, 2016

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/4640/) (Image: devenv-rhel7_4337)

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 1e92fe5

@openshift-bot openshift-bot merged commit 0effc3c into openshift:master Jun 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants