nixos/kubernetes: Address review: rename node-online target

This commit is contained in:
Christian Albrecht 2019-03-06 17:17:20 +01:00
parent 5684034693
commit e148cb040b
No known key found for this signature in database
GPG key ID: 866AF4B25DF7EB00
3 changed files with 9 additions and 9 deletions

View file

@ -71,8 +71,8 @@ in
};
systemd.targets.flannel = {
wantedBy = [ "node-online.target" ];
before = [ "node-online.target" ];
wantedBy = [ "kube-node-online.target" ];
before = [ "kube-node-online.target" ];
};
systemd.services.flannel = {

View file

@ -340,9 +340,9 @@ in
};
systemd.services.kubelet-online = {
wantedBy = [ "node-online.target" ];
wantedBy = [ "kube-node-online.target" ];
after = [ "flannel.target" "kubelet.target" ];
before = [ "node-online.target" ];
before = [ "kube-node-online.target" ];
# it is complicated. flannel needs kubelet to run the pause container before
# it discusses the node CIDR with apiserver and afterwards configures and restarts
# dockerd. Until then prevent creating any pods because they have to be recreated anyway
@ -407,11 +407,11 @@ in
{
systemd.targets.kubelet = {
wantedBy = [ "node-online.target" ];
before = [ "node-online.target" ];
wantedBy = [ "kube-node-online.target" ];
before = [ "kube-node-online.target" ];
};
systemd.targets.node-online = {
systemd.targets.kube-node-online = {
wantedBy = [ "kubernetes.target" ];
before = [ "kubernetes.target" ];
};

View file

@ -48,9 +48,9 @@ in
config = mkIf cfg.enable {
systemd.services.kube-proxy = {
description = "Kubernetes Proxy Service";
wantedBy = [ "node-online.target" ];
wantedBy = [ "kube-node-online.target" ];
after = [ "kubelet-online.service" ];
before = [ "node-online.target" ];
before = [ "kube-node-online.target" ];
path = with pkgs; [ iptables conntrack_tools ];
preStart = ''
${top.lib.mkWaitCurl ( with config.systemd.services.kube-proxy; {