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
ff0546da
Commit
ff0546da
authored
Jun 20, 2015
by
CJ Cullen
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10133 from mbforbes/gkeLivingUpgrade
GKE upgrade tests
parents
483ba4e9
434f9687
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
8 additions
and
2 deletions
+8
-2
upgrade.sh
cluster/gce/upgrade.sh
+2
-1
config-common.sh
cluster/gke/config-common.sh
+0
-1
ginkgo-e2e.sh
hack/ginkgo-e2e.sh
+1
-0
cluster_upgrade.go
test/e2e/cluster_upgrade.go
+0
-0
e2e_test.go
test/e2e/e2e_test.go
+1
-0
restart.go
test/e2e/restart.go
+3
-0
util.go
test/e2e/util.go
+1
-0
No files found.
cluster/gce/upgrade.sh
View file @
ff0546da
...
...
@@ -44,6 +44,7 @@ function usage() {
echo
"(... Fetching current release versions ...)"
echo
""
# NOTE: IF YOU CHANGE THE FOLLOWING LIST, ALSO UPDATE test/e2e/cluster_upgrade.go
local
latest_release
local
latest_stable
local
latest_ci
...
...
@@ -53,7 +54,7 @@ function usage() {
latest_ci
=
$(
gsutil
cat
gs://kubernetes-release/ci/latest.txt
)
echo
"To upgrade to:"
echo
" latest stable:
${
0
}
${
latest_stable
}
"
echo
" latest stable:
${
0
}
${
latest_stable
}
"
echo
" latest release:
${
0
}
${
latest_release
}
"
echo
" latest ci:
${
0
}
${
latest_ci
}
"
}
...
...
cluster/gke/config-common.sh
View file @
ff0546da
...
...
@@ -18,7 +18,6 @@
# Specifically, the following environment variables are assumed:
# - CLUSTER_NAME (the name of the cluster)
MASTER_NAME
=
"k8s-
${
CLUSTER_NAME
}
-master"
ZONE
=
"
${
ZONE
:-
us
-central1-f
}
"
NUM_MINIONS
=
"
${
NUM_MINIONS
:-
2
}
"
CLUSTER_API_VERSION
=
"
${
CLUSTER_API_VERSION
:-}
"
...
...
hack/ginkgo-e2e.sh
View file @
ff0546da
...
...
@@ -97,6 +97,7 @@ export PATH=$(dirname "${e2e_test}"):"${PATH}"
--provider
=
"
${
KUBERNETES_PROVIDER
}
"
\
--gce-project
=
"
${
PROJECT
:-}
"
\
--gce-zone
=
"
${
ZONE
:-}
"
\
--gke-cluster
=
"
${
CLUSTER_NAME
:-}
"
\
--kube-master
=
"
${
KUBE_MASTER
:-}
"
\
--cluster-tag
=
"
${
CLUSTER_ID
:-}
"
\
--repo-root
=
"
${
KUBE_VERSION_ROOT
}
"
\
...
...
test/e2e/cluster_upgrade.go
View file @
ff0546da
This diff is collapsed.
Click to expand it.
test/e2e/e2e_test.go
View file @
ff0546da
...
...
@@ -89,6 +89,7 @@ func init() {
flag
.
StringVar
(
&
cloudConfig
.
MasterName
,
"kube-master"
,
""
,
"Name of the kubernetes master. Only required if provider is gce or gke"
)
flag
.
StringVar
(
&
cloudConfig
.
ProjectID
,
"gce-project"
,
""
,
"The GCE project being used, if applicable"
)
flag
.
StringVar
(
&
cloudConfig
.
Zone
,
"gce-zone"
,
""
,
"GCE zone being used, if applicable"
)
flag
.
StringVar
(
&
cloudConfig
.
Cluster
,
"gke-cluster"
,
""
,
"GKE name of cluster being used, if applicable"
)
flag
.
StringVar
(
&
cloudConfig
.
NodeInstanceGroup
,
"node-instance-group"
,
""
,
"Name of the managed instance group for nodes. Valid only for gce"
)
flag
.
IntVar
(
&
cloudConfig
.
NumNodes
,
"num-nodes"
,
-
1
,
"Number of nodes in the cluster"
)
...
...
test/e2e/restart.go
View file @
ff0546da
...
...
@@ -251,6 +251,7 @@ func migTemplate() (string, error) {
var
errLast
error
var
templ
string
key
:=
"instanceTemplate"
// TODO(mbforbes): Refactor this to use cluster_upgrade.go:retryCmd(...)
if
wait
.
Poll
(
poll
,
singleCallTimeout
,
func
()
(
bool
,
error
)
{
// TODO(mbforbes): make this hit the compute API directly instead of
// shelling out to gcloud.
...
...
@@ -289,6 +290,7 @@ func migRollingUpdateStart(templ string, nt time.Duration) (string, error) {
var
errLast
error
var
id
string
prefix
,
suffix
:=
"Started ["
,
"]."
// TODO(mbforbes): Refactor this to use cluster_upgrade.go:retryCmd(...)
if
err
:=
wait
.
Poll
(
poll
,
singleCallTimeout
,
func
()
(
bool
,
error
)
{
// TODO(mbforbes): make this hit the compute API directly instead of
// shelling out to gcloud.
...
...
@@ -345,6 +347,7 @@ func migRollingUpdatePoll(id string, nt time.Duration) error {
start
,
timeout
:=
time
.
Now
(),
nt
*
time
.
Duration
(
testContext
.
CloudConfig
.
NumNodes
)
var
errLast
error
Logf
(
"Waiting up to %v for MIG rolling update to complete."
,
timeout
)
// TODO(mbforbes): Refactor this to use cluster_upgrade.go:retryCmd(...)
if
wait
.
Poll
(
restartPoll
,
timeout
,
func
()
(
bool
,
error
)
{
o
,
err
:=
exec
.
Command
(
"gcloud"
,
"preview"
,
"rolling-updates"
,
fmt
.
Sprintf
(
"--project=%s"
,
testContext
.
CloudConfig
.
ProjectID
),
...
...
test/e2e/util.go
View file @
ff0546da
...
...
@@ -87,6 +87,7 @@ const (
type
CloudConfig
struct
{
ProjectID
string
Zone
string
Cluster
string
MasterName
string
NodeInstanceGroup
string
NumNodes
int
...
...
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