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

Fix #712, allow overwriting the public IP of a Kubernetes node #840

Merged
merged 1 commit into from
Oct 31, 2017

Conversation

alvaroaleman
Copy link
Contributor

@alvaroaleman alvaroaleman commented Oct 16, 2017

Description

This PR fixes #712 by allowing to overwrite the public ip of a Kubernetes node via the flannel.alpha.coreos.com/public-ip-overwrite annotation.

Can anyone point me to the appropriate place for docs, is it just Documentation/Configuration.md?
Right now the other annotations aren't documented in this repo.

Todos

  • Tests
  • Documentation

@tomdee
Copy link
Contributor

tomdee commented Oct 20, 2017

@alvaroaleman Thanks for this change. If you can add some documentation and ideally a test, I can get it merged. For the documentation, I would suggest adding an "Annotations" section to https://github.com/coreos/flannel/blob/master/Documentation/kubernetes.md

@alvaroaleman
Copy link
Contributor Author

Added docs. Writing a test seems to be rather complicated, because there are none for the kube subnet manager yet.

@tomdee
Copy link
Contributor

tomdee commented Oct 20, 2017

I added some tests for kube subnet manager recently - https://github.com/coreos/flannel/blob/master/dist/functional-test-k8s.sh

But I agree, they are still quite complicated!

@alvaroaleman
Copy link
Contributor Author

Thanks for the hint @tomdee, I added a test.

I also moved the check for ls /run/flannel/subnet.env into the start_flannel function, since it is a generic test if flannel startup was finished and not specific to the other ping tests in the suite.

@alvaroaleman
Copy link
Contributor Author

Recreated the PR because travis was failing after having issues pulling the etcd image.

The e2e tests run twice btw, because they are called in the travis file and from within the test maketarget

@tomdee
Copy link
Contributor

tomdee commented Oct 28, 2017

OK, this looks good. It would be great if you could add a little more information to the documentation, such as why a user might want to set this, and any other annotations that can be set.

Before I merge can you squash your commits so I'm just merging a single commit?

@alvaroaleman
Copy link
Contributor Author

Updated the explanation and squashed my commits.

As far as I can tell, the other annotations are not supposed to be altered by users thus it doesn't make sense to document them or am I wrong there?

@tomdee
Copy link
Contributor

tomdee commented Oct 29, 2017

Yes, I think you're right! The tests are now failing, I think you lost a commit when doing the squash? Hopefully you can get it back easily then I can merge.

This may be useful if a nodes public IP can not determined, e.G.
because it is behind a nat. Fixes flannel-io#712
@alvaroaleman
Copy link
Contributor Author

Added the missing commit back.

@tomdee tomdee merged commit 5b0a7e0 into flannel-io:master Oct 31, 2017
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.

Flannel always overwrites public-ip node annotation in Kubernetes on startup
2 participants