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