Commit Graph

84 Commits

Author SHA1 Message Date
Sergiusz Urbaniak
373c08e0c7
test/e2e/framework: configure pod security admission level for e2e tests 2022-03-28 15:42:10 +02:00
Matthew Cary
53b3a6c1d9 controller change for statefulset auto-delete (tests)
Change-Id: I16b50e6853bba65fc89c793d2b9b335581c02407
2021-11-17 16:48:50 -08:00
Tim Hockin
11a25bfeb6
De-share the Handler struct in core API (#105979)
* De-share the Handler struct in core API

An upcoming PR adds a handler that only applies on one of these paths.
Having fields that don't work seems bad.

This never should have been shared.  Lifecycle hooks are like a "write"
while probes are more like a "read". HTTPGet and TCPSocket don't really
make sense as lifecycle hooks (but I can't take that back). When we add
gRPC, it is EXPLICITLY a health check (defined by gRPC) not an arbitrary
RPC - so a probe makes sense but a hook does not.

In the future I can also see adding lifecycle hooks that don't make
sense as probes.  E.g. 'sleep' is a common lifecycle request. The only
option is `exec`, which requires having a sleep binary in your image.

* Run update scripts
2021-10-29 13:15:11 -07:00
Kubernetes Prow Robot
f83b16d93d
Merge pull request #105052 from leiyiz/skip-storage-test
tag ginkgo tests affected by pdcsi migration for skipping
2021-10-11 13:09:02 -07:00
Léiyì Zhang
822cc33955 tag ginkgo tests affected by pdcsi migration for skipping and add storageclass check for statefulset and upgrade tests 2021-10-09 17:33:56 +00:00
atiratree
2cad64db80 add StatefulSet MinReadySeconds e2e test 2021-09-15 13:32:38 +02:00
ravisantoshgudimetla
d0937073dd sts: Promote minReadySeconds 2021-08-20 12:52:59 -04:00
Kubernetes Prow Robot
dab6f6a43d
Merge pull request #102344 from smarterclayton/keep_pod_worker
Prevent Kubelet from incorrectly interpreting "not yet started" pods as "ready to terminate pods" by unifying responsibility for pod lifecycle into pod worker
2021-07-08 16:48:53 -07:00
Clayton Coleman
3eadd1a9ea
Keep pod worker running until pod is truly complete
A number of race conditions exist when pods are terminated early in
their lifecycle because components in the kubelet need to know "no
running containers" or "containers can't be started from now on" but
were relying on outdated state.

Only the pod worker knows whether containers are being started for
a given pod, which is required to know when a pod is "terminated"
(no running containers, none coming). Move that responsibility and
podKiller function into the pod workers, and have everything that
was killing the pod go into the UpdatePod loop. Split syncPod into
three phases - setup, terminate containers, and cleanup pod - and
have transitions between those methods be visible to other
components. After this change, to kill a pod you tell the pod worker
to UpdatePod({UpdateType: SyncPodKill, Pod: pod}).

Several places in the kubelet were incorrect about whether they
were handling terminating (should stop running, might have
containers) or terminated (no running containers) pods. The pod worker
exposes methods that allow other loops to know when to set up or tear
down resources based on the state of the pod - these methods remove
the possibility of race conditions by ensuring a single component is
responsible for knowing each pod's allowed state and other components
simply delegate to checking whether they are in the window by UID.

Removing containers now no longer blocks final pod deletion in the
API server and are handled as background cleanup. Node shutdown
no longer marks pods as failed as they can be restarted in the
next step.

See https://docs.google.com/document/d/1Pic5TPntdJnYfIpBeZndDelM-AbS4FN9H2GTLFhoJ04/edit# for details
2021-07-06 15:55:22 -04:00
Kubernetes Prow Robot
9ca75c1f49
Merge pull request #103243 from ii/promote-statefulset-status-test
Promote to Conformance StatefulSet Patch, Read and Replace Status test +3
2021-07-01 14:28:02 -07:00
Stephen Heywood
1b73a0040a Promote Stateful Status e2e test to Conformance 2021-06-28 11:24:59 +12:00
Stephen Heywood
d3ad1d77f3 Promote Statefulset list and deleteCollection e2e test to Conformance 2021-06-28 10:06:27 +12:00
ravisantoshgudimetla
cf9510751d StatefulSet minReadySeconds e2e 2021-06-23 08:23:23 -04:00
Stephen Heywood
3c59e742f3 Create List, Patch & DeleteCollection StatefulSet Test
Co-Authored-By: Riaan Kleinhans <riaan@ii.coop>

e2e test validates the following 3 extra endpoints

- patchAppsV1NamespacedStatefulSet
- listAppsV1StatefulSetForAllNamespaces
- deleteAppsV1CollectionNamespacedStatefulSet
2021-06-17 09:21:38 +12:00
Stephen Heywood
bcfa3604a2 Create e2e test for Statefulset Status endpoints
e2e test validates the following 3 endpoints
- patchAppsV1NamespacedStatefulSetStatus
- readAppsV1NamespacedStatefulSetStatus
- replaceAppsV1NamespacedStatefulSetStatus
2021-05-19 16:17:19 +12:00
wojtekt
8df355b80a Replace some nested KubeDescribe calls with ginkgo.Describe 2021-02-25 14:44:39 +01:00
Kubernetes Prow Robot
528390348d
Merge pull request #98126 from ii/statefulset_test
Update: StatefulSet Replica scaling to include Patch Scale +1 endpoint
2021-02-12 09:27:09 -08:00
Riaan Kleinhans
866f658695 Update e2e patch scale statefulset test
Test now validates patchAppsV1NamespacedStatefulSetScale endpoint.
Update conformance metadata to include v1.21

Co-authored-by: Stephen Heywood <stephen@ii.coop>
2021-02-12 09:43:48 +13:00
he.qingguo
c1e1eb4d29 Fix Spelling error about [formatted] for statefulset.go
Signed-off-by: he.qingguo <he.qingguo@zte.com.cn>
2020-12-31 15:48:36 +08:00
Maciej Szulik
eec4a04c2d
Use namespace flag passed to RunKubectl* methods 2020-09-11 14:51:03 +02:00
Jefftree
ace97738e2 Update formatting of conformance comment 2020-07-29 20:50:44 -07:00
wawa0210
9d1948a2f5
fix test/e2e/apps staticcheck 2020-07-02 18:14:12 +08:00
Jordan Liggitt
c9638d54d0 Defer ginkgo recovers 2020-06-01 11:02:41 -04:00
Kubernetes Prow Robot
437c2df36f
Merge pull request #90855 from wojtek-t/remove_listwatchuntil
Remove ListWatchUntil
2020-05-11 15:22:35 -07:00
wojtekt
ead12b02fe Remove ListWatchUntil 2020-05-11 16:34:18 +02:00
wojtekt
238dde4bdb Fix statefulset test flakiness 2020-05-08 17:23:03 +02:00
Tomas Nozicka
2256991c93 Fix watches in StatefulSet e2e tests 2020-04-23 16:08:32 +02:00
drfish
dfab6b637f Update .import-aliases for e2e test framework 2020-03-25 11:40:02 +08:00
Kenichi Omichi
2c8955fd4a Use e2epod.WaitForPodNameRunningInNamespace directly
WaitForPod*() are just wrapper functions for e2epod package, and they
made an invalid dependency to sub e2e framework from the core framework.
So this replaces WaitForPodRunning() with the e2epod function.
2020-03-17 00:13:14 +00:00
Mike Danese
aaf855c1e6 deref all calls to metav1.NewDeleteOptions that are passed to clients.
This is gross but because NewDeleteOptions is used by various parts of
storage that still pass around pointers, the return type can't be
changed without significant refactoring within the apiserver. I think
this would be good to cleanup, but I want to minimize apiserver side
changes as much as possible in the client signature refactor.
2020-03-05 14:59:46 -08:00
Mike Danese
c58e69ec79 automated refactor 2020-03-05 14:59:46 -08:00
Mike Danese
25651408ae generated: run refactor 2020-02-08 12:30:21 -05:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
Kubernetes Prow Robot
82c7c86998
Merge pull request #86169 from clarklee92/move-e2e/framework/statefulset
e2e: move funs of framework/statefulset to e2e/apps & e2e/upgrades
2019-12-22 19:57:32 -08:00
Jordan Liggitt
2164157113 Make e2e scale updates unconditional 2019-12-16 15:46:35 -05:00
clarklee92
623c4f9f17 e2e: move funs of framework/statefulset to e2e/apps & e2e/upgrades
Signed-off-by: clarklee92 <clarklee1992@hotmail.com>
2019-12-14 02:17:00 +08:00
MorrisLaw
b85adbf1fd moved WriteFileViaContainer and ReadFileViaContainer to kubectl_utils 2019-12-04 20:31:57 +00:00
Dan Winship
ec4c1a1c05 Add e2enode.GetRandomReadySchedulableNode, replace some uses of framework.GetReadySchedulableNodesOrDie
For tests that want a single ready, schedulable node
2019-09-24 13:03:40 -04:00
WanLinghao
a6f5d99409 Refactor and clean up e2e framework utils. This patch handles test/e2e/framework/pv_util.go file 2019-09-18 17:57:13 +08:00
toyoda
c3fdb5e7d9 Use log functions of core framework on test/e2e/apps 2019-08-26 17:38:11 +09:00
Kenichi Omichi
a5a23d2845 Move ConfirmStatefulPodCount to e2e test
ConfirmStatefulPodCount() was used at e2e statefulset test only,
and that added dependency on another sub framework to statefulset
sub framework. This moves ConfirmStatefulPodCount() to the e2e test
for clean dependency.
2019-08-15 17:36:04 +00:00
Kubernetes Prow Robot
2321d1e9e8
Merge pull request #80150 from ii/promote-statefulset-replica-scaling
Promote StatefulSet Replica scaling
2019-07-25 16:02:07 -07:00
draveness
c38ae01f8e feat: move service_util to separated package 2019-07-19 08:32:39 +08:00
Caleb Woodbine
1e8f5feffd Fix imports, Formatting of text 2019-07-15 03:53:56 +00:00
Caleb Woodbine
a062367251 Promote StatefulSet Replica scaling 2019-07-15 02:02:39 +00:00
draveness
d3158b2c71 feat: use framework.ExpectNotEqual in e2e test 2019-07-10 21:36:26 +08:00
tanshanshan
2c130b236c Use ExpectEqual under apps 2019-07-04 08:43:42 +08:00
goodluckbot
032dde8754 Refactor statefulset e2e tests 2019-06-25 11:33:58 +08:00
Antonio Ojea
410df752cd
Add ipv6 support to [sig-apps] StatefulSet e2e test
Use httpd docker images instead of nginx because they listen
by default both in IPv4 and IPv6
2019-06-23 17:23:28 +02:00
Kubernetes Prow Robot
dc8b928136
Merge pull request #79162 from SataQiu/fix-test-20190619
Refactor: replace framework.Failf with e2elog.Failf
2019-06-21 12:17:04 -07:00