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
b2783603
Unverified
Commit
b2783603
authored
Mar 19, 2018
by
Anthony Yeh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ReplicaSet: Use apps/v1 RS in e2e test.
parent
bb407944
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
89 additions
and
29 deletions
+89
-29
deployment.go
test/e2e/apps/deployment.go
+3
-3
replica_set.go
test/e2e/apps/replica_set.go
+40
-9
rs_util.go
test/e2e/framework/rs_util.go
+5
-4
replicasets.go
test/e2e/upgrades/apps/replicasets.go
+4
-4
util.go
test/integration/deployment/util.go
+5
-5
replicaset_test.go
test/integration/replicaset/replicaset_test.go
+1
-1
replicaset.go
test/utils/replicaset.go
+31
-3
No files found.
test/e2e/apps/deployment.go
View file @
b2783603
...
...
@@ -242,7 +242,7 @@ func testRollingUpdateDeployment(f *framework.Framework) {
rsRevision
:=
"3546343826724305832"
annotations
:=
make
(
map
[
string
]
string
)
annotations
[
deploymentutil
.
RevisionAnnotation
]
=
rsRevision
rs
:=
newRS
(
rsName
,
replicas
,
rsPodLabels
,
NginxImageName
,
NginxImage
)
rs
:=
new
Extensions
RS
(
rsName
,
replicas
,
rsPodLabels
,
NginxImageName
,
NginxImage
)
rs
.
Annotations
=
annotations
framework
.
Logf
(
"Creating replica set %q (going to be adopted)"
,
rs
.
Name
)
_
,
err
:=
c
.
ExtensionsV1beta1
()
.
ReplicaSets
(
ns
)
.
Create
(
rs
)
...
...
@@ -324,7 +324,7 @@ func testDeploymentCleanUpPolicy(f *framework.Framework) {
rsName
:=
"test-cleanup-controller"
replicas
:=
int32
(
1
)
revisionHistoryLimit
:=
utilpointer
.
Int32Ptr
(
0
)
_
,
err
:=
c
.
ExtensionsV1beta1
()
.
ReplicaSets
(
ns
)
.
Create
(
newRS
(
rsName
,
replicas
,
rsPodLabels
,
NginxImageName
,
NginxImage
))
_
,
err
:=
c
.
ExtensionsV1beta1
()
.
ReplicaSets
(
ns
)
.
Create
(
new
Extensions
RS
(
rsName
,
replicas
,
rsPodLabels
,
NginxImageName
,
NginxImage
))
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
// Verify that the required pods have come up.
...
...
@@ -395,7 +395,7 @@ func testRolloverDeployment(f *framework.Framework) {
rsName
:=
"test-rollover-controller"
rsReplicas
:=
int32
(
1
)
_
,
err
:=
c
.
ExtensionsV1beta1
()
.
ReplicaSets
(
ns
)
.
Create
(
newRS
(
rsName
,
rsReplicas
,
rsPodLabels
,
NginxImageName
,
NginxImage
))
_
,
err
:=
c
.
ExtensionsV1beta1
()
.
ReplicaSets
(
ns
)
.
Create
(
new
Extensions
RS
(
rsName
,
rsReplicas
,
rsPodLabels
,
NginxImageName
,
NginxImage
))
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
// Verify that the required pods have come up.
err
=
framework
.
VerifyPodsRunning
(
c
,
ns
,
podName
,
false
,
rsReplicas
)
...
...
test/e2e/apps/replica_set.go
View file @
b2783603
...
...
@@ -20,6 +20,7 @@ import (
"fmt"
"time"
apps
"k8s.io/api/apps/v1"
"k8s.io/api/core/v1"
extensions
"k8s.io/api/extensions/v1beta1"
"k8s.io/apimachinery/pkg/api/errors"
...
...
@@ -36,7 +37,37 @@ import (
imageutils
"k8s.io/kubernetes/test/utils/image"
)
func
newRS
(
rsName
string
,
replicas
int32
,
rsPodLabels
map
[
string
]
string
,
imageName
string
,
image
string
)
*
extensions
.
ReplicaSet
{
func
newRS
(
rsName
string
,
replicas
int32
,
rsPodLabels
map
[
string
]
string
,
imageName
string
,
image
string
)
*
apps
.
ReplicaSet
{
zero
:=
int64
(
0
)
return
&
apps
.
ReplicaSet
{
ObjectMeta
:
metav1
.
ObjectMeta
{
Name
:
rsName
,
},
Spec
:
apps
.
ReplicaSetSpec
{
Selector
:
&
metav1
.
LabelSelector
{
MatchLabels
:
rsPodLabels
,
},
Replicas
:
&
replicas
,
Template
:
v1
.
PodTemplateSpec
{
ObjectMeta
:
metav1
.
ObjectMeta
{
Labels
:
rsPodLabels
,
},
Spec
:
v1
.
PodSpec
{
TerminationGracePeriodSeconds
:
&
zero
,
Containers
:
[]
v1
.
Container
{
{
Name
:
imageName
,
Image
:
image
,
},
},
},
},
},
}
}
// TODO(#55714): Remove this when Deployment tests use apps/v1 ReplicaSet.
func
newExtensionsRS
(
rsName
string
,
replicas
int32
,
rsPodLabels
map
[
string
]
string
,
imageName
string
,
image
string
)
*
extensions
.
ReplicaSet
{
zero
:=
int64
(
0
)
return
&
extensions
.
ReplicaSet
{
ObjectMeta
:
metav1
.
ObjectMeta
{
...
...
@@ -111,7 +142,7 @@ func testReplicaSetServeImageOrFail(f *framework.Framework, test string, image s
framework
.
Logf
(
"Creating ReplicaSet %s"
,
name
)
newRS
:=
newRS
(
name
,
replicas
,
map
[
string
]
string
{
"name"
:
name
},
name
,
image
)
newRS
.
Spec
.
Template
.
Spec
.
Containers
[
0
]
.
Ports
=
[]
v1
.
ContainerPort
{{
ContainerPort
:
9376
}}
_
,
err
:=
f
.
ClientSet
.
ExtensionsV1beta
1
()
.
ReplicaSets
(
f
.
Namespace
.
Name
)
.
Create
(
newRS
)
_
,
err
:=
f
.
ClientSet
.
AppsV
1
()
.
ReplicaSets
(
f
.
Namespace
.
Name
)
.
Create
(
newRS
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
// Check that pods for the new RS were created.
...
...
@@ -187,14 +218,14 @@ func testReplicaSetConditionCheck(f *framework.Framework) {
By
(
fmt
.
Sprintf
(
"Creating replica set %q that asks for more than the allowed pod quota"
,
name
))
rs
:=
newRS
(
name
,
3
,
map
[
string
]
string
{
"name"
:
name
},
NginxImageName
,
NginxImage
)
rs
,
err
=
c
.
ExtensionsV1beta
1
()
.
ReplicaSets
(
namespace
)
.
Create
(
rs
)
rs
,
err
=
c
.
AppsV
1
()
.
ReplicaSets
(
namespace
)
.
Create
(
rs
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
By
(
fmt
.
Sprintf
(
"Checking replica set %q has the desired failure condition set"
,
name
))
generation
:=
rs
.
Generation
conditions
:=
rs
.
Status
.
Conditions
err
=
wait
.
PollImmediate
(
1
*
time
.
Second
,
1
*
time
.
Minute
,
func
()
(
bool
,
error
)
{
rs
,
err
=
c
.
ExtensionsV1beta
1
()
.
ReplicaSets
(
namespace
)
.
Get
(
name
,
metav1
.
GetOptions
{})
rs
,
err
=
c
.
AppsV
1
()
.
ReplicaSets
(
namespace
)
.
Get
(
name
,
metav1
.
GetOptions
{})
if
err
!=
nil
{
return
false
,
err
}
...
...
@@ -204,7 +235,7 @@ func testReplicaSetConditionCheck(f *framework.Framework) {
}
conditions
=
rs
.
Status
.
Conditions
cond
:=
replicaset
.
GetCondition
(
rs
.
Status
,
extension
s
.
ReplicaSetReplicaFailure
)
cond
:=
replicaset
.
GetCondition
(
rs
.
Status
,
app
s
.
ReplicaSetReplicaFailure
)
return
cond
!=
nil
,
nil
})
...
...
@@ -214,7 +245,7 @@ func testReplicaSetConditionCheck(f *framework.Framework) {
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
By
(
fmt
.
Sprintf
(
"Scaling down replica set %q to satisfy pod quota"
,
name
))
rs
,
err
=
framework
.
UpdateReplicaSetWithRetries
(
c
,
namespace
,
name
,
func
(
update
*
extension
s
.
ReplicaSet
)
{
rs
,
err
=
framework
.
UpdateReplicaSetWithRetries
(
c
,
namespace
,
name
,
func
(
update
*
app
s
.
ReplicaSet
)
{
x
:=
int32
(
2
)
update
.
Spec
.
Replicas
=
&
x
})
...
...
@@ -224,7 +255,7 @@ func testReplicaSetConditionCheck(f *framework.Framework) {
generation
=
rs
.
Generation
conditions
=
rs
.
Status
.
Conditions
err
=
wait
.
PollImmediate
(
1
*
time
.
Second
,
1
*
time
.
Minute
,
func
()
(
bool
,
error
)
{
rs
,
err
=
c
.
ExtensionsV1beta
1
()
.
ReplicaSets
(
namespace
)
.
Get
(
name
,
metav1
.
GetOptions
{})
rs
,
err
=
c
.
AppsV
1
()
.
ReplicaSets
(
namespace
)
.
Get
(
name
,
metav1
.
GetOptions
{})
if
err
!=
nil
{
return
false
,
err
}
...
...
@@ -234,7 +265,7 @@ func testReplicaSetConditionCheck(f *framework.Framework) {
}
conditions
=
rs
.
Status
.
Conditions
cond
:=
replicaset
.
GetCondition
(
rs
.
Status
,
extension
s
.
ReplicaSetReplicaFailure
)
cond
:=
replicaset
.
GetCondition
(
rs
.
Status
,
app
s
.
ReplicaSetReplicaFailure
)
return
cond
==
nil
,
nil
})
if
err
==
wait
.
ErrWaitTimeout
{
...
...
@@ -267,7 +298,7 @@ func testRSAdoptMatchingAndReleaseNotMatching(f *framework.Framework) {
replicas
:=
int32
(
1
)
rsSt
:=
newRS
(
name
,
replicas
,
map
[
string
]
string
{
"name"
:
name
},
name
,
NginxImageName
)
rsSt
.
Spec
.
Selector
=
&
metav1
.
LabelSelector
{
MatchLabels
:
map
[
string
]
string
{
"name"
:
name
}}
rs
,
err
:=
f
.
ClientSet
.
ExtensionsV1beta
1
()
.
ReplicaSets
(
f
.
Namespace
.
Name
)
.
Create
(
rsSt
)
rs
,
err
:=
f
.
ClientSet
.
AppsV
1
()
.
ReplicaSets
(
f
.
Namespace
.
Name
)
.
Create
(
rsSt
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
By
(
"Then the orphan pod is adopted"
)
...
...
test/e2e/framework/rs_util.go
View file @
b2783603
...
...
@@ -21,6 +21,7 @@ import (
.
"github.com/onsi/ginkgo"
apps
"k8s.io/api/apps/v1"
"k8s.io/api/core/v1"
extensions
"k8s.io/api/extensions/v1beta1"
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
...
...
@@ -33,7 +34,7 @@ import (
type
updateRsFunc
func
(
d
*
extensions
.
ReplicaSet
)
func
UpdateReplicaSetWithRetries
(
c
clientset
.
Interface
,
namespace
,
name
string
,
applyUpdate
testutils
.
UpdateReplicaSetFunc
)
(
*
extension
s
.
ReplicaSet
,
error
)
{
func
UpdateReplicaSetWithRetries
(
c
clientset
.
Interface
,
namespace
,
name
string
,
applyUpdate
testutils
.
UpdateReplicaSetFunc
)
(
*
app
s
.
ReplicaSet
,
error
)
{
return
testutils
.
UpdateReplicaSetWithRetries
(
c
,
namespace
,
name
,
applyUpdate
,
Logf
,
Poll
,
pollShortTimeout
)
}
...
...
@@ -126,8 +127,8 @@ func RunReplicaSet(config testutils.ReplicaSetConfig) error {
return
testutils
.
RunReplicaSet
(
config
)
}
func
NewReplicaSet
(
name
,
namespace
string
,
replicas
int32
,
podLabels
map
[
string
]
string
,
imageName
,
image
string
)
*
extension
s
.
ReplicaSet
{
return
&
extension
s
.
ReplicaSet
{
func
NewReplicaSet
(
name
,
namespace
string
,
replicas
int32
,
podLabels
map
[
string
]
string
,
imageName
,
image
string
)
*
app
s
.
ReplicaSet
{
return
&
app
s
.
ReplicaSet
{
TypeMeta
:
metav1
.
TypeMeta
{
Kind
:
"ReplicaSet"
,
APIVersion
:
"extensions/v1beta1"
,
...
...
@@ -136,7 +137,7 @@ func NewReplicaSet(name, namespace string, replicas int32, podLabels map[string]
Namespace
:
namespace
,
Name
:
name
,
},
Spec
:
extension
s
.
ReplicaSetSpec
{
Spec
:
app
s
.
ReplicaSetSpec
{
Selector
:
&
metav1
.
LabelSelector
{
MatchLabels
:
podLabels
,
},
...
...
test/e2e/upgrades/apps/replicasets.go
View file @
b2783603
...
...
@@ -20,7 +20,7 @@ import (
"fmt"
"time"
extensions
"k8s.io/api/extensions/v1beta
1"
apps
"k8s.io/api/apps/v
1"
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/kubernetes/test/e2e/framework"
...
...
@@ -54,7 +54,7 @@ func (r *ReplicaSetUpgradeTest) Setup(f *framework.Framework) {
By
(
fmt
.
Sprintf
(
"Creating replicaset %s in namespace %s"
,
rsName
,
ns
))
replicaSet
:=
framework
.
NewReplicaSet
(
rsName
,
ns
,
1
,
map
[
string
]
string
{
"test"
:
"upgrade"
},
"nginx"
,
nginxImage
)
rs
,
err
:=
c
.
ExtensionsV1beta
1
()
.
ReplicaSets
(
ns
)
.
Create
(
replicaSet
)
rs
,
err
:=
c
.
AppsV
1
()
.
ReplicaSets
(
ns
)
.
Create
(
replicaSet
)
framework
.
ExpectNoError
(
err
)
By
(
fmt
.
Sprintf
(
"Waiting for replicaset %s to have all of its replicas ready"
,
rsName
))
...
...
@@ -67,7 +67,7 @@ func (r *ReplicaSetUpgradeTest) Setup(f *framework.Framework) {
func
(
r
*
ReplicaSetUpgradeTest
)
Test
(
f
*
framework
.
Framework
,
done
<-
chan
struct
{},
upgrade
upgrades
.
UpgradeType
)
{
c
:=
f
.
ClientSet
ns
:=
f
.
Namespace
.
Name
rsClient
:=
c
.
ExtensionsV1beta
1
()
.
ReplicaSets
(
ns
)
rsClient
:=
c
.
AppsV
1
()
.
ReplicaSets
(
ns
)
// Block until upgrade is done
By
(
fmt
.
Sprintf
(
"Waiting for upgrade to finish before checking replicaset %s"
,
rsName
))
...
...
@@ -86,7 +86,7 @@ func (r *ReplicaSetUpgradeTest) Test(f *framework.Framework, done <-chan struct{
// Verify the upgraded RS is active by scaling up the RS to scaleNum and ensuring all pods are Ready
By
(
fmt
.
Sprintf
(
"Scaling up replicaset %s to %d"
,
rsName
,
scaleNum
))
_
,
err
=
framework
.
UpdateReplicaSetWithRetries
(
c
,
ns
,
rsName
,
func
(
rs
*
extension
s
.
ReplicaSet
)
{
_
,
err
=
framework
.
UpdateReplicaSetWithRetries
(
c
,
ns
,
rsName
,
func
(
rs
*
app
s
.
ReplicaSet
)
{
*
rs
.
Spec
.
Replicas
=
scaleNum
})
framework
.
ExpectNoError
(
err
)
...
...
test/integration/deployment/util.go
View file @
b2783603
...
...
@@ -165,7 +165,7 @@ func dcSetup(t *testing.T) (*httptest.Server, framework.CloseFunc, *replicaset.R
t
.
Fatalf
(
"error creating Deployment controller: %v"
,
err
)
}
rm
:=
replicaset
.
NewReplicaSetController
(
informers
.
Extensions
()
.
V1beta
1
()
.
ReplicaSets
(),
informers
.
Apps
()
.
V
1
()
.
ReplicaSets
(),
informers
.
Core
()
.
V1
()
.
Pods
(),
clientset
.
NewForConfigOrDie
(
restclient
.
AddUserAgent
(
&
config
,
"replicaset-controller"
)),
replicaset
.
BurstReplicas
,
...
...
@@ -364,12 +364,12 @@ func (d *deploymentTester) expectNewReplicaSet() (*v1beta1.ReplicaSet, error) {
return
rs
,
nil
}
func
(
d
*
deploymentTester
)
updateReplicaSet
(
name
string
,
applyUpdate
testutil
.
UpdateReplicaSetFunc
)
(
*
v1beta1
.
ReplicaSet
,
error
)
{
return
testutil
.
UpdateReplicaSetWithRetries
(
d
.
c
,
d
.
deployment
.
Namespace
,
name
,
applyUpdate
,
d
.
t
.
Logf
,
pollInterval
,
pollTimeout
)
func
(
d
*
deploymentTester
)
updateReplicaSet
(
name
string
,
applyUpdate
testutil
.
Update
Extensions
ReplicaSetFunc
)
(
*
v1beta1
.
ReplicaSet
,
error
)
{
return
testutil
.
Update
Extensions
ReplicaSetWithRetries
(
d
.
c
,
d
.
deployment
.
Namespace
,
name
,
applyUpdate
,
d
.
t
.
Logf
,
pollInterval
,
pollTimeout
)
}
func
(
d
*
deploymentTester
)
updateReplicaSetStatus
(
name
string
,
applyStatusUpdate
testutil
.
UpdateReplicaSetFunc
)
(
*
v1beta1
.
ReplicaSet
,
error
)
{
return
testutil
.
UpdateReplicaSetStatusWithRetries
(
d
.
c
,
d
.
deployment
.
Namespace
,
name
,
applyStatusUpdate
,
d
.
t
.
Logf
,
pollInterval
,
pollTimeout
)
func
(
d
*
deploymentTester
)
updateReplicaSetStatus
(
name
string
,
applyStatusUpdate
testutil
.
Update
Extensions
ReplicaSetFunc
)
(
*
v1beta1
.
ReplicaSet
,
error
)
{
return
testutil
.
Update
Extensions
ReplicaSetStatusWithRetries
(
d
.
c
,
d
.
deployment
.
Namespace
,
name
,
applyStatusUpdate
,
d
.
t
.
Logf
,
pollInterval
,
pollTimeout
)
}
// waitForDeploymentRollbackCleared waits for deployment either started rolling back or doesn't need to rollback.
...
...
test/integration/replicaset/replicaset_test.go
View file @
b2783603
...
...
@@ -151,7 +151,7 @@ func rmSetup(t *testing.T) (*httptest.Server, framework.CloseFunc, *replicaset.R
informers
:=
informers
.
NewSharedInformerFactory
(
clientset
.
NewForConfigOrDie
(
restclient
.
AddUserAgent
(
&
config
,
"rs-informers"
)),
resyncPeriod
)
rm
:=
replicaset
.
NewReplicaSetController
(
informers
.
Extensions
()
.
V1beta
1
()
.
ReplicaSets
(),
informers
.
Apps
()
.
V
1
()
.
ReplicaSets
(),
informers
.
Core
()
.
V1
()
.
Pods
(),
clientset
.
NewForConfigOrDie
(
restclient
.
AddUserAgent
(
&
config
,
"replicaset-controller"
)),
replicaset
.
BurstReplicas
,
...
...
test/utils/replicaset.go
View file @
b2783603
...
...
@@ -21,15 +21,43 @@ import (
"testing"
"time"
apps
"k8s.io/api/apps/v1"
extensions
"k8s.io/api/extensions/v1beta1"
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/wait"
clientset
"k8s.io/client-go/kubernetes"
)
type
UpdateReplicaSetFunc
func
(
d
*
extension
s
.
ReplicaSet
)
type
UpdateReplicaSetFunc
func
(
d
*
app
s
.
ReplicaSet
)
func
UpdateReplicaSetWithRetries
(
c
clientset
.
Interface
,
namespace
,
name
string
,
applyUpdate
UpdateReplicaSetFunc
,
logf
LogfFn
,
pollInterval
,
pollTimeout
time
.
Duration
)
(
*
extensions
.
ReplicaSet
,
error
)
{
func
UpdateReplicaSetWithRetries
(
c
clientset
.
Interface
,
namespace
,
name
string
,
applyUpdate
UpdateReplicaSetFunc
,
logf
LogfFn
,
pollInterval
,
pollTimeout
time
.
Duration
)
(
*
apps
.
ReplicaSet
,
error
)
{
var
rs
*
apps
.
ReplicaSet
var
updateErr
error
pollErr
:=
wait
.
PollImmediate
(
pollInterval
,
pollTimeout
,
func
()
(
bool
,
error
)
{
var
err
error
if
rs
,
err
=
c
.
AppsV1
()
.
ReplicaSets
(
namespace
)
.
Get
(
name
,
metav1
.
GetOptions
{});
err
!=
nil
{
return
false
,
err
}
// Apply the update, then attempt to push it to the apiserver.
applyUpdate
(
rs
)
if
rs
,
err
=
c
.
AppsV1
()
.
ReplicaSets
(
namespace
)
.
Update
(
rs
);
err
==
nil
{
logf
(
"Updating replica set %q"
,
name
)
return
true
,
nil
}
updateErr
=
err
return
false
,
nil
})
if
pollErr
==
wait
.
ErrWaitTimeout
{
pollErr
=
fmt
.
Errorf
(
"couldn't apply the provided updated to replicaset %q: %v"
,
name
,
updateErr
)
}
return
rs
,
pollErr
}
// TODO(#55714): Remove this after Deployment tests use apps/v1 ReplicaSet.
type
UpdateExtensionsReplicaSetFunc
func
(
d
*
extensions
.
ReplicaSet
)
// TODO(#55714): Remove this after Deployment tests use apps/v1 ReplicaSet.
func
UpdateExtensionsReplicaSetWithRetries
(
c
clientset
.
Interface
,
namespace
,
name
string
,
applyUpdate
UpdateExtensionsReplicaSetFunc
,
logf
LogfFn
,
pollInterval
,
pollTimeout
time
.
Duration
)
(
*
extensions
.
ReplicaSet
,
error
)
{
var
rs
*
extensions
.
ReplicaSet
var
updateErr
error
pollErr
:=
wait
.
PollImmediate
(
pollInterval
,
pollTimeout
,
func
()
(
bool
,
error
)
{
...
...
@@ -67,7 +95,7 @@ func WaitRSStable(t *testing.T, clientSet clientset.Interface, rs *extensions.Re
return
nil
}
func
Update
ReplicaSetStatusWithRetries
(
c
clientset
.
Interface
,
namespace
,
name
string
,
applyUpdate
Update
ReplicaSetFunc
,
logf
LogfFn
,
pollInterval
,
pollTimeout
time
.
Duration
)
(
*
extensions
.
ReplicaSet
,
error
)
{
func
Update
ExtensionsReplicaSetStatusWithRetries
(
c
clientset
.
Interface
,
namespace
,
name
string
,
applyUpdate
UpdateExtensions
ReplicaSetFunc
,
logf
LogfFn
,
pollInterval
,
pollTimeout
time
.
Duration
)
(
*
extensions
.
ReplicaSet
,
error
)
{
var
rs
*
extensions
.
ReplicaSet
var
updateErr
error
pollErr
:=
wait
.
PollImmediate
(
pollInterval
,
pollTimeout
,
func
()
(
bool
,
error
)
{
...
...
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