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
76c1828c
Unverified
Commit
76c1828c
authored
Feb 08, 2018
by
Shyam Jeedigunta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mark kubemark images w/ random tags to avoid race b/w runs
parent
f3cc62d8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
8 deletions
+14
-8
BUILD
cluster/images/kubemark/BUILD
+1
-1
Makefile
cluster/images/kubemark/Makefile
+4
-3
hollow-node_template.yaml
test/kubemark/resources/hollow-node_template.yaml
+2
-2
start-kubemark.sh
test/kubemark/start-kubemark.sh
+7
-2
No files found.
cluster/images/kubemark/BUILD
View file @
76c1828c
...
...
@@ -15,7 +15,7 @@ docker_push(
registry = "$(REGISTRY)",
repository = "kubemark",
stamp = True,
tag = "
latest
",
tag = "
$(IMAGE_TAG)
",
tags = ["manual"],
)
...
...
cluster/images/kubemark/Makefile
View file @
76c1828c
...
...
@@ -20,16 +20,17 @@
# .. is not the same as:
# make REGISTRY=$VAR
REGISTRY
:=
$
(
if
$(REGISTRY)
,
$(REGISTRY)
,staging-k8s.gcr.io
)
IMAGE_TAG
:=
$
(
if
$(IMAGE_TAG)
,
$(IMAGE_TAG)
,latest
)
all
:
gcloudpush
build
:
docker build
--pull
-t
$(REGISTRY)
/kubemark .
docker build
--pull
-t
$(REGISTRY)
/kubemark
:
$(IMAGE_TAG)
.
gcloudpush
:
build
gcloud docker
--
push
$(REGISTRY)
/kubemark
gcloud docker
--
push
$(REGISTRY)
/kubemark
:
$(IMAGE_TAG)
push
:
build
docker
--
push
$(REGISTRY)
/kubemark
docker
--
push
$(REGISTRY)
/kubemark
:
$(IMAGE_TAG)
.PHONY
:
all build gcloudpush push
test/kubemark/resources/hollow-node_template.yaml
View file @
76c1828c
...
...
@@ -35,7 +35,7 @@ spec:
emptyDir
:
{}
containers
:
-
name
:
hollow-kubelet
image
:
{{
full_registry
}}
/kubemark:
latest
image
:
{{
full_registry
}}
/kubemark:
{{kubemark_image_tag}}
ports
:
-
containerPort
:
4194
-
containerPort
:
10250
...
...
@@ -67,7 +67,7 @@ spec:
securityContext
:
privileged
:
true
-
name
:
hollow-proxy
image
:
{{
full_registry
}}
/kubemark:
latest
image
:
{{
full_registry
}}
/kubemark:
{{kubemark_image_tag}}
env
:
-
name
:
CONTENT_TYPE
valueFrom
:
...
...
test/kubemark/start-kubemark.sh
View file @
76c1828c
...
...
@@ -45,6 +45,10 @@ KUBECTL="${KUBE_ROOT}/cluster/kubectl.sh"
KUBEMARK_DIRECTORY
=
"
${
KUBE_ROOT
}
/test/kubemark"
RESOURCE_DIRECTORY
=
"
${
KUBEMARK_DIRECTORY
}
/resources"
# Generate a random 6-digit alphanumeric tag for the kubemark image.
# Used to uniquify image builds across different invocations of this script.
KUBEMARK_IMAGE_TAG
=
$(
head
/dev/urandom |
tr
-dc
'a-z0-9'
|
fold
-w
6 |
head
-n
1
)
# Write all environment variables that we need to pass to the kubemark master,
# locally to the file ${RESOURCE_DIRECTORY}/kubemark-master-env.sh.
function
create-master-environment-file
{
...
...
@@ -200,7 +204,7 @@ function create-and-upload-hollow-node-image {
cd
"
${
MAKE_DIR
}
"
RETRIES
=
3
for
attempt
in
$(
seq
1
${
RETRIES
})
;
do
if
!
REGISTRY
=
"
${
FULL_REGISTRY
}
"
make
"
${
KUBEMARK_IMAGE_MAKE_TARGET
}
"
;
then
if
!
REGISTRY
=
"
${
FULL_REGISTRY
}
"
IMAGE_TAG
=
"
${
KUBEMARK_IMAGE_TAG
}
"
make
"
${
KUBEMARK_IMAGE_MAKE_TARGET
}
"
;
then
if
[[
$((
attempt
))
-eq
"
${
RETRIES
}
"
]]
;
then
echo
"
${
color_red
}
Make failed. Exiting.
${
color_norm
}
"
exit
1
...
...
@@ -221,7 +225,7 @@ function create-and-upload-hollow-node-image {
function
create-and-upload-hollow-node-image-bazel
{
RETRIES
=
3
for
attempt
in
$(
seq
1
${
RETRIES
})
;
do
if
!
bazel run //cluster/images/kubemark:push
--define
REGISTRY
=
"
${
FULL_REGISTRY
}
"
;
then
if
!
bazel run //cluster/images/kubemark:push
--define
REGISTRY
=
"
${
FULL_REGISTRY
}
"
--define
IMAGE_TAG
=
"
${
KUBEMARK_IMAGE_TAG
}
"
;
then
if
[[
$((
attempt
))
-eq
"
${
RETRIES
}
"
]]
;
then
echo
"
${
color_red
}
Image push failed. Exiting.
${
color_norm
}
"
exit
1
...
...
@@ -396,6 +400,7 @@ current-context: kubemark-context")
sed
-i
''
-e
"s/{{HOLLOW_PROXY_CPU}}/
${
proxy_cpu
}
/g"
"
${
RESOURCE_DIRECTORY
}
/hollow-node.yaml"
sed
-i
''
-e
"s/{{HOLLOW_PROXY_MEM}}/
${
proxy_mem
}
/g"
"
${
RESOURCE_DIRECTORY
}
/hollow-node.yaml"
sed
-i
''
-e
"s'{{full_registry}}'
${
FULL_REGISTRY
}
'g"
"
${
RESOURCE_DIRECTORY
}
/hollow-node.yaml"
sed
-i
''
-e
"s/{{kubemark_image_tag}}/
${
KUBEMARK_IMAGE_TAG
}
/g"
"
${
RESOURCE_DIRECTORY
}
/hollow-node.yaml"
sed
-i
''
-e
"s/{{master_ip}}/
${
MASTER_IP
}
/g"
"
${
RESOURCE_DIRECTORY
}
/hollow-node.yaml"
sed
-i
''
-e
"s/{{kubelet_verbosity_level}}/
${
KUBELET_TEST_LOG_LEVEL
}
/g"
"
${
RESOURCE_DIRECTORY
}
/hollow-node.yaml"
sed
-i
''
-e
"s/{{kubeproxy_verbosity_level}}/
${
KUBEPROXY_TEST_LOG_LEVEL
}
/g"
"
${
RESOURCE_DIRECTORY
}
/hollow-node.yaml"
...
...
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