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
8f7b274c
Commit
8f7b274c
authored
Sep 20, 2016
by
Vishnu kannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix base image pinning during upgrades via cluster/gce/upgrade.sh
Signed-off-by:
Vishnu kannan
<
vishnuk@google.com
>
parent
25801575
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
upgrade.sh
cluster/gce/upgrade.sh
+13
-9
No files found.
cluster/gce/upgrade.sh
View file @
8f7b274c
...
@@ -125,6 +125,7 @@ function wait-for-master() {
...
@@ -125,6 +125,7 @@ function wait-for-master() {
function
prepare-upgrade
()
{
function
prepare-upgrade
()
{
ensure-temp-dir
ensure-temp-dir
detect-project
detect-project
detect-node-names
# sets INSTANCE_GROUPS
write-cluster-name
write-cluster-name
tars_from_version
tars_from_version
}
}
...
@@ -175,6 +176,16 @@ function upgrade-nodes() {
...
@@ -175,6 +176,16 @@ function upgrade-nodes() {
do
-node-upgrade
do
-node-upgrade
}
}
function
setup-base-image
()
{
if
[[
"
${
env_os_distro
}
"
==
"false"
]]
;
then
echo
"== Ensuring that new Node base OS image matched the existing Node base OS image"
node_os_distribution
=
$(
get-node-os
"
${
NODE_NAMES
[0]
}
"
)
source
"
${
KUBE_ROOT
}
/cluster/gce/
${
node_os_distribution
}
/node-helper.sh"
# Reset the node image based on current os distro
set-node-image
fi
}
# prepare-node-upgrade creates a new instance template suitable for upgrading
# prepare-node-upgrade creates a new instance template suitable for upgrading
# to KUBE_VERSION and echos a single line with the name of the new template.
# to KUBE_VERSION and echos a single line with the name of the new template.
#
#
...
@@ -196,9 +207,9 @@ function upgrade-nodes() {
...
@@ -196,9 +207,9 @@ function upgrade-nodes() {
# KUBELET_KEY_BASE64
# KUBELET_KEY_BASE64
function
prepare-node-upgrade
()
{
function
prepare-node-upgrade
()
{
echo
"== Preparing node upgrade (to
${
KUBE_VERSION
}
). =="
>
&2
echo
"== Preparing node upgrade (to
${
KUBE_VERSION
}
). =="
>
&2
SANITIZED_VERSION
=
$(
echo
${
KUBE_VERSION
}
|
sed
's/[\.\+]/-/g'
)
setup-base-image
detect-node-names
# sets INSTANCE_GROUPS
SANITIZED_VERSION
=
$(
echo
${
KUBE_VERSION
}
|
sed
's/[\.\+]/-/g'
)
# TODO(zmerlynn): Refactor setting scope flags.
# TODO(zmerlynn): Refactor setting scope flags.
local
scope_flags
=
local
scope_flags
=
...
@@ -221,13 +232,6 @@ function prepare-node-upgrade() {
...
@@ -221,13 +232,6 @@ function prepare-node-upgrade() {
# compatible way?
# compatible way?
write-node-env
write-node-env
if
[[
"
${
env_os_distro
}
"
==
"false"
]]
;
then
NODE_OS_DISTRIBUTION
=
$(
get-node-os
"
${
NODE_NAMES
[0]
}
"
)
source
"
${
KUBE_ROOT
}
/cluster/gce/
${
NODE_OS_DISTRIBUTION
}
/node-helper.sh"
# Reset the node image based on current os distro
set-node-image
fi
# TODO(zmerlynn): Get configure-vm script from ${version}. (Must plumb this
# TODO(zmerlynn): Get configure-vm script from ${version}. (Must plumb this
# through all create-node-instance-template implementations).
# through all create-node-instance-template implementations).
local
template_name
=
$(
get-template-name-from-version
${
SANITIZED_VERSION
})
local
template_name
=
$(
get-template-name-from-version
${
SANITIZED_VERSION
})
...
...
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