Skip to content

Commit

Permalink
Remove stuff which belongs in the windows executor implementation
Browse files Browse the repository at this point in the history
Signed-off-by: Manuel Buil <[email protected]>
  • Loading branch information
manuelbuil committed Nov 22, 2022
1 parent 9ff0943 commit 483e29e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 27 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ replace (
)

require (
github.com/Microsoft/hcsshim v0.9.4
github.com/Mirantis/cri-dockerd v0.0.0-00010101000000-000000000000
github.com/cloudnativelabs/kube-router v1.3.2
github.com/containerd/cgroups v1.0.3
Expand Down Expand Up @@ -161,6 +160,7 @@ require (
github.com/JeffAshton/win_pdh v0.0.0-20161109143554-76bb4ee9f0ab // indirect
github.com/MakeNowJust/heredoc v1.0.0 // indirect
github.com/Microsoft/go-winio v0.5.2 // indirect
github.com/Microsoft/hcsshim v0.9.4 // indirect
github.com/NYTimes/gziphandler v1.1.1 // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
Expand Down
24 changes: 0 additions & 24 deletions pkg/daemons/agent/agent_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,14 @@ import (
"os"
"path/filepath"
"strings"
"time"

"github.com/Microsoft/hcsshim"
"github.com/k3s-io/k3s/pkg/daemons/config"
"github.com/k3s-io/k3s/pkg/util"
"github.com/sirupsen/logrus"
"k8s.io/apimachinery/pkg/util/net"
"k8s.io/kubernetes/pkg/kubeapiserver/authorizer/modes"
)

// NetworkName may be overridden at runtime in downstream projects
var NetworkName = "vxlan0"

const (
socketPrefix = "npipe://"
)
Expand All @@ -40,10 +35,6 @@ func kubeProxyArgs(cfg *config.Agent) map[string]string {
argsMap["hostname-override"] = cfg.NodeName
}

if sourceVip := waitForManagementIP(NetworkName); sourceVip != "" {
argsMap["source-vip"] = sourceVip
}

return argsMap
}

Expand Down Expand Up @@ -133,18 +124,3 @@ func kubeletArgs(cfg *config.Agent) map[string]string {
}
return argsMap
}

func waitForManagementIP(networkName string) string {
for range time.Tick(time.Second * 5) {
network, err := hcsshim.GetHNSNetworkByName(networkName)
if err != nil {
logrus.WithError(err).Warning("can't find HNS network, retrying", networkName)
continue
}
if network.ManagementIP == "" {
continue
}
return network.ManagementIP
}
return ""
}
4 changes: 2 additions & 2 deletions pkg/static/zz_generated_bindata.go

Large diffs are not rendered by default.

0 comments on commit 483e29e

Please sign in to comment.