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

nixos/flannel: add kubernetes as storage backend (and fix test) #55649

Merged
merged 3 commits into from Feb 15, 2019

Conversation

johanot
Copy link
Contributor

@johanot johanot commented Feb 12, 2019

Motivation for this change

Flannel can now use the kubernetes api as storage backend, instead of etcd. This is useful especially when deploying flannel with kubernetes where you - otherwise - either need to allow multi-user access to a single etcd instance or setup a secondary etcd instance just to hold flannel config. When configuring flannel with kubernetes as storage backend, you can isolate the access to etcd by authorizing only kube-apiserver.

backward compatibility: The default behavior is unchanged. Etcd will be used as storage backend, unless the new option services.flannel.storageBackend is set to kubernetes.

furthermore: the flannel test case fails on master. etcd refuses to startup, because it requires ip-adresses configured as listening adresses in order to determine which interfaces to bind to. Fixed that as part of this PR.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@johanot
Copy link
Contributor Author

johanot commented Feb 12, 2019

@GrahamcOfBorg test flannel

@srhb
Copy link
Contributor

srhb commented Feb 13, 2019

@GrahamcOfBorg test flannel

@srhb
Copy link
Contributor

srhb commented Feb 13, 2019

Oh, it's not even exposed in the release set.

@johanot
Copy link
Contributor Author

johanot commented Feb 13, 2019

@srhb I added the test to the release set in this PR :)

@johanot
Copy link
Contributor Author

johanot commented Feb 13, 2019

Added an extra option nodeName to this PR, due to: flannel-io/flannel#792 (comment)
(94136fd)

@GrahamcOfBorg test flannel

@johanot
Copy link
Contributor Author

johanot commented Feb 13, 2019

relates to #45670

@johanot johanot mentioned this pull request Feb 14, 2019
9 tasks
@offlinehacker offlinehacker merged commit 5ae0480 into NixOS:master Feb 15, 2019
@johanot johanot deleted the flannel-with-kubernetes-backend branch February 21, 2019 14:35
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.

None yet

4 participants