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

ingress creation should fail if static ip annotation does not exist #1005

Closed
prameshj opened this issue Jan 23, 2020 · 8 comments
Closed

ingress creation should fail if static ip annotation does not exist #1005

prameshj opened this issue Jan 23, 2020 · 8 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@prameshj
Copy link
Contributor

The current handling of the static ip annotation can cause ingress VIP to change somewhat unexpectedly.

https://github.com/kubernetes/ingress-gce/blob/master/pkg/loadbalancers/forwarding_rules.go#L152-L167
If annotation "kubernetes.io/ingress.global-static-ip-name" is specified with a non-existed IP, a new static IP is created by the controller.
Now, if a static address is created with the "kubernetes.io/ingress.global-static-ip-name" value that was specified, the forwarding rule eventually gets updated with the new IP address.

The better behavior would be to fail the ingress creation in the first place if the static IP was not present.

@rramkumar1 rramkumar1 added the kind/bug Categorizes issue or PR as related to a bug. label Feb 17, 2020
@omaskery
Copy link

Is this definitely a bug and not some sort of feature request? I had assumed this was intended behaviour. We previously relied on this behaviour (until we encountered this issue: https://issuetracker.google.com/154202236 [requires sign-in]).

Perhaps there should be some annotation required to explicitly request that a static IP is generated? 🙂

@bowei
Copy link
Member

bowei commented Apr 20, 2020

cc: @spencerhance

@prameshj
Copy link
Contributor Author

@omaskery Is it possible to create a staticip and use that name in the annotation? I see we create a staticIP if you also use HTTP and HTTPS -

if err := l.checkStaticIP(); err != nil {

@omaskery
Copy link

@prameshj yes, I was speaking from an experience of a very unusual (and undesirable) edge case. I don't think it's worth considering here, I feel that my comment here was premature.

Since omitting the kubernetes.io/ingress.global-static-ip-name annotation also generates a static IP automatically, I no longer have anything against your suggestion :)

Disregard my comment from above!

@prameshj
Copy link
Contributor Author

Thanks for confirming! Here is the PR with the fix - #1080

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 20, 2020
@spencerhance
Copy link
Contributor

@prameshj Can we close this since the PR has merged?

@prameshj
Copy link
Contributor Author

Yes, closing since the fix has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

7 participants