mirror of
https://github.com/rancher/rke.git
synced 2025-08-02 07:43:04 +00:00
Update to Golang 1.11
This commit is contained in:
parent
1639bcdbd6
commit
22a339ea33
@ -11,7 +11,7 @@ RUN apt-get update && \
|
||||
ENV GOLANG_ARCH_amd64=amd64 GOLANG_ARCH_arm=armv6l GOLANG_ARCH=GOLANG_ARCH_${ARCH} \
|
||||
GOPATH=/go PATH=/go/bin:/usr/local/go/bin:${PATH} SHELL=/bin/bash
|
||||
|
||||
RUN wget -O - https://storage.googleapis.com/golang/go1.8.3.linux-${!GOLANG_ARCH}.tar.gz | tar -xzf - -C /usr/local && \
|
||||
RUN wget -O - https://storage.googleapis.com/golang/go1.11.linux-${!GOLANG_ARCH}.tar.gz | tar -xzf - -C /usr/local && \
|
||||
go get github.com/rancher/trash && go get golang.org/x/lint/golint
|
||||
|
||||
ENV DOCKER_URL_amd64=https://get.docker.com/builds/Linux/x86_64/docker-1.10.3 \
|
||||
|
@ -236,16 +236,16 @@ func (c *Cluster) BuildKubeControllerProcess(prefixPath string) v3.Process {
|
||||
}
|
||||
|
||||
CommandArgs := map[string]string{
|
||||
"address": "0.0.0.0",
|
||||
"cloud-provider": c.CloudProvider.Name,
|
||||
"allow-untagged-cloud": "true",
|
||||
"configure-cloud-routes": "false",
|
||||
"leader-elect": "true",
|
||||
"kubeconfig": pki.GetConfigPath(pki.KubeControllerCertName),
|
||||
"enable-hostpath-provisioner": "false",
|
||||
"node-monitor-grace-period": "40s",
|
||||
"pod-eviction-timeout": "5m0s",
|
||||
"v": "2",
|
||||
"address": "0.0.0.0",
|
||||
"cloud-provider": c.CloudProvider.Name,
|
||||
"allow-untagged-cloud": "true",
|
||||
"configure-cloud-routes": "false",
|
||||
"leader-elect": "true",
|
||||
"kubeconfig": pki.GetConfigPath(pki.KubeControllerCertName),
|
||||
"enable-hostpath-provisioner": "false",
|
||||
"node-monitor-grace-period": "40s",
|
||||
"pod-eviction-timeout": "5m0s",
|
||||
"v": "2",
|
||||
"allocate-node-cidrs": "true",
|
||||
"cluster-cidr": c.ClusterCIDR,
|
||||
"service-cluster-ip-range": c.Services.KubeController.ServiceClusterIPRange,
|
||||
@ -462,8 +462,8 @@ func (c *Cluster) BuildKubeProxyProcess(host *hosts.Host, prefixPath string) v3.
|
||||
}
|
||||
|
||||
CommandArgs := map[string]string{
|
||||
"cluster-cidr": c.ClusterCIDR,
|
||||
"v": "2",
|
||||
"cluster-cidr": c.ClusterCIDR,
|
||||
"v": "2",
|
||||
"healthz-bind-address": "0.0.0.0",
|
||||
"hostname-override": host.HostnameOverride,
|
||||
"kubeconfig": pki.GetConfigPath(pki.KubeProxyCertName),
|
||||
@ -507,17 +507,17 @@ func (c *Cluster) BuildKubeProxyProcess(host *hosts.Host, prefixPath string) v3.
|
||||
}
|
||||
registryAuthConfig, _, _ := docker.GetImageRegistryConfig(c.Services.Kubeproxy.Image, c.PrivateRegistriesMap)
|
||||
return v3.Process{
|
||||
Name: services.KubeproxyContainerName,
|
||||
Command: Command,
|
||||
VolumesFrom: VolumesFrom,
|
||||
Binds: getUniqStringList(Binds),
|
||||
Env: c.Services.Kubeproxy.ExtraEnv,
|
||||
NetworkMode: "host",
|
||||
RestartPolicy: "always",
|
||||
PidMode: "host",
|
||||
Privileged: true,
|
||||
HealthCheck: healthCheck,
|
||||
Image: c.Services.Kubeproxy.Image,
|
||||
Name: services.KubeproxyContainerName,
|
||||
Command: Command,
|
||||
VolumesFrom: VolumesFrom,
|
||||
Binds: getUniqStringList(Binds),
|
||||
Env: c.Services.Kubeproxy.ExtraEnv,
|
||||
NetworkMode: "host",
|
||||
RestartPolicy: "always",
|
||||
PidMode: "host",
|
||||
Privileged: true,
|
||||
HealthCheck: healthCheck,
|
||||
Image: c.Services.Kubeproxy.Image,
|
||||
ImageRegistryAuthConfig: registryAuthConfig,
|
||||
Labels: map[string]string{
|
||||
ContainerNameLabel: services.KubeproxyContainerName,
|
||||
@ -540,12 +540,12 @@ func (c *Cluster) BuildProxyProcess() v3.Process {
|
||||
Name: services.NginxProxyContainerName,
|
||||
Env: Env,
|
||||
// we do this to force container update when CP hosts change.
|
||||
Args: Env,
|
||||
Command: []string{"nginx-proxy"},
|
||||
NetworkMode: "host",
|
||||
RestartPolicy: "always",
|
||||
HealthCheck: v3.HealthCheck{},
|
||||
Image: c.SystemImages.NginxProxy,
|
||||
Args: Env,
|
||||
Command: []string{"nginx-proxy"},
|
||||
NetworkMode: "host",
|
||||
RestartPolicy: "always",
|
||||
HealthCheck: v3.HealthCheck{},
|
||||
Image: c.SystemImages.NginxProxy,
|
||||
ImageRegistryAuthConfig: registryAuthConfig,
|
||||
Labels: map[string]string{
|
||||
ContainerNameLabel: services.NginxProxyContainerName,
|
||||
@ -764,7 +764,7 @@ func getTagMajorVersion(tag string) string {
|
||||
}
|
||||
|
||||
func getCloudConfigChecksum(config v3.CloudProvider) string {
|
||||
configByteSum := md5.Sum([]byte(fmt.Sprintf("%s", config)))
|
||||
configByteSum := md5.Sum([]byte(fmt.Sprintf("%v", config)))
|
||||
return fmt.Sprintf("%x", configByteSum)
|
||||
}
|
||||
|
||||
|
@ -386,7 +386,7 @@ func GetContainerLogsStdoutStderr(ctx context.Context, dClient *client.Client, c
|
||||
var containerLog string
|
||||
clogs, logserr := ReadContainerLogs(ctx, dClient, containerName, follow, tail)
|
||||
if logserr != nil {
|
||||
logrus.Debug("logserr: %v", logserr)
|
||||
logrus.Debugf("logserr: %v", logserr)
|
||||
return containerLog, fmt.Errorf("Failed to get gather logs from container [%s]: %v", containerName, logserr)
|
||||
}
|
||||
defer clogs.Close()
|
||||
|
@ -11,7 +11,7 @@ OS_ARCH_ARG[windows]="386 amd64"
|
||||
OS_ARCH_ARG[darwin]="amd64"
|
||||
|
||||
mkdir -p bin
|
||||
[ "$(uname)" != "Darwin" ] && LINKFLAGS="-linkmode external -extldflags -static -s"
|
||||
[ "$(uname)" != "Darwin" ] && LINKFLAGS="-extldflags -static -s"
|
||||
CGO_ENABLED=0 go build -ldflags "-X main.VERSION=$VERSION $LINKFLAGS" -o bin/rke
|
||||
|
||||
if [ -n "$CROSS" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user