-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Add status subresource to Ingress #15491
Add status subresource to Ingress #15491
Conversation
Marking WIP at the moment... |
Labelling this PR as size/M |
GCE e2e build/test failed for commit 52ec2acf9b53f6bafea65ecbc8c095e3d42be111. |
@bprashanth - I am having trouble finding anyone that is calling Ingress to update the Status section. Am I missing something obvious? @thockin - I am having trouble finding anything that validates |
There's nothing using Ingress in the main repo, the controllers are going into contrib (kubernetes-retired/contrib#132 and https://github.com/kubernetes/contrib/tree/master/service-loadbalancer). Can you please update the godep in contrib so it picks up this change when it goes in? Re LoadBalancerIngress, suggest checking that IP is an ip and Hostname is a DNS subdomain (eg: https://github.com/kubernetes/kubernetes/blob/master/pkg/apis/extensions/validation/validation.go#L459) so we don't update it to random garbage (though an ip is also a subdomain). Going back to the original pr looks like we just forgot (3884d5f) so I think we can punt on anything more elaborate, for now.
I don't see why a controller shouldn't be allowed to blank it out though leaving it as is and doing this will likely be more useful #8992 |
The change so far LGTM. |
Thanks for info, will make validation updates tomorrow and poke PR for On Tuesday, October 13, 2015, Brian Grant notifications@github.com wrote:
|
52ec2ac
to
ebd83bb
Compare
GCE e2e test build/test passed for commit ebd83bb575deae75083e9b3c5b24af08d116ea24. |
Labelling this PR as size/L |
ebd83bb
to
de12a62
Compare
@bgrant0607 - this should be ready for review now. |
@derekwaynecarr Thanks much. WTAL. |
GCE e2e build/test failed for commit de12a62680b525acd4f39c25b75973c89e0b2a84. |
@k8s-bot - test this again |
|
||
status := ingress.Status | ||
for _, lbIngress := range status.LoadBalancer.Ingress { | ||
if len(lbIngress.IP) > 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest splitting this out into ValidateLoadBalancerStatus (and using ingress as a prefix in the caller) so we can reuse for Service.Status.
nits, defer to others for review |
|
||
var StatusStrategy = ingressStatusStrategy{Strategy} | ||
|
||
func (ingressStatusStrategy) PrepareForUpdate(obj, old runtime.Object) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Godoc for public functions please
A couple nits, otherwise LGTM |
@bprashanth @thockin - thanks for review, will update nits shortly. |
de12a62
to
eae56c3
Compare
@bgrant0607 @bprashanth @thockin - nits addressed. |
GCE e2e test build/test passed for commit eae56c3. |
LGTM |
allErrs = append(allErrs, errs.NewFieldInvalid("ingress.hostname", ingress.Hostname, errMsg)) | ||
} | ||
if isIP := (net.ParseIP(ingress.Hostname) != nil); isIP { | ||
allErrs = append(allErrs, errs.NewFieldInvalid("ingress.hostname", ingress.Hostname, "must be a DNS name, not ip address")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/ip IP/
LGTM. One nit. If you get there before the bot, fix the nit. If the bot gets there first, send a followup :) |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e test build/test passed for commit eae56c3. |
Automatic merge from submit-queue |
Auto commit by PR queue bot
@derekwaynecarr are you ok updating godeps in contrib to pick this up (see kubernetes-retired/contrib#142) or should I? My GCE controller can wait for the new godeps so you don't have to rebase. |
@bprasanth - I will look to open a PR today and cc you On Thu, Oct 15, 2015 at 3:27 PM, Prashanth B notifications@github.com
|
@derekwaynecarr Nvm it's ok, I'll do it. Thanks for this change! |
thanks On Thu, Oct 15, 2015 at 4:31 PM, Prashanth B notifications@github.com
|
…5491-upstream-release-1.1 Automated cherry pick of #15491
…pick-of-#15491-upstream-release-1.1 Automated cherry pick of kubernetes#15491
…pick-of-#15491-upstream-release-1.1 Automated cherry pick of kubernetes#15491
Fixes #15480