Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
6b5d5371
Unverified
Commit
6b5d5371
authored
Apr 25, 2017
by
Lucas Käldström
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bump to go1.8.1 and remove the edge GOROOT
parent
e1adcc23
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
34 deletions
+15
-34
Dockerfile
build/build-image/Dockerfile
+1
-1
Dockerfile
build/build-image/cross/Dockerfile
+1
-10
VERSION
build/build-image/cross/VERSION
+1
-1
Makefile
cluster/images/etcd-version-monitor/Makefile
+2
-2
golang.sh
hack/lib/golang.sh
+7
-17
Makefile
test/images/serve_hostname/Makefile
+3
-3
No files found.
build/build-image/Dockerfile
View file @
6b5d5371
...
@@ -19,7 +19,7 @@ FROM gcr.io/google_containers/kube-cross:KUBE_BUILD_IMAGE_CROSS_TAG
...
@@ -19,7 +19,7 @@ FROM gcr.io/google_containers/kube-cross:KUBE_BUILD_IMAGE_CROSS_TAG
RUN
touch
/kube-build-image
RUN
touch
/kube-build-image
# To run as non-root we sometimes need to rebuild go stdlib packages.
# To run as non-root we sometimes need to rebuild go stdlib packages.
RUN
chmod
-R
a+rwx /usr/local/go/pkg
${
K8S_EDGE_GOROOT
}
/pkg
RUN
chmod
-R
a+rwx /usr/local/go/pkg
# For running integration tests /var/run/kubernetes is required
# For running integration tests /var/run/kubernetes is required
# and should be writable by user
# and should be writable by user
...
...
build/build-image/cross/Dockerfile
View file @
6b5d5371
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
# This file creates a standard build environment for building cross
# This file creates a standard build environment for building cross
# platform go binary for the architecture kubernetes cares about.
# platform go binary for the architecture kubernetes cares about.
FROM
golang:1.
7.5
FROM
golang:1.
8.1
ENV
GOARM 7
ENV
GOARM 7
ENV
KUBE_DYNAMIC_CROSSPLATFORMS \
ENV
KUBE_DYNAMIC_CROSSPLATFORMS \
...
@@ -77,12 +77,3 @@ RUN export ETCD_VERSION=v3.0.17; \
...
@@ -77,12 +77,3 @@ RUN export ETCD_VERSION=v3.0.17; \
&&
cd
/usr/local/src/etcd
\
&&
cd
/usr/local/src/etcd
\
&&
curl
-fsSL
https://github.com/coreos/etcd/releases/download/
${
ETCD_VERSION
}
/etcd-
${
ETCD_VERSION
}
-linux-amd64
.tar.gz |
tar
-xz
\
&&
curl
-fsSL
https://github.com/coreos/etcd/releases/download/
${
ETCD_VERSION
}
/etcd-
${
ETCD_VERSION
}
-linux-amd64
.tar.gz |
tar
-xz
\
&&
ln
-s
../src/etcd/etcd-
${
ETCD_VERSION
}
-linux-amd64
/etcd /usr/local/bin/
&&
ln
-s
../src/etcd/etcd-
${
ETCD_VERSION
}
-linux-amd64
/etcd /usr/local/bin/
# TODO: Remove the need for two golang versions; when we use go1.8 for all other builds we can remove this
ENV
K8S_GOLANG_EDGE_VERSION=1.8.1 \
K8S_EDGE_GOROOT=/usr/local/go_k8s_edge
RUN
mkdir
-p
${
K8S_EDGE_GOROOT
}
\
&&
curl
-sSL
https://golang.org/dl/go
${
K8S_GOLANG_EDGE_VERSION
}
.linux-amd64.tar.gz |
tar
-xz
-C
${
K8S_EDGE_GOROOT
}
--strip-components
=
1
# Prebuild the standard library for those platforms that need the edge GOROOT
RUN for
platform
in
linux/arm linux/ppc64le
;
do
GOOS
=
${
platform
%/*
}
GOARCH
=
${
platform
##*/
}
GOROOT
=
${
K8S_EDGE_GOROOT
}
go
install
std
;
done
build/build-image/cross/VERSION
View file @
6b5d5371
v1.
7.5-3
v1.
8.1-1
cluster/images/etcd-version-monitor/Makefile
View file @
6b5d5371
...
@@ -15,10 +15,10 @@
...
@@ -15,10 +15,10 @@
# Build the etcd-version-monitor image
# Build the etcd-version-monitor image
#
#
# Usage:
# Usage:
# [GOLANG_VERSION=1.
7.5
] [REGISTRY=gcr.io/google-containers] [TAG=test] make (build|push)
# [GOLANG_VERSION=1.
8.1
] [REGISTRY=gcr.io/google-containers] [TAG=test] make (build|push)
# TODO(shyamjvs): Support architectures other than amd64 if needed.
# TODO(shyamjvs): Support architectures other than amd64 if needed.
ARCH
:=
amd64
ARCH
:=
amd64
GOLANG_VERSION
?=
1.
7.5
GOLANG_VERSION
?=
1.
8.1
REGISTRY
?=
gcr.io/google-containers
REGISTRY
?=
gcr.io/google-containers
TAG
?=
0.1.0
TAG
?=
0.1.0
IMAGE
:=
$(REGISTRY)
/etcd-version-monitor:
$(TAG)
IMAGE
:=
$(REGISTRY)
/etcd-version-monitor:
$(TAG)
...
...
hack/lib/golang.sh
View file @
6b5d5371
...
@@ -274,8 +274,6 @@ kube::golang::set_platform_envs() {
...
@@ -274,8 +274,6 @@ kube::golang::set_platform_envs() {
"linux/arm"
)
"linux/arm"
)
export
CGO_ENABLED
=
1
export
CGO_ENABLED
=
1
export
CC
=
arm-linux-gnueabihf-gcc
export
CC
=
arm-linux-gnueabihf-gcc
# Use a special edge version of golang since the stable golang version used for everything else doesn't work
export
GOROOT
=
${
K8S_EDGE_GOROOT
}
;;
;;
"linux/arm64"
)
"linux/arm64"
)
export
CGO_ENABLED
=
1
export
CGO_ENABLED
=
1
...
@@ -284,8 +282,6 @@ kube::golang::set_platform_envs() {
...
@@ -284,8 +282,6 @@ kube::golang::set_platform_envs() {
"linux/ppc64le"
)
"linux/ppc64le"
)
export
CGO_ENABLED
=
1
export
CGO_ENABLED
=
1
export
CC
=
powerpc64le-linux-gnu-gcc
export
CC
=
powerpc64le-linux-gnu-gcc
# Use a special edge version of golang since the stable golang version used for everything else doesn't work
export
GOROOT
=
${
K8S_EDGE_GOROOT
}
;;
;;
"linux/s390x"
)
"linux/s390x"
)
export
CGO_ENABLED
=
1
export
CGO_ENABLED
=
1
...
@@ -487,13 +483,7 @@ kube::golang::build_binaries_for_platform() {
...
@@ -487,13 +483,7 @@ kube::golang::build_binaries_for_platform() {
local
-a
nonstatics
=()
local
-a
nonstatics
=()
local
-a
tests
=()
local
-a
tests
=()
# Temporary workaround while we have two GOROOT's (which we'll get rid of as soon as we upgrade to go1.8 for amd64 as well)
V
=
2 kube::log::info
"Env for
${
platform
}
: GOOS=
${
GOOS
-
}
GOARCH=
${
GOARCH
-
}
GOROOT=
${
GOROOT
-
}
CGO_ENABLED=
${
CGO_ENABLED
-
}
CC=
${
CC
-
}
"
local
GO
=
go
if
[[
"
${
GOROOT
}
"
==
"
${
K8S_EDGE_GOROOT
:-}
"
]]
;
then
GO
=
"
${
K8S_EDGE_GOROOT
}
/bin/go"
fi
V
=
2 kube::log::info
"Env for
${
platform
}
: GOOS=
${
GOOS
-
}
GOARCH=
${
GOARCH
-
}
GOROOT=
${
GOROOT
-
}
CGO_ENABLED=
${
CGO_ENABLED
-
}
CC=
${
CC
-
}
GO=
${
GO
}
"
for
binary
in
"
${
binaries
[@]
}
"
;
do
for
binary
in
"
${
binaries
[@]
}
"
;
do
if
[[
"
${
binary
}
"
=
~
".test"
$
]]
;
then
if
[[
"
${
binary
}
"
=
~
".test"
$
]]
;
then
...
@@ -513,7 +503,7 @@ kube::golang::build_binaries_for_platform() {
...
@@ -513,7 +503,7 @@ kube::golang::build_binaries_for_platform() {
kube::log::progress
" "
kube::log::progress
" "
for
binary
in
"
${
statics
[@]
:+
${
statics
[@]
}}
"
;
do
for
binary
in
"
${
statics
[@]
:+
${
statics
[@]
}}
"
;
do
local
outfile
=
$(
kube::golang::output_filename_for_binary
"
${
binary
}
"
"
${
platform
}
"
)
local
outfile
=
$(
kube::golang::output_filename_for_binary
"
${
binary
}
"
"
${
platform
}
"
)
CGO_ENABLED
=
0
"
${
GO
}
"
build
-o
"
${
outfile
}
"
\
CGO_ENABLED
=
0
go
build
-o
"
${
outfile
}
"
\
"
${
goflags
[@]
:+
${
goflags
[@]
}}
"
\
"
${
goflags
[@]
:+
${
goflags
[@]
}}
"
\
-gcflags
"
${
gogcflags
}
"
\
-gcflags
"
${
gogcflags
}
"
\
-ldflags
"
${
goldflags
}
"
\
-ldflags
"
${
goldflags
}
"
\
...
@@ -522,7 +512,7 @@ kube::golang::build_binaries_for_platform() {
...
@@ -522,7 +512,7 @@ kube::golang::build_binaries_for_platform() {
done
done
for
binary
in
"
${
nonstatics
[@]
:+
${
nonstatics
[@]
}}
"
;
do
for
binary
in
"
${
nonstatics
[@]
:+
${
nonstatics
[@]
}}
"
;
do
local
outfile
=
$(
kube::golang::output_filename_for_binary
"
${
binary
}
"
"
${
platform
}
"
)
local
outfile
=
$(
kube::golang::output_filename_for_binary
"
${
binary
}
"
"
${
platform
}
"
)
"
${
GO
}
"
build
-o
"
${
outfile
}
"
\
go
build
-o
"
${
outfile
}
"
\
"
${
goflags
[@]
:+
${
goflags
[@]
}}
"
\
"
${
goflags
[@]
:+
${
goflags
[@]
}}
"
\
-gcflags
"
${
gogcflags
}
"
\
-gcflags
"
${
gogcflags
}
"
\
-ldflags
"
${
goldflags
}
"
\
-ldflags
"
${
goldflags
}
"
\
...
@@ -533,13 +523,13 @@ kube::golang::build_binaries_for_platform() {
...
@@ -533,13 +523,13 @@ kube::golang::build_binaries_for_platform() {
else
else
# Use go install.
# Use go install.
if
[[
"
${#
nonstatics
[@]
}
"
!=
0
]]
;
then
if
[[
"
${#
nonstatics
[@]
}
"
!=
0
]]
;
then
"
${
GO
}
"
install
"
${
goflags
[@]
:+
${
goflags
[@]
}}
"
\
go
install
"
${
goflags
[@]
:+
${
goflags
[@]
}}
"
\
-gcflags
"
${
gogcflags
}
"
\
-gcflags
"
${
gogcflags
}
"
\
-ldflags
"
${
goldflags
}
"
\
-ldflags
"
${
goldflags
}
"
\
"
${
nonstatics
[@]
:+
${
nonstatics
[@]
}}
"
"
${
nonstatics
[@]
:+
${
nonstatics
[@]
}}
"
fi
fi
if
[[
"
${#
statics
[@]
}
"
!=
0
]]
;
then
if
[[
"
${#
statics
[@]
}
"
!=
0
]]
;
then
CGO_ENABLED
=
0
"
${
GO
}
"
install
-installsuffix
cgo
"
${
goflags
[@]
:+
${
goflags
[@]
}}
"
\
CGO_ENABLED
=
0
go
install
-installsuffix
cgo
"
${
goflags
[@]
:+
${
goflags
[@]
}}
"
\
-gcflags
"
${
gogcflags
}
"
\
-gcflags
"
${
gogcflags
}
"
\
-ldflags
"
${
goldflags
}
"
\
-ldflags
"
${
goldflags
}
"
\
"
${
statics
[@]
:+
${
statics
[@]
}}
"
"
${
statics
[@]
:+
${
statics
[@]
}}
"
...
@@ -572,13 +562,13 @@ kube::golang::build_binaries_for_platform() {
...
@@ -572,13 +562,13 @@ kube::golang::build_binaries_for_platform() {
# doing a staleness check on k8s.io/kubernetes/test/e2e package always
# doing a staleness check on k8s.io/kubernetes/test/e2e package always
# returns true (always stale). And that's why we need to install the
# returns true (always stale). And that's why we need to install the
# test package.
# test package.
"
${
GO
}
"
install
"
${
goflags
[@]
:+
${
goflags
[@]
}}
"
\
go
install
"
${
goflags
[@]
:+
${
goflags
[@]
}}
"
\
-gcflags
"
${
gogcflags
}
"
\
-gcflags
"
${
gogcflags
}
"
\
-ldflags
"
${
goldflags
}
"
\
-ldflags
"
${
goldflags
}
"
\
"
${
testpkg
}
"
"
${
testpkg
}
"
mkdir
-p
"
$(
dirname
${
outfile
})
"
mkdir
-p
"
$(
dirname
${
outfile
})
"
"
${
GO
}
"
test
-i
-c
\
go
test
-i
-c
\
"
${
goflags
[@]
:+
${
goflags
[@]
}}
"
\
"
${
goflags
[@]
:+
${
goflags
[@]
}}
"
\
-gcflags
"
${
gogcflags
}
"
\
-gcflags
"
${
gogcflags
}
"
\
-ldflags
"
${
goldflags
}
"
\
-ldflags
"
${
goldflags
}
"
\
...
...
test/images/serve_hostname/Makefile
View file @
6b5d5371
...
@@ -15,11 +15,11 @@
...
@@ -15,11 +15,11 @@
# Cross-build the serve_hostname image
# Cross-build the serve_hostname image
#
#
# Usage:
# Usage:
# [TAG=v1.
6
] [PREFIX=gcr.io/google_containers] [TEST_REGISTRY=gcr.io/k8s-authenticated-test] [ARCH=amd64] [BASEIMAGE=busybox] make all
# [TAG=v1.
7
] [PREFIX=gcr.io/google_containers] [TEST_REGISTRY=gcr.io/k8s-authenticated-test] [ARCH=amd64] [BASEIMAGE=busybox] make all
.PHONY
:
all push container clean
.PHONY
:
all push container clean
TAG
?=
v1.
6
TAG
?=
v1.
7
REGISTRY
?=
gcr.io/google-containers
REGISTRY
?=
gcr.io/google-containers
TEST_REGISTRY
?=
gcr.io/k8s-authenticated-test
TEST_REGISTRY
?=
gcr.io/k8s-authenticated-test
...
@@ -31,7 +31,7 @@ ALL_ARCH = amd64 arm arm64 ppc64le s390x
...
@@ -31,7 +31,7 @@ ALL_ARCH = amd64 arm arm64 ppc64le s390x
GOARM
=
7
GOARM
=
7
TEMP_DIR
:=
$(
shell
mktemp
-d
)
TEMP_DIR
:=
$(
shell
mktemp
-d
)
GOLANG_VERSION
=
1.
7.5
GOLANG_VERSION
=
1.
8.1
BIN
=
serve_hostname
BIN
=
serve_hostname
SRCS
=
serve_hostname.go
SRCS
=
serve_hostname.go
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment