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
c413aefe
Unverified
Commit
c413aefe
authored
May 17, 2018
by
Jason DeTiberus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kubeadm - fix upgrades with static pod etcd
parent
b3837d00
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
10 deletions
+4
-10
apply.go
cmd/kubeadm/app/cmd/upgrade/apply.go
+2
-4
etcd.go
cmd/kubeadm/app/util/etcd/etcd.go
+2
-6
No files found.
cmd/kubeadm/app/cmd/upgrade/apply.go
View file @
c413aefe
...
...
@@ -37,7 +37,6 @@ import (
"k8s.io/kubernetes/cmd/kubeadm/app/util/apiclient"
configutil
"k8s.io/kubernetes/cmd/kubeadm/app/util/config"
dryrunutil
"k8s.io/kubernetes/cmd/kubeadm/app/util/dryrun"
etcdutil
"k8s.io/kubernetes/cmd/kubeadm/app/util/etcd"
"k8s.io/kubernetes/pkg/util/version"
)
...
...
@@ -277,9 +276,8 @@ func PerformStaticPodUpgrade(client clientset.Interface, waiter apiclient.Waiter
return
err
}
// These are uninitialized because passing in the clients allow for mocking the client during testing
var
oldEtcdClient
,
newEtdClient
etcdutil
.
Client
return
upgrade
.
StaticPodControlPlane
(
waiter
,
pathManager
,
internalcfg
,
etcdUpgrade
,
oldEtcdClient
,
newEtdClient
)
// The arguments oldEtcdClient and newEtdClient, are uninitialized because passing in the clients allow for mocking the client during testing
return
upgrade
.
StaticPodControlPlane
(
waiter
,
pathManager
,
internalcfg
,
etcdUpgrade
,
nil
,
nil
)
}
// DryRunStaticPodUpgrade fakes an upgrade of the control plane
...
...
cmd/kubeadm/app/util/etcd/etcd.go
View file @
c413aefe
...
...
@@ -133,14 +133,10 @@ func (c Client) GetVersion() (string, error) {
return
""
,
err
}
for
_
,
v
:=
range
versions
{
if
clusterVersion
==
""
{
// This is the first version we've seen
clusterVersion
=
v
}
else
if
v
!=
clusterVersion
{
if
clusterVersion
!=
""
&&
clusterVersion
!=
v
{
return
""
,
fmt
.
Errorf
(
"etcd cluster contains endpoints with mismatched versions: %v"
,
versions
)
}
else
{
clusterVersion
=
v
}
clusterVersion
=
v
}
if
clusterVersion
==
""
{
return
""
,
fmt
.
Errorf
(
"could not determine cluster etcd 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