Skip to content

Commit

Permalink
build: golang 1.14 on alpine 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
dweomer committed Jun 12, 2020
1 parent af10a57 commit 15457a7
Show file tree
Hide file tree
Showing 8 changed files with 134 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .golangci.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
]
},
"run": {
"skip-dirs": [
"(^|/)pkg/generated($|/)"
],
"skip-files": [
"/zz_generated_"
],
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.dapper
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.13.11-alpine3.10
FROM golang:1.14.4-alpine3.12

ARG http_proxy=$http_proxy
ARG https_proxy=$https_proxy
Expand All @@ -8,7 +8,7 @@ ENV https_proxy=$https_proxy
ENV no_proxy=$no_proxy

RUN apk -U --no-cache add bash git gcc musl-dev docker vim less file curl wget ca-certificates jq linux-headers zlib-dev tar zip squashfs-tools npm coreutils \
python2 openssl-dev libffi-dev libseccomp libseccomp-dev make libuv-static
python2 openssl-dev libffi-dev libseccomp libseccomp-dev make libuv-static zlib-static

RUN apk -U --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/main/ add sqlite-dev sqlite-static libselinux libselinux-dev
RUN mkdir -p /go/src/golang.org/x && \
Expand All @@ -21,7 +21,7 @@ ARG DAPPER_HOST_ARCH
ENV ARCH $DAPPER_HOST_ARCH

RUN if [ "${ARCH}" = 'amd64' ]; then \
curl -sL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.15.0; \
curl -sL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.27.0; \
fi

ARG SELINUX=true
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.manifest
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.13.8-alpine3.10
FROM golang:1.14.4-alpine3.12

COPY --from=plugins/manifest:1.2.3 /bin/* /bin/

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.test.dapper
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.13.8-alpine3.10
FROM golang:1.14.4-alpine3.12

RUN apk -U --no-cache add bash git gcc musl-dev docker curl jq coreutils python2 openssl

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/rancher/k3s

go 1.13
go 1.14

replace (
github.com/Microsoft/hcsshim => github.com/Microsoft/hcsshim v0.8.7-0.20190926181021-82c7525d98c8
Expand Down
5 changes: 2 additions & 3 deletions pkg/agent/loadbalancer/loadbalancer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package loadbalancer

import (
"bufio"
"context"
"errors"
"fmt"
"io/ioutil"
Expand Down Expand Up @@ -106,7 +105,7 @@ func TestFailOver(t *testing.T) {
DataDir: tmpDir,
}

lb, err := New(context.Background(), cfg.DataDir, SupervisorServiceName, cfg.ServerURL)
lb, err := New(cfg.DataDir, SupervisorServiceName, cfg.ServerURL)
if err != nil {
assertEqual(t, err, nil)
}
Expand Down Expand Up @@ -157,7 +156,7 @@ func TestFailFast(t *testing.T) {
DataDir: tmpDir,
}

lb, err := New(context.Background(), cfg.DataDir, SupervisorServiceName, cfg.ServerURL)
lb, err := New(cfg.DataDir, SupervisorServiceName, cfg.ServerURL)
if err != nil {
assertEqual(t, err, nil)
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func startWrangler(ctx context.Context, config *Config) error {
return
case <-config.ControlConfig.Runtime.APIServerReady:
if err := runControllers(ctx, config); err != nil {
logrus.Fatal("failed to start controllers: %v", err)
logrus.Fatalf("failed to start controllers: %v", err)
}
}
}()
Expand Down Expand Up @@ -419,7 +419,7 @@ func setMasterRoleLabel(ctx context.Context, nodes v1.NodeClient) error {
node.Labels[MasterRoleLabelKey] = "true"
_, err = nodes.Update(node)
if err == nil {
logrus.Infof("master role label has been set succesfully on node: %s", nodeName)
logrus.Infof("master role label has been set successfully on node: %s", nodeName)
break
}
select {
Expand Down

0 comments on commit 15457a7

Please sign in to comment.