mirror of
https://git.vectorsigma.ru/public/k3s.git
synced 2026-08-04 04:20:14 +00:00
Remove stuff which belongs in the windows executor implementation
Signed-off-by: Manuel Buil <mbuil@suse.com>
This commit is contained in:
1
go.mod
1
go.mod
@@ -71,7 +71,6 @@ replace (
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/Microsoft/hcsshim v0.9.2
|
||||
github.com/cloudnativelabs/kube-router v1.3.2
|
||||
github.com/containerd/cgroups v1.0.3
|
||||
github.com/containerd/containerd v1.6.2
|
||||
|
||||
@@ -7,9 +7,7 @@ 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"
|
||||
@@ -17,8 +15,6 @@ import (
|
||||
"k8s.io/kubernetes/pkg/kubeapiserver/authorizer/modes"
|
||||
)
|
||||
|
||||
var NetworkName = "vxlan0"
|
||||
|
||||
func checkRuntimeEndpoint(cfg *config.Agent, argsMap map[string]string) {
|
||||
if strings.HasPrefix(cfg.RuntimeSocket, windowsPrefix) {
|
||||
argsMap["container-runtime-endpoint"] = cfg.RuntimeSocket
|
||||
@@ -43,10 +39,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
|
||||
}
|
||||
|
||||
@@ -139,18 +131,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 ""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user