Merge pull request #60415 from johanot/kubernetes-fix-control-plane-online-unit

nixos/kubernetes: fix control-plane-online prestart dependency
This commit is contained in:
Sarah Brofeldt 2019-04-30 11:52:05 +02:00 committed by GitHub
commit 10c671ff7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -273,11 +273,10 @@ in {
wantedBy = [ "kube-control-plane-online.target" ];
after = [ "kube-scheduler.service" "kube-controller-manager.service" ];
before = [ "kube-control-plane-online.target" ];
environment.KUBECONFIG = cfg.lib.mkKubeConfig "default" cfg.kubeconfig;
path = [ pkgs.kubectl ];
path = [ pkgs.curl ];
preStart = ''
until kubectl get --raw=/healthz 2>/dev/null; do
echo kubectl get --raw=/healthz: exit status $?
until curl -Ssf ${cfg.apiserverAddress}/healthz do
echo curl -Ssf ${cfg.apiserverAddress}/healthz: exit status $?
sleep 3
done
'';