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
a4e62297
Commit
a4e62297
authored
Sep 16, 2016
by
Chao Xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix tests
parent
ec4fe281
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
29 additions
and
23 deletions
+29
-23
pod_expansion.go
...tset_generated/release_1_5/typed/core/v1/pod_expansion.go
+6
-0
gcp.go
plugin/pkg/client/auth/gcp/gcp.go
+1
-1
main.go
staging/src/k8s.io/client-go/examples/in-cluster/main.go
+3
-3
main.go
staging/src/k8s.io/client-go/examples/out-of-cluster/main.go
+3
-3
disruption.go
test/e2e/disruption.go
+11
-11
framework.go
test/e2e/framework/framework.go
+3
-3
generated_clientset.go
test/e2e/generated_clientset.go
+2
-2
No files found.
pkg/client/clientset_generated/release_1_5/typed/core/v1/pod_expansion.go
View file @
a4e62297
...
@@ -19,12 +19,14 @@ package v1
...
@@ -19,12 +19,14 @@ package v1
import
(
import
(
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/v1"
"k8s.io/kubernetes/pkg/api/v1"
policy
"k8s.io/kubernetes/pkg/apis/policy/v1alpha1"
"k8s.io/kubernetes/pkg/client/restclient"
"k8s.io/kubernetes/pkg/client/restclient"
)
)
// The PodExpansion interface allows manually adding extra methods to the PodInterface.
// The PodExpansion interface allows manually adding extra methods to the PodInterface.
type
PodExpansion
interface
{
type
PodExpansion
interface
{
Bind
(
binding
*
v1
.
Binding
)
error
Bind
(
binding
*
v1
.
Binding
)
error
Evict
(
eviction
*
policy
.
Eviction
)
error
GetLogs
(
name
string
,
opts
*
v1
.
PodLogOptions
)
*
restclient
.
Request
GetLogs
(
name
string
,
opts
*
v1
.
PodLogOptions
)
*
restclient
.
Request
}
}
...
@@ -33,6 +35,10 @@ func (c *pods) Bind(binding *v1.Binding) error {
...
@@ -33,6 +35,10 @@ func (c *pods) Bind(binding *v1.Binding) error {
return
c
.
client
.
Post
()
.
Namespace
(
c
.
ns
)
.
Resource
(
"pods"
)
.
Name
(
binding
.
Name
)
.
SubResource
(
"binding"
)
.
Body
(
binding
)
.
Do
()
.
Error
()
return
c
.
client
.
Post
()
.
Namespace
(
c
.
ns
)
.
Resource
(
"pods"
)
.
Name
(
binding
.
Name
)
.
SubResource
(
"binding"
)
.
Body
(
binding
)
.
Do
()
.
Error
()
}
}
func
(
c
*
pods
)
Evict
(
eviction
*
policy
.
Eviction
)
error
{
return
c
.
client
.
Post
()
.
Namespace
(
c
.
ns
)
.
Resource
(
"pods"
)
.
Name
(
eviction
.
Name
)
.
SubResource
(
"eviction"
)
.
Body
(
eviction
)
.
Do
()
.
Error
()
}
// Get constructs a request for getting the logs for a pod
// Get constructs a request for getting the logs for a pod
func
(
c
*
pods
)
GetLogs
(
name
string
,
opts
*
v1
.
PodLogOptions
)
*
restclient
.
Request
{
func
(
c
*
pods
)
GetLogs
(
name
string
,
opts
*
v1
.
PodLogOptions
)
*
restclient
.
Request
{
return
c
.
client
.
Get
()
.
Namespace
(
c
.
ns
)
.
Name
(
name
)
.
Resource
(
"pods"
)
.
SubResource
(
"log"
)
.
VersionedParams
(
opts
,
api
.
ParameterCodec
)
return
c
.
client
.
Get
()
.
Namespace
(
c
.
ns
)
.
Name
(
name
)
.
Resource
(
"pods"
)
.
SubResource
(
"log"
)
.
VersionedParams
(
opts
,
api
.
ParameterCodec
)
...
...
plugin/pkg/client/auth/gcp/gcp.go
View file @
a4e62297
...
@@ -25,7 +25,7 @@ import (
...
@@ -25,7 +25,7 @@ import (
"golang.org/x/oauth2"
"golang.org/x/oauth2"
"golang.org/x/oauth2/google"
"golang.org/x/oauth2/google"
clientreporestclient
"k8s.io/client-go/1.
4
/rest"
clientreporestclient
"k8s.io/client-go/1.
5
/rest"
"k8s.io/kubernetes/pkg/client/restclient"
"k8s.io/kubernetes/pkg/client/restclient"
)
)
...
...
staging/src/k8s.io/client-go/examples/in-cluster/main.go
View file @
a4e62297
...
@@ -20,9 +20,9 @@ import (
...
@@ -20,9 +20,9 @@ import (
"fmt"
"fmt"
"time"
"time"
"k8s.io/client-go/1.
4
/kubernetes"
"k8s.io/client-go/1.
5
/kubernetes"
"k8s.io/client-go/1.
4
/pkg/api"
"k8s.io/client-go/1.
5
/pkg/api"
"k8s.io/client-go/1.
4
/rest"
"k8s.io/client-go/1.
5
/rest"
)
)
func
main
()
{
func
main
()
{
...
...
staging/src/k8s.io/client-go/examples/out-of-cluster/main.go
View file @
a4e62297
...
@@ -21,9 +21,9 @@ import (
...
@@ -21,9 +21,9 @@ import (
"fmt"
"fmt"
"time"
"time"
"k8s.io/client-go/1.
4
/kubernetes"
"k8s.io/client-go/1.
5
/kubernetes"
"k8s.io/client-go/1.
4
/pkg/api"
"k8s.io/client-go/1.
5
/pkg/api"
"k8s.io/client-go/1.
4
/tools/clientcmd"
"k8s.io/client-go/1.
5
/tools/clientcmd"
)
)
var
(
var
(
...
...
test/e2e/disruption.go
View file @
a4e62297
...
@@ -22,13 +22,13 @@ import (
...
@@ -22,13 +22,13 @@ import (
.
"github.com/onsi/ginkgo"
.
"github.com/onsi/ginkgo"
.
"github.com/onsi/gomega"
.
"github.com/onsi/gomega"
release_1_4
"k8s.io/client-go/1.4
/kubernetes"
"k8s.io/client-go/1.5
/kubernetes"
apiapi
"k8s.io/client-go/1.
4
/pkg/api"
apiapi
"k8s.io/client-go/1.
5
/pkg/api"
"k8s.io/client-go/1.
4
/pkg/api/unversioned"
"k8s.io/client-go/1.
5
/pkg/api/unversioned"
api
"k8s.io/client-go/1.
4
/pkg/api/v1"
api
"k8s.io/client-go/1.
5
/pkg/api/v1"
extensions
"k8s.io/client-go/1.
4
/pkg/apis/extensions/v1beta1"
extensions
"k8s.io/client-go/1.
5
/pkg/apis/extensions/v1beta1"
policy
"k8s.io/client-go/1.
4
/pkg/apis/policy/v1alpha1"
policy
"k8s.io/client-go/1.
5
/pkg/apis/policy/v1alpha1"
"k8s.io/client-go/1.
4
/pkg/util/intstr"
"k8s.io/client-go/1.
5
/pkg/util/intstr"
"k8s.io/kubernetes/pkg/util/wait"
"k8s.io/kubernetes/pkg/util/wait"
"k8s.io/kubernetes/test/e2e/framework"
"k8s.io/kubernetes/test/e2e/framework"
)
)
...
@@ -44,7 +44,7 @@ const schedulingTimeout = 5 * time.Minute
...
@@ -44,7 +44,7 @@ const schedulingTimeout = 5 * time.Minute
var
_
=
framework
.
KubeDescribe
(
"DisruptionController"
,
func
()
{
var
_
=
framework
.
KubeDescribe
(
"DisruptionController"
,
func
()
{
f
:=
framework
.
NewDefaultFramework
(
"disruption"
)
f
:=
framework
.
NewDefaultFramework
(
"disruption"
)
var
ns
string
var
ns
string
var
cs
*
release_1_4
.
Clientset
var
cs
*
kubernetes
.
Clientset
BeforeEach
(
func
()
{
BeforeEach
(
func
()
{
// skip on GKE since alpha features are disabled
// skip on GKE since alpha features are disabled
...
@@ -179,7 +179,7 @@ var _ = framework.KubeDescribe("DisruptionController", func() {
...
@@ -179,7 +179,7 @@ var _ = framework.KubeDescribe("DisruptionController", func() {
})
})
func
createPodDisruptionBudgetOrDie
(
cs
*
release_1_4
.
Clientset
,
ns
string
,
minAvailable
intstr
.
IntOrString
)
{
func
createPodDisruptionBudgetOrDie
(
cs
*
kubernetes
.
Clientset
,
ns
string
,
minAvailable
intstr
.
IntOrString
)
{
pdb
:=
policy
.
PodDisruptionBudget
{
pdb
:=
policy
.
PodDisruptionBudget
{
ObjectMeta
:
api
.
ObjectMeta
{
ObjectMeta
:
api
.
ObjectMeta
{
Name
:
"foo"
,
Name
:
"foo"
,
...
@@ -194,7 +194,7 @@ func createPodDisruptionBudgetOrDie(cs *release_1_4.Clientset, ns string, minAva
...
@@ -194,7 +194,7 @@ func createPodDisruptionBudgetOrDie(cs *release_1_4.Clientset, ns string, minAva
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
}
}
func
createPodsOrDie
(
cs
*
release_1_4
.
Clientset
,
ns
string
,
n
int
)
{
func
createPodsOrDie
(
cs
*
kubernetes
.
Clientset
,
ns
string
,
n
int
)
{
for
i
:=
0
;
i
<
n
;
i
++
{
for
i
:=
0
;
i
<
n
;
i
++
{
pod
:=
&
api
.
Pod
{
pod
:=
&
api
.
Pod
{
ObjectMeta
:
api
.
ObjectMeta
{
ObjectMeta
:
api
.
ObjectMeta
{
...
@@ -218,7 +218,7 @@ func createPodsOrDie(cs *release_1_4.Clientset, ns string, n int) {
...
@@ -218,7 +218,7 @@ func createPodsOrDie(cs *release_1_4.Clientset, ns string, n int) {
}
}
}
}
func
createReplicaSetOrDie
(
cs
*
release_1_4
.
Clientset
,
ns
string
,
size
int32
,
exclusive
bool
)
{
func
createReplicaSetOrDie
(
cs
*
kubernetes
.
Clientset
,
ns
string
,
size
int32
,
exclusive
bool
)
{
container
:=
api
.
Container
{
container
:=
api
.
Container
{
Name
:
"busybox"
,
Name
:
"busybox"
,
Image
:
"gcr.io/google_containers/echoserver:1.4"
,
Image
:
"gcr.io/google_containers/echoserver:1.4"
,
...
...
test/e2e/framework/framework.go
View file @
a4e62297
...
@@ -26,9 +26,9 @@ import (
...
@@ -26,9 +26,9 @@ import (
"sync"
"sync"
"time"
"time"
staging
"k8s.io/client-go/1.
4
/kubernetes"
staging
"k8s.io/client-go/1.
5
/kubernetes"
"k8s.io/client-go/1.
4
/pkg/util/sets"
"k8s.io/client-go/1.
5
/pkg/util/sets"
clientreporestclient
"k8s.io/client-go/1.
4
/rest"
clientreporestclient
"k8s.io/client-go/1.
5
/rest"
"k8s.io/kubernetes/federation/client/clientset_generated/federation_release_1_4"
"k8s.io/kubernetes/federation/client/clientset_generated/federation_release_1_4"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api"
apierrs
"k8s.io/kubernetes/pkg/api/errors"
apierrs
"k8s.io/kubernetes/pkg/api/errors"
...
...
test/e2e/generated_clientset.go
View file @
a4e62297
...
@@ -20,8 +20,8 @@ import (
...
@@ -20,8 +20,8 @@ import (
"strconv"
"strconv"
"time"
"time"
clientapi
"k8s.io/client-go/1.
4
/pkg/api"
clientapi
"k8s.io/client-go/1.
5
/pkg/api"
clientv1
"k8s.io/client-go/1.
4
/pkg/api/v1"
clientv1
"k8s.io/client-go/1.
5
/pkg/api/v1"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/v1"
"k8s.io/kubernetes/pkg/api/v1"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/labels"
...
...
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