mirror of https://github.com/k3s-io/k3s
Fix build
parent
7c17db672e
commit
69acbf5a74
|
@ -24,6 +24,7 @@ import (
|
|||
"log"
|
||||
"math/rand"
|
||||
"os"
|
||||
"os/exec"
|
||||
"time"
|
||||
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet"
|
||||
|
@ -63,7 +64,7 @@ func main() {
|
|||
}
|
||||
|
||||
my_kubelet := kubelet.Kubelet{
|
||||
Hostname: hostname,
|
||||
Hostname: string(hostname),
|
||||
DockerClient: dockerClient,
|
||||
FileCheckFrequency: *fileCheckFrequency,
|
||||
SyncFrequency: *syncFrequency,
|
||||
|
|
|
@ -45,6 +45,7 @@ ETCD_PID=$!
|
|||
|
||||
sleep 5
|
||||
|
||||
$(dirname $0)/../output/go/localkube
|
||||
echo "Running localkube as root (so it can talk to docker's unix socket)"
|
||||
sudo $(dirname $0)/../output/go/localkube
|
||||
|
||||
kill $ETCD_PID
|
||||
|
|
|
@ -428,7 +428,7 @@ func (kl *Kubelet) getKubeletStateFromEtcd(key string, changeChannel chan<- []ap
|
|||
// The channel to send new configurations across
|
||||
// This function loops forever and is intended to be run in a go routine.
|
||||
func (kl *Kubelet) SyncAndSetupEtcdWatch(changeChannel chan<- []api.ContainerManifest) {
|
||||
key := "/registry/hosts/" + strings.TrimSpace(string(kl.Hostname))
|
||||
key := "/registry/hosts/" + strings.TrimSpace(kl.Hostname)
|
||||
// First fetch the initial configuration (watch only gives changes...)
|
||||
for {
|
||||
err := kl.getKubeletStateFromEtcd(key, changeChannel)
|
||||
|
|
Loading…
Reference in New Issue