about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorSarah Brofeldt <sbrofeldt@gmail.com>2019-04-30 11:52:05 +0200
committerGitHub <noreply@github.com>2019-04-30 11:52:05 +0200
commit10c671ff7c287fc25929760e91d397f8606ca26a (patch)
tree1f4494b4297f1416b8df3aa1fb5c10cc692460e9 /nixos
parent88d86c901ab24239461b4b366b90426f8c24f8a4 (diff)
parent29bf511ef9d3a9c8b97e16002a7d633aaa7d9725 (diff)
downloadnixlib-10c671ff7c287fc25929760e91d397f8606ca26a.tar
nixlib-10c671ff7c287fc25929760e91d397f8606ca26a.tar.gz
nixlib-10c671ff7c287fc25929760e91d397f8606ca26a.tar.bz2
nixlib-10c671ff7c287fc25929760e91d397f8606ca26a.tar.lz
nixlib-10c671ff7c287fc25929760e91d397f8606ca26a.tar.xz
nixlib-10c671ff7c287fc25929760e91d397f8606ca26a.tar.zst
nixlib-10c671ff7c287fc25929760e91d397f8606ca26a.zip
Merge pull request #60415 from johanot/kubernetes-fix-control-plane-online-unit
nixos/kubernetes: fix control-plane-online prestart dependency
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/cluster/kubernetes/default.nix7
1 files changed, 3 insertions, 4 deletions
diff --git a/nixos/modules/services/cluster/kubernetes/default.nix b/nixos/modules/services/cluster/kubernetes/default.nix
index 192c893f8a16..5e46bfc4240f 100644
--- a/nixos/modules/services/cluster/kubernetes/default.nix
+++ b/nixos/modules/services/cluster/kubernetes/default.nix
@@ -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
         '';