Commit Graph

40 Commits

Author SHA1 Message Date
Peter Schuurman
a714e9e485 Fix validation.go to validate without StatefulSetStartOrdinal feature gate check. Adds test case to validate regression fix of validation failing when spec.ordinals set and feature gate disabled 2023-02-23 16:22:56 -08:00
Tim Hockin
c5c58eb653
StatefulSet validation needs to allow old names
A recent commit changed name validation from DNS Subdomain to DNS Label.
The assumption was that a subdomain-named SS could never work and the
only reasonable thing to do would be to delete it.  But if there is a
finalizer, the delete is not possible because we would reject the update
because the old name (subdomain) did not pass the new validation.

This commit does not re-validate the ObjectMeta on update.  Probably
every resource should follow this pattern, but mostly it's a non-issue
becauase the above change (name validation) is not something we do -
this case was excpetional.
2022-12-15 09:33:47 -08:00
Tim Hockin
f4c1682fb1
Validate StatefulSet names as DNS Label
Any StatefuleSet which took advantage of this (by having dots in the
name) can't have worked because we set `pod.spec.hostname` from it,
which is validated as a DNS label.

So while this is strictly a breaking change, it doesn't break anything
that was not already broken.
2022-11-28 17:31:08 -08:00
Peter Schuurman
366997951b Update doc comments and change name of feature gate 2022-11-08 07:48:10 -08:00
Peter Schuurman
7b3d77a41a Adding implementation of KEP-3335, StatefulSetSlice 2022-11-08 07:48:00 -08:00
Lee Verberne
d238e67ba6 Remove EphemeralContainers feature-gate checks 2022-07-26 02:55:30 +02:00
Ravi Gudimetla
7397c029e8 Promote DS MaxSurge to GA 2022-07-18 07:54:59 -04:00
Ravi Gudimetla
9144250a92 Promote minReadySeconds to GA 2022-07-13 11:37:10 -04:00
areller
a6943ad863
[fix] fix and refactor TestValidateStatefulSet and TestValidateStatefulSet test cases (#109809)
* restructure tests

restructure TestValidateStatefulSet and TestValidateStatefulSetUpdate to be an array and accept list of expected errors. in this commits, no tests were changed and expected errors are not filled yet

* add expected errors

adding expected errors and making the tests pass, without making any changes to the tests

* clean up TestValidateStatefulSet error cases

* clean up TestValidateStatefulSetUpdate cases

* validate new statefulset as part of update validation

* address PR comments
2022-05-24 11:55:24 -07:00
Mayank Kumar
357203d992 API: maxUnavailable for StatefulSet 2022-03-28 11:01:05 -07:00
Matthew Cary
f1d5d4df5a tests for statefulset PersistentVolumeClaimDeletePolicy api change 2021-11-17 16:46:48 -08:00
Matthew Cary
aeb82243fc Revert "tests for statefulset PersistentVolumeClaimDeletePolicy api change"
This reverts commit b259686b36.

Change-Id: I25cc8ae8a9aa77d0bc483147d3f8fb65616a2b2b
2021-07-16 11:51:35 -07:00
Matthew Cary
b259686b36 tests for statefulset PersistentVolumeClaimDeletePolicy api change
Change-Id: I07c8e31a8c76a6a1022c08fb749af7e353b731de
2021-06-23 11:55:35 -07:00
ravisantoshgudimetla
f3ab955018 validation: Handle presence of api introduced
When the StatefulSetMinReadySeconds feature gate is disabled,
the registry and validation must properly handle dropping the
minReadySeconds and AvailableReplicas fields
2021-05-25 20:03:18 -04:00
Abdullah Gharaibeh
d7e80ab038 Implement pod deletion cost 2021-03-01 13:45:58 -05:00
Clayton Coleman
c37c93f47a
validation: Handle presence of MaxSurge on DaemonSet
When the maxsurge daemonset gate is disabled, the registry and validation
must properly handle stripping the field. In the special case where that
would leave the MaxUnavailable field set to 0, we must set it to 1 which
is the default value.
2020-12-17 09:00:56 -05:00
Derek Carr
45bd6cb186 Downward API hugepages 2020-11-10 16:09:13 -05:00
Lee Verberne
013f049ce0 Add Ephemeral Containers to the Kubernetes core API 2019-07-22 11:19:22 +00:00
Jordan Liggitt
283e282515 Move extensions validation to apps 2018-10-25 21:11:52 -04:00
Di Xu
48388fec7e fix all the typos across the project 2018-02-11 11:04:14 +08:00
yuexiao-wang
400f5545bf add more test case in TestValidateStatefulSet
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2017-11-22 16:00:38 +08:00
Dr. Stefan Schimanski
012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
Dr. Stefan Schimanski
ed586da147 apimachinery: remove Scheme.DeepCopy 2017-10-06 14:59:17 +02:00
jianglingxia
abd1ea86fb fix error of func TestValidateStatefulSet that updateStrategy 2017-09-22 16:33:30 +08:00
Janet Kuo
ad0c6b66b5 Fix StatefulSet update validation 2017-08-21 15:28:08 -07:00
Di Xu
85602fd542 CollisionCount should have type int32 across controllers that use it for collision avoidance 2017-08-18 10:48:12 +08:00
Yinan Li
68983201bf Added field CollisionCount to StatefulSetStatus 2017-08-03 11:53:55 -07:00
Kenneth Owens
b1ce1ffc55 Removes PartitionStatefulSetStrategyType and Partition from UpdateStrategy and replaces them with a parameterized RollingUpdate strategy. 2017-06-12 10:06:09 -07:00
Kenneth Owens
1b55f57391 Implements StatefulSet update
Implements history utilities for ControllerRevision in the controller/history package
StatefulSetStatus now has additional fields for consistency with DaemonSet and Deployment
StatefulSetStatus.Replicas now represents the current number of createdPods and StatefulSetStatus.ReadyReplicas is the current number of ready Pods
2017-06-06 12:00:28 -07:00
Kenneth Owens
ba128e6e41 Implements ControllerRevision API Object without codec and code
generation
2017-05-25 11:38:57 -07:00
Clayton Coleman
2861ae5eb9
Support burst in stateful set scale up and down
The alpha field podManagementPolicy defines how pods are created,
deleted, and replaced. The new `Parallel` policy will replace pods
as fast as possible, not waiting for the pod to be `Ready` or providing
an order. This allows for advanced clustered software to take advantage
of rapid changes in scale.
2017-05-21 01:14:26 -04:00
Clayton Coleman
469df12038
refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
Clayton Coleman
9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
deads2k
6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Clayton Coleman
3454a8d52c
refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
Clayton Coleman
5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05:00
Janet Kuo
10aee82ae3 Rename PetSet API to StatefulSet 2016-10-27 17:25:10 -07:00
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Prashanth Balasubramanian
6bc3052551 PetSet alpha controller 2016-05-04 18:39:17 -07:00
Prashanth Balasubramanian
0ac10c6cc2 PetSet type, apps apigroup 2016-04-20 18:49:31 -07:00