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
1a6842e0
Commit
1a6842e0
authored
Jun 09, 2015
by
Mike Danese
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix auth in gce/upgrade.sh
parent
0dfb681b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
upgrade.sh
cluster/gce/upgrade.sh
+13
-3
No files found.
cluster/gce/upgrade.sh
View file @
1a6842e0
...
@@ -60,8 +60,8 @@ function usage() {
...
@@ -60,8 +60,8 @@ function usage() {
function
upgrade-master
()
{
function
upgrade-master
()
{
echo
"== Upgrading master to '
${
SERVER_BINARY_TAR_URL
}
'. Do not interrupt, deleting master instance. =="
echo
"== Upgrading master to '
${
SERVER_BINARY_TAR_URL
}
'. Do not interrupt, deleting master instance. =="
get-
password
get-
kubeconfig-basicauth
get-
bearer-
token
get-
kubeconfig-bearer
token
detect-master
detect-master
...
@@ -80,7 +80,17 @@ function upgrade-master() {
...
@@ -80,7 +80,17 @@ function upgrade-master() {
function
wait-for-master
()
{
function
wait-for-master
()
{
echo
"== Waiting for new master to respond to API requests =="
echo
"== Waiting for new master to respond to API requests =="
until
curl
--insecure
--user
"
${
KUBE_USER
}
:
${
KUBE_PASSWORD
}
"
--max-time
5
\
local
curl_auth_arg
if
[[
-n
${
KUBE_BEARER_TOKEN
:-}
]]
;
then
curl_auth_arg
=(
-H
"Authorization: Bearer
${
KUBE_BEARER_TOKEN
}
"
)
elif
[[
-n
${
KUBE_PASSWORD
:-}
]]
;
then
curl_auth_arg
=(
--user
"
${
KUBE_USER
}
:
${
KUBE_PASSWORD
}
"
)
else
echo
"can't get auth credentials for the current master"
exit
1
fi
until
curl
--insecure
"
${
curl_auth_arg
[@]
}
"
--max-time
5
\
--fail
--output
/dev/null
--silent
"https://
${
KUBE_MASTER_IP
}
/healthz"
;
do
--fail
--output
/dev/null
--silent
"https://
${
KUBE_MASTER_IP
}
/healthz"
;
do
printf
"."
printf
"."
sleep
2
sleep
2
...
...
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