New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
e2e: move funs of framework/statefulset to e2e/apps & e2e/upgrades #86169
e2e: move funs of framework/statefulset to e2e/apps & e2e/upgrades #86169
Conversation
/test pull-kubernetes-e2e-gce |
test/e2e/apps/statefulset.go
Outdated
@@ -52,8 +53,27 @@ const ( | |||
|
|||
// Timeout for reads from databases running on stateful pods. | |||
readTimeout = 60 * time.Second | |||
|
|||
// StatefulSetPoll is a poll interval for StatefulSet tests | |||
StatefulSetPoll = 10 * time.Second |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @clarklee92
Small nits. Others lgtm.
Do these variables have to be exported?
If it is not referenced by other packages, we can set it to private.
test/e2e/apps/statefulset.go
Outdated
// StatefulSetPoll is a poll interval for StatefulSet tests | ||
StatefulSetPoll = 10 * time.Second | ||
// StatefulSetTimeout is a timeout interval for StatefulSet operations | ||
StatefulSetTimeout = 10 * time.Minute |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
test/e2e/apps/statefulset.go
Outdated
// StatefulSetTimeout is a timeout interval for StatefulSet operations | ||
StatefulSetTimeout = 10 * time.Minute | ||
// StatefulPodTimeout is a timeout for stateful pods to change state | ||
StatefulPodTimeout = 5 * time.Minute |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
test/e2e/apps/wait.go
Outdated
// a RollingUpdateStatefulSetStrategyType with a non-nil RollingUpdate and Partition. All Pods with ordinals less | ||
// than or equal to the Partition are expected to be at set's current revision. All other Pods are expected to be | ||
// at its update revision. | ||
func WaitForPartitionedRollingUpdate(c clientset.Interface, set *appsv1.StatefulSet) (*appsv1.StatefulSet, *v1.PodList) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these funs have to be exported?
If it is not referenced by other packages, we can set it to private.
test/e2e/apps/wait.go
Outdated
|
||
// WaitForStatus waits for the StatefulSetStatus's ObservedGeneration to be greater than or equal to set's Generation. | ||
// The returned StatefulSet contains such a StatefulSetStatus | ||
func WaitForStatus(c clientset.Interface, set *appsv1.StatefulSet) *appsv1.StatefulSet { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
test/e2e/apps/wait.go
Outdated
} | ||
|
||
// WaitForPodNotReady waits for the Pod named podName in set to exist and to not have a Ready condition. | ||
func WaitForPodNotReady(c clientset.Interface, set *appsv1.StatefulSet, podName string) (*appsv1.StatefulSet, *v1.PodList) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
test/e2e/apps/wait.go
Outdated
|
||
// WaitForRollingUpdate waits for all Pods in set to exist and have the correct revision and for the RollingUpdate to | ||
// complete. set must have a RollingUpdateStatefulSetStrategyType. | ||
func WaitForRollingUpdate(c clientset.Interface, set *appsv1.StatefulSet) (*appsv1.StatefulSet, *v1.PodList) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
test/e2e/apps/wait.go
Outdated
} | ||
|
||
// WaitForRunningAndNotReady waits for numStatefulPods in ss to be Running and not Ready. | ||
func WaitForRunningAndNotReady(c clientset.Interface, numStatefulPods int32, ss *appsv1.StatefulSet) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated, but I thought it might be used externally in the future.
f04f416
to
5296372
Compare
/test pull-kubernetes-e2e-gce-100-performance |
/lgtm |
@@ -18,6 +18,7 @@ package upgrades | |||
|
|||
import ( | |||
"github.com/onsi/ginkgo" | |||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be moved to line 24 as the same import group.
import ( | ||
appsv1 "k8s.io/api/apps/v1" | ||
v1 "k8s.io/api/core/v1" | ||
clientset "k8s.io/client-go/kubernetes" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: need a blank line between imports of other repos and imports of k/k repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I am going to turn down go importer
in my IDE 🤣.
Thank you for your careful review.
Signed-off-by: clarklee92 <clarklee1992@hotmail.com>
5296372
to
623c4f9
Compare
/test pull-kubernetes-node-e2e-containerd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating,
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: clarklee92, oomichi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/kind cleanup |
Signed-off-by: clarklee92 clarklee1992@hotmail.com
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
e2e: move funs of framework/statefulset to e2e/apps & e2e/upgrades
Which issue(s) this PR fixes:
Ref #86052
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: