Commit Graph

410 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
8fbfbd9653
Merge pull request #115260 from pwschuurman/kep-3335-statefulset-start-ordinal-beta
Move StatefulSetStartOrdinal feature gate to beta
2023-03-09 21:34:30 -08:00
Kubernetes Prow Robot
48e4052fc0
Merge pull request #114902 from TommyStarK/pkg-apis/replace-deprecated-pointer-function
pkg/apis: Replace deprecated pointer function
2023-03-09 21:34:15 -08:00
Peter Schuurman
910ce0ed0b Run ./hack/update-* scripts to update generated files 2023-03-06 16:38:52 -08:00
Kubernetes Prow Robot
35f0507dca
Merge pull request #111856 from mengjiao-liu/improve-podSpec.restartPpolicy-description
Improve spec.template.spec.restartPolicy description
2023-02-27 22:53:27 -08:00
Mengjiao Liu
81aefe5fee Improve spec.template.spec.restartPolicy description 2023-02-27 14:25:48 +08:00
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
TommyStarK
c242e647ae pkg/apis: Replace deprecated pointer function
Signed-off-by: TommyStarK <thomasmilox@gmail.com>
2023-01-08 13:14:37 +01: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
67425594f3 Rebasing feature branch 2022-11-08 07:48:10 -08:00
Peter Schuurman
366997951b Update doc comments and change name of feature gate 2022-11-08 07:48:10 -08:00
Peter Schuurman
8a9c126eca Small updates and comment fixes 2022-11-08 07:48:09 -08:00
Peter Schuurman
af58b491ef Update generated protobuf files 2022-11-08 07:48:09 -08:00
Peter Schuurman
7b3d77a41a Adding implementation of KEP-3335, StatefulSetSlice 2022-11-08 07:48:00 -08:00
Jordan Liggitt
fc69084bf1
Update workload selector validation 2022-11-07 20:52:02 -05:00
Manjusaka
0843c4dfca
Add extra value validation for matchExpression field in LabelSelector 2022-11-07 20:48:21 -05:00
Monis Khan
b738be9b46
Use https links for k8s KEPs, issues, PRs, etc
Signed-off-by: Monis Khan <mok@microsoft.com>
2022-09-23 23:36:24 +00:00
Bryan Boreham
91eb1407d2 Remove incorrect mention of pointer in comment
This `DeploymentSpec` struct is used internally; the ones used for
serialization do have a pointer and this text was most likely copied
from there and not corrected.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2022-09-12 14:20:26 +00:00
Kubernetes Prow Robot
cf2800b812
Merge pull request #111402 from verb/111030-ec-ga
Promote EphemeralContainers feature to GA
2022-07-29 19:29:20 -07:00
Davanum Srinivas
a9593d634c
Generate and format files
- Run hack/update-codegen.sh
- Run hack/update-generated-device-plugin.sh
- Run hack/update-generated-protobuf.sh
- Run hack/update-generated-runtime.sh
- Run hack/update-generated-swagger-docs.sh
- Run hack/update-openapi-spec.sh
- Run hack/update-gofmt.sh

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-07-26 13:14:05 -04:00
Lee Verberne
d238e67ba6 Remove EphemeralContainers feature-gate checks 2022-07-26 02:55:30 +02:00
Ravi Gudimetla
6ac7d4127a api: Promote DS maxSurge to GA 2022-07-18 07:55:00 -04:00
Ravi Gudimetla
7397c029e8 Promote DS MaxSurge to GA 2022-07-18 07:54:59 -04:00
Ravi Gudimetla
05f20dced0 api: Promote statefulset MinReadySeconds to GA 2022-07-13 11:37:10 -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
376b3c4b9a fix some nits from API changes 2022-04-05 13:41:29 -07:00
ravisantoshgudimetla
807ae0c318 [sts] api: Make available replicas optional 2022-04-01 11:54:50 -04:00
Mayank Kumar
357203d992 API: maxUnavailable for StatefulSet 2022-03-28 11:01:05 -07:00
Davanum Srinivas
9405e9b55e
Check in OWNERS modified by update-yamlfmt.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-12-09 21:31:26 -05:00
Matthew Cary
f1d5d4df5a tests for statefulset PersistentVolumeClaimDeletePolicy api change 2021-11-17 16:46:48 -08:00
Matthew Cary
98c37f9e2a statefulset PersistentVolumeClaimDeletePolicy api change 2021-11-17 16:46:47 -08:00
Sergey Kanzhelev
b7affcced1 implement :grpc probe action 2021-11-17 17:31:23 +00:00
Hemant Kumar
63fffd37b1 Implement API changes necessary for recovery from resize failure 2021-11-15 18:39:30 -05: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
62a6df9e0b
Merge pull request #104045 from ravisantoshgudimetla/promote-minReadySec-sts-beta
Promote min ready sec sts beta
2021-09-13 14:33:50 -07:00
Kubernetes Prow Robot
eb729620c5
Merge pull request #99682 from chymy/fix-misspelling
Fix misspelling and misgrammar
2021-09-05 12:46:28 -07:00
Stephen Augustus
481cf6fbe7
generated: Run hack/update-gofmt.sh
Signed-off-by: Stephen Augustus <foo@auggie.dev>
2021-08-24 15:47:49 -04:00
ravisantoshgudimetla
bcc288eeee api: Promote statefulset MinReadySeconds to beta 2021-08-20 12:51:35 -04:00
Jordan Liggitt
87a4e082ac Change defaulter-gen input to package path 2021-08-14 11:00:18 -04: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
10a3cc815b Revert "statefulset PersistentVolumeClaimDeletePolicy api change"
This reverts commit e4e735cd1c.

Change-Id: I3e17aa585fd9ae4f9e74b97326ae6b9fadd2a94c
2021-07-15 17:14:19 -07:00
Kubernetes Prow Robot
687f0aa35b
Merge pull request #101296 from Miciah/fix-RollingUpdateDaemonSet-godoc-regarding-rounding
Fix RollingUpdateDaemonSet godoc regarding rounding
2021-07-05 02:14:54 -07:00
Matthew Cary
b259686b36 tests for statefulset PersistentVolumeClaimDeletePolicy api change
Change-Id: I07c8e31a8c76a6a1022c08fb749af7e353b731de
2021-06-23 11:55:35 -07:00
Matthew Cary
e4e735cd1c statefulset PersistentVolumeClaimDeletePolicy api change 2021-06-23 10:33:05 -07:00
chymy
b250a985d2 Fix misspelling and misgrammar
Signed-off-by: chymy <chang.min1@zte.com.cn>
2021-06-05 05:02:17 -04:00
Miciah Masters
452e2eaf1b Fix RollingUpdateDaemonSet godoc regarding rounding
Fix the godoc for RollingUpdateDaemonSet to state that
spec.updateStrategy.rollingUpdate.maxUnavailable is rounded up.

A recent commit changed the godoc to say that the value of this field
was rounded down, but the actual implementation rounds up and always has
rounded up.  (This is in contrast to Deployments, where
spec.strategy.rollingUpdate.maxUnavailable is rounded down.)

Follow-up to commit 5aa53f885c.

* api/openapi-spec/swagger.json:
* staging/src/k8s.io/api/apps/v1/generated.proto:
* pkg/apis/apps/types.go:
* staging/src/k8s.io/api/apps/v1/types.go:
* staging/src/k8s.io/api/apps/v1/types_swagger_doc_generated.go:
* staging/src/k8s.io/api/apps/v1beta2/generated.proto:
* staging/src/k8s.io/api/apps/v1beta2/types.go:
* staging/src/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go:
* staging/src/k8s.io/api/extensions/v1beta1/generated.proto:
* staging/src/k8s.io/api/extensions/v1beta1/types.go:
* staging/src/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go:
* staging/src/k8s.io/cli-runtime/artifacts/openapi/swagger.json:
* staging/src/k8s.io/kubectl/testdata/openapi/swagger.json:
Change "rounding down" to "rounding up".
2021-06-01 10:09:26 -04: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
ravisantoshgudimetla
5464b64981 generated: Changes for api introduced 2021-05-25 19:59:58 -04:00
ravisantoshgudimetla
49af835852 api: Introduce minReadySeconds,AvailableReplicas in Statefulset
The minReadySeconds field on StatefulSet specifies the minimum
number of seconds for which a newly created Pod should be
ready without any of its containers crashing, for it to
be considered available. The AvailableReplicas field
in the status reflects the replicas that are available
2021-05-25 19:59:57 -04:00