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
5db02861
Commit
5db02861
authored
Aug 06, 2018
by
WanLinghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
snip more legacy scheme uses we don't need
ref:
https://github.com/kubernetes/kubernetes/pull/66926
parent
7dcbdbb1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
describe_test.go
pkg/kubectl/cmd/describe_test.go
+4
-5
rollingupdate.go
pkg/kubectl/cmd/rollingupdate.go
+1
-2
No files found.
pkg/kubectl/cmd/describe_test.go
View file @
5db02861
...
...
@@ -24,7 +24,6 @@ import (
"k8s.io/apimachinery/pkg/api/meta"
"k8s.io/client-go/rest/fake"
"k8s.io/kubernetes/pkg/api/legacyscheme"
cmdtesting
"k8s.io/kubernetes/pkg/kubectl/cmd/testing"
cmdutil
"k8s.io/kubernetes/pkg/kubectl/cmd/util"
"k8s.io/kubernetes/pkg/kubectl/genericclioptions"
...
...
@@ -108,7 +107,7 @@ func TestDescribeObject(t *testing.T) {
_
,
_
,
rc
:=
testData
()
tf
:=
cmdtesting
.
NewTestFactory
()
.
WithNamespace
(
"test"
)
defer
tf
.
Cleanup
()
codec
:=
legacy
scheme
.
Codecs
.
LegacyCodec
(
scheme
.
Scheme
.
PrioritizedVersionsAllGroups
()
...
)
codec
:=
scheme
.
Codecs
.
LegacyCodec
(
scheme
.
Scheme
.
PrioritizedVersionsAllGroups
()
...
)
tf
.
UnstructuredClient
=
&
fake
.
RESTClient
{
NegotiatedSerializer
:
unstructuredSerializer
,
...
...
@@ -149,7 +148,7 @@ func TestDescribeListObjects(t *testing.T) {
pods
,
_
,
_
:=
testData
()
tf
:=
cmdtesting
.
NewTestFactory
()
.
WithNamespace
(
"test"
)
defer
tf
.
Cleanup
()
codec
:=
legacy
scheme
.
Codecs
.
LegacyCodec
(
scheme
.
Scheme
.
PrioritizedVersionsAllGroups
()
...
)
codec
:=
scheme
.
Codecs
.
LegacyCodec
(
scheme
.
Scheme
.
PrioritizedVersionsAllGroups
()
...
)
tf
.
UnstructuredClient
=
&
fake
.
RESTClient
{
NegotiatedSerializer
:
unstructuredSerializer
,
...
...
@@ -176,7 +175,7 @@ func TestDescribeObjectShowEvents(t *testing.T) {
pods
,
_
,
_
:=
testData
()
tf
:=
cmdtesting
.
NewTestFactory
()
.
WithNamespace
(
"test"
)
defer
tf
.
Cleanup
()
codec
:=
legacy
scheme
.
Codecs
.
LegacyCodec
(
scheme
.
Scheme
.
PrioritizedVersionsAllGroups
()
...
)
codec
:=
scheme
.
Codecs
.
LegacyCodec
(
scheme
.
Scheme
.
PrioritizedVersionsAllGroups
()
...
)
tf
.
UnstructuredClient
=
&
fake
.
RESTClient
{
NegotiatedSerializer
:
unstructuredSerializer
,
...
...
@@ -202,7 +201,7 @@ func TestDescribeObjectSkipEvents(t *testing.T) {
pods
,
_
,
_
:=
testData
()
tf
:=
cmdtesting
.
NewTestFactory
()
.
WithNamespace
(
"test"
)
defer
tf
.
Cleanup
()
codec
:=
legacy
scheme
.
Codecs
.
LegacyCodec
(
scheme
.
Scheme
.
PrioritizedVersionsAllGroups
()
...
)
codec
:=
scheme
.
Codecs
.
LegacyCodec
(
scheme
.
Scheme
.
PrioritizedVersionsAllGroups
()
...
)
tf
.
UnstructuredClient
=
&
fake
.
RESTClient
{
NegotiatedSerializer
:
unstructuredSerializer
,
...
...
pkg/kubectl/cmd/rollingupdate.go
View file @
5db02861
...
...
@@ -32,7 +32,6 @@ import (
"k8s.io/apimachinery/pkg/util/intstr"
"k8s.io/client-go/kubernetes"
scaleclient
"k8s.io/client-go/scale"
"k8s.io/kubernetes/pkg/api/legacyscheme"
"k8s.io/kubernetes/pkg/kubectl"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
cmdutil
"k8s.io/kubernetes/pkg/kubectl/cmd/util"
...
...
@@ -311,7 +310,7 @@ func (o *RollingUpdateOptions) Run() error {
// than the old rc. This selector is the hash of the rc, with a suffix to provide uniqueness for
// same-image updates.
if
len
(
o
.
Image
)
!=
0
{
codec
:=
legacy
scheme
.
Codecs
.
LegacyCodec
(
v1
.
SchemeGroupVersion
)
codec
:=
scheme
.
Codecs
.
LegacyCodec
(
v1
.
SchemeGroupVersion
)
newName
:=
o
.
FindNewName
(
oldRc
)
if
newRc
,
err
=
kubectl
.
LoadExistingNextReplicationController
(
coreClient
,
o
.
Namespace
,
newName
);
err
!=
nil
{
return
err
...
...
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