nixpkgs/nixos/modules
Christian Albrecht 62f03750e4
nixos/kubernetes: Stabilize services startup across machines
by adding targets and curl wait loops to services to ensure services
are not started before their depended services are reachable.

Extra targets cfssl-online.target and kube-apiserver-online.target
syncronize starts across machines and node-online.target ensures
docker is restarted and ready to deploy containers on after flannel
has discussed the network cidr with apiserver.

Since flannel needs to be started before addon-manager to configure
the docker interface, it has to have its own rbac bootstrap service.

The curl wait loops within the other services exists to ensure that when
starting the service it is able to do its work immediately without
clobbering the log about failing conditions.

By ensuring kubernetes.target is only reached after starting the
cluster it can be used in the tests as a wait condition.

In kube-certmgr-bootstrap mkdir is needed for it to not fail to start.

The following is the relevant part of systemctl list-dependencies

default.target
● ├─certmgr.service
● ├─cfssl.service
● ├─docker.service
● ├─etcd.service
● ├─flannel.service
● ├─kubernetes.target
● │ ├─kube-addon-manager.service
● │ ├─kube-proxy.service
● │ ├─kube-apiserver-online.target
● │ │ ├─flannel-rbac-bootstrap.service
● │ │ ├─kube-apiserver-online.service
● │ │ ├─kube-apiserver.service
● │ │ ├─kube-controller-manager.service
● │ │ └─kube-scheduler.service
● │ └─node-online.target
● │   ├─node-online.service
● │   ├─flannel.target
● │   │ ├─flannel.service
● │   │ └─mk-docker-opts.service
● │   └─kubelet.target
● │     └─kubelet.service
● ├─network-online.target
● │ └─cfssl-online.target
● │   ├─certmgr.service
● │   ├─cfssl-online.service
● │   └─kube-certmgr-bootstrap.service
2019-03-03 19:39:02 +01:00
..
config nixos/no-x-libs.nix: override pinentry directly 2019-02-27 23:53:50 -05:00
hardware nixos/docker: add enableNvidia option 2019-02-27 09:56:03 +01:00
i18n/input-method docs: format 2018-09-29 20:51:11 -04:00
installer Merge pull request #56115 from matthewbauer/nixos-rebuild-upgrade-nix 2019-03-02 18:48:28 -05:00
misc Merge pull request #38033 from peterhoeg/f/slite 2019-02-23 15:10:06 -08:00
profiles profiles/graphical.nix: Enable pulseaudio for virtualbox appliances 2019-02-22 07:23:59 +01:00
programs nixos/fish: generate autocompletions from man pages 2019-02-27 12:23:48 +01:00
security Merge pull request #55792 from sdier/fix/pam-update 2019-02-25 01:38:51 +01:00
services nixos/kubernetes: Stabilize services startup across machines 2019-03-03 19:39:02 +01:00
system Revert "Merge pull request #54980 from danbst/etc-relative" (#56507) 2019-02-28 07:48:40 +02:00
tasks nixos: add preferLocalBuild=true; on derivations for config files 2019-02-22 20:11:27 +01:00
testing types.optionSet: deprecate and remove last usages 2019-01-31 00:41:10 +02:00
virtualisation nixos/docker: add enableNvidia option 2019-02-27 09:56:03 +01:00
module-list.nix Merge pull request #56562 from worldofpeace/module/gsd 2019-03-01 22:01:26 -05:00
rename.nix nixos/kubernetes: major module refactor 2019-02-20 21:08:01 +01:00