Repository navigation
Port Route to genericetcd - #4425
Conversation
ef4bcdc to
f94b7f8
Compare
There was a problem hiding this comment.
@ramr - unrelated but I thought of it after noticing that the false version of this annotation is no longer applied....should we disallow an update to the route host name and require users to delete/recreate the route if they want to change the host?
There was a problem hiding this comment.
@pweil- well, it seems onerous to not allow an edit on the route object, no? And probably sorta inconsistent as well.
@smarterclayton - yeah, rather than have all that allocate shard + generate name cruft in here, it makes more sense to add a RouteAllocator.AllocateHostName(route) or something to that effect in here and move this code into that new method - can do that afterwards - the TODO in here is good.
There was a problem hiding this comment.
I'm actually looking to remove the need for this altogether by moving the
responsibility to the router. That'll be a follow on to the duplicate
thing.
On Mon, Aug 31, 2015 at 3:15 PM, Ram Ranganathan [email protected]
wrote:
In pkg/route/registry/route/rest.go
#4425 (comment):
+func (s routeStrategy) PrepareForCreate(obj runtime.Object) {return nil, err- route := obj.(*api.Route)
- if len(route.Host) == 0 && s.RouteAllocator != nil {
// TODO: this does not belong here, and should be removedshard, err := s.RouteAllocator.AllocateRouterShard(route)if err != nil {// TODO: this will be changed when moved to a controllerutil.HandleError(errors.NewInternalError(fmt.Errorf("allocation error: %v for route: %#v", err, obj)))return}route.Host = s.RouteAllocator.GenerateHostname(route, shard)if route.Annotations == nil {route.Annotations = map[string]string{}}route.Annotations[HostGeneratedAnnotationKey] = "true"@pweil- https://github.com/pweil- well, it seems onerous to not allow
an edit on the route object, no? And probably sorta inconsistent as well.@smarterclayton https://github.com/smarterclayton - yeah, rather than
have all that allocate shard + generate name cruft in here, it makes more
sense to add a RouteAllocator.AllocateHostName(route) or something to
that effect in here and move this code into that new method - can do that
afterwards - the TODO in here is good.—
Reply to this email directly or view it on GitHub
https://github.com/openshift/origin/pull/4425/files#r38341271.
Clayton Coleman | Lead Engineer, OpenShift
|
👍 |
|
Fixes: #1870 |
|
In v2 we allowed changes, but it makes the process more complex. I don't On Mon, Aug 31, 2015 at 11:50 AM, Paul Weil [email protected]
Clayton Coleman | Lead Engineer, OpenShift |
|
If you have a new route with a new name, it can point to the same service, On Mon, Aug 31, 2015 at 11:54 AM, Clayton Coleman [email protected]
Clayton Coleman | Lead Engineer, OpenShift |
I agree, there was a lingering TODO about management of that annotation in update cases but it just complicates the process. I'm on board with not allowing on-the-fly host name changes. |
|
Let's slate that for a follow up On Mon, Aug 31, 2015 at 12:01 PM, Paul Weil [email protected]
Clayton Coleman | Lead Engineer, OpenShift |
|
@smarterclayton LGTM 👍 |
|
[merge] On Mon, Aug 31, 2015 at 3:20 PM, Ram Ranganathan [email protected]
Clayton Coleman | Lead Engineer, OpenShift |
|
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_origin/3169/) (Image: devenv-fedora_2252) |
|
[Test]ing while waiting on the merge queue |
|
continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/4634/) |
35ac988 to
ab78bbe
Compare
|
Evaluated for origin merge up to ab78bbe |
|
Evaluated for origin test up to ab78bbe |
Preserves existing behavior, sets stage for using status subfields
@ramr @pweil- @liggitt for review
Extracted from #4421