Commit Graph

277 Commits

Author SHA1 Message Date
Shiming Zhang
45ce2dfacc Treat negative as 1s in delete path 2021-06-28 11:49:39 +08:00
Jordan Liggitt
068e4c55a8 Eliminate parallel and unnecessary embedded etcd instances 2021-06-15 09:53:06 -04:00
Kubernetes Prow Robot
f5eded9a00
Merge pull request #100142 from Ethyling/enh-get-lastrestart
Add `LAST RESTART` column to `kubectl get pods`
2021-06-02 10:54:43 -07:00
Jordan Jacobelli
9eea445bcc Update test cases for 'RESTARTS' column in 'kubectl get pods'
Signed-off-by: Jordan Jacobelli <jordanjacobelli04@gmail.com>
2021-06-02 17:32:21 +02:00
Jordan Liggitt
f669796dfd Send pod spec warnings when creating or changing workload objects 2021-05-18 10:42:36 -04:00
Jordan Liggitt
8c8a4cf3e4 Add WarningsOnCreate,WarningsOnUpdate 2021-05-18 10:42:36 -04:00
Kubernetes Prow Robot
972ee2d425
Merge pull request #101034 from verb/1.22-ec-api
Switch alpha Pod ephemeralcontainers API to use Pod kind
2021-04-22 06:21:41 -07:00
Lee Verberne
97726a50c1 Address feedback for new /ephemeralcontainers API
* Use deep copies in `PrepareForUpdate()`
* Preserve select metadata from new pod
* Use patch to add ephemeral container `kubectl debug`
* Distinguish between pod vs /ephemeralcontainers NotFound
2021-04-16 14:08:12 +02:00
Jordan Liggitt
10b07085f8 Define constant for eviction failure cause 2021-04-14 09:12:39 -04:00
Jordan Liggitt
33ad842480 allow evictions subresource to accept policy/v1 and policy/v1beta1 2021-04-13 21:22:25 -04:00
Jordan Liggitt
40f8fb2224 Register Eviction v1 2021-04-13 17:27:42 -04:00
Lee Verberne
d22dc5cb72 Switch ephemeralcontainers SR to Pod Kind
This changes the `/ephemeralcontainers` subresource of `/pods` to use
the `Pod` kind rather than `EphemeralContainers`.

When designing this API initially it seemed preferable to create a new
kind containing only the pod's ephemeral containers, similar to how
binding and scaling work.

It later became clear that this made admission control more difficult
because the controller wouldn't be presented with the entire Pod, so we
updated this to operate on the entire Pod, similar to how `/status`
works.
2021-04-13 13:36:48 +02:00
Kevin Delgado
a1fac8cbd9 Server-Side Apply: Status Wiping/Reset Fields
Adds and implements ResetFieldsProvder interface in order to ensure that
the fieldmanager no longer owns fields that get reset before the object
is persisted.

Co-authored-by: Kevin Wiesmueller <kwiesmul@redhat.com>
Co-authored-by: Kevin Delgado <kevindelgado@google.com>
2021-03-10 01:02:18 +00:00
Morten Torkildsen
621aed4d32 generated 2021-03-09 10:29:11 -05:00
Morten Torkildsen
21fba79d45 Promote PDBs to GA 2021-03-09 10:29:11 -05:00
Kubernetes Prow Robot
f25f071af1
Merge pull request #99658 from deads2k/proxy-skip
promote AllowInsecureBackendProxy to stable
2021-03-08 07:51:42 -08:00
Kubernetes Prow Robot
4e95e1df04
Merge pull request #98515 from lala123912/huge_page
Add request value verification for hugepage
2021-03-05 22:11:43 -08:00
lala123912
e162fcc1bf Add request value verification for hugepage 2021-03-05 17:36:22 +08:00
Morten Torkildsen
1e2a7f381f Add conditions to PDB status 2021-03-04 18:52:02 -08:00
David Eads
cd08de9eb0 stop using AllowInsecureBackendProxy featuregate since it is always true 2021-03-03 10:52:14 -05:00
Patrick Ohly
d64165c803 generic ephemeral volumes: fix and test apiserver feature gate
The implementation should have preserved an existing ephemeral volume
source during an update even when the feature gate is currently
disabled, but due to a cut-and-paste error it was checking for CSI
volumes instead.

The new test detected that. It's based on
https://github.com/kubernetes/kubernetes/pull/97058/files#diff-7826f7adbc1996a05ab52e3f5f02429e94b68ce6bce0dc534d1be636154fded3
2021-03-03 10:13:05 +01:00
Abdullah Gharaibeh
d7e80ab038 Implement pod deletion cost 2021-03-01 13:45:58 -05:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
xiaofei.sun
fd62f32125 Scheduler: remove pkg/apis/core/field_constants.go 2021-02-24 18:06:29 +08:00
Kubernetes Prow Robot
ee2b7a5049
Merge pull request #98049 from pacoxu/enhancements/redir-links
fix all keps links 404 for kep folder migration
2021-02-01 21:48:28 -08:00
pacoxu
a10bdfed09 fix all keps links 404 for kep folder migration
Signed-off-by: pacoxu <paco.xu@daocloud.io>
2021-02-01 19:41:59 +08:00
Kubernetes Prow Robot
661eae7c7c
Merge pull request #97814 from deads2k/podlogs-metrics
add metrics for insecure backend proxy
2021-01-21 13:27:00 -08:00
David Eads
782a7a5426 add metrics for insecure backend proxy 2021-01-14 15:26:37 -05:00
Kubernetes Prow Robot
94a623a45a
Merge pull request #90299 from josephw/send-static-retry-after-when-hitting-pod-disruption-budget
Set a static Retry-After when evicting a pod is not allowed.
2021-01-11 07:19:07 -08:00
Joseph Walton
fb61854bd2 Set a static Retry-After when evicting a pod is not allowed.
Follow the original TODO from back in c86b84c with the errors added
in d3be1ac. Edit the TODO to make clear that a dynamic response would
still be ideal.

Dramatically reduce the time based on suggestion in PR, and remove name from TODO
as not currently active.
2021-01-11 23:23:35 +11:00
wojtekt
c2d61896f4 Add suggestion to storage interface Delete method 2020-12-16 08:12:57 +01:00
Derek Carr
45bd6cb186 Downward API hugepages 2020-11-10 16:09:13 -05:00
wojtekt
8b98305858 Remove variadic argument from storage interface 2020-11-02 16:08:23 +01:00
Michael Gugino
717be0cd44 Allow deletion of unhealthy pods if enough healthy
Currently, if you have a PDB with 0 disruptions
available and you attempt to evict a non-healthy
pod, the eviction request will always fail.  This
is because the eviction API does not currently
take in to account that the pod you are removing
is the unhealthy one.

This commit accounts for trying to evict an
unhealthy pod as long as there are enough healthy
pods to satisfy the PDB's requirements.  To
protect against race conditions, a ResourceVersion
constraint is enforced.  This will ensure that
the target pod does not go healthy and allow
any race condition to occur which might disrupt
too many pods at once.

This commit also eliminates superfluous class to
DeepCopy for the deleteOptions struct.
2020-10-20 12:59:23 -04:00
Dan Winship
3a110546ed Move SCTP to GA 2020-10-15 08:56:33 -04:00
Kubernetes Prow Robot
def8fe3b4e
Merge pull request #94685 from verb/ec-admission
Convert to EphemeralContainers for validation in EphemeralContainersREST
2020-09-30 00:29:25 -07:00
Kubernetes Prow Robot
0f39af90ed
Merge pull request #94364 from wojtek-t/efficient_watch_resumption
Efficient watch resumption
2020-09-25 15:42:48 -07:00
Jordan Liggitt
71fcc2298d Fix resource location for ipv6 pods 2020-09-16 11:24:07 -04:00
wojtekt
fbd65a265a Pipe newFunc to etcd3 storage layer 2020-09-15 08:19:12 +02:00
Lee Verberne
bf0a33d1de Use EphemeralContainers for storage validation
When updating ephemeral containers, convert Pod to EphemeralContainers
in storage validation. This resolves a bug where admission webhook
validation fails for ephemeral container updates because the webhook
client cannot perform the conversion.

Also enable the EphemeralContainers feature gate for the admission
control integration test, which would have caught this bug.
2020-09-10 17:24:52 +02:00
Sascha Grunert
96fb83c4c1
Implement PodSecurityPolicy enforcement for seccomp GA
This implements the necessary pieced for the PodSecurityPolicy
enforcement like described in the appropriate KEP section:

https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/20190717-seccomp-ga.md#podsecuritypolicy-enforcement

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-07-10 15:55:21 +02:00
Kubernetes Prow Robot
26f0227019
Merge pull request #91408 from saschagrunert/seccomp-api-migration
Add seccomp GA version skew for pods
2020-07-10 04:29:48 -07:00
Kubernetes Prow Robot
dd649bb7ef
Merge pull request #91342 from mgugino-upstream-stage/evict-deleted-ok
Eviction: ignore PDBs if pods with DeletionTimestamp
2020-07-09 15:30:33 -07:00
Sascha Grunert
c3ba2d8b8b
Add seccomp GA version skew for pods
This adds a new conversion function to the pod strategy to handle the
seccomp version skew strategy:

https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/20190717-seccomp-ga.mdversion-skew-strategy

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-07-06 16:06:24 +02:00
Paulo Gomes
8976e3620f
Add seccomp enforcement and validation based on new GA fields
Adds seccomp validation.

This ensures that field and annotation values must match when present.

Co-authored-by: Sascha Grunert <sgrunert@suse.com>
2020-07-06 09:13:25 +01:00
Michael Gugino
dd49915c55 Eviction: ignore PDBs if pods with DeletionTimestamp
When using the eviction API, if a pod already has
a non-zero DeletionTimestamp, we don't need to check
PDBs as it has already been marked for deletion.
2020-06-02 01:06:45 -04:00
Michael Gugino
047b0cee71 Quit retrying early with user supplied resourceVersion
This commit also updates tests and comments.
2020-05-28 16:14:45 -04:00
David Eads
4522141f0a reduce complexity in pdb refactor 2020-05-14 15:25:59 -04:00
Michael Gugino
9f80e7a6f8 Allow deletion of pending pods when using PDBS
Currently, if you have a PDB set, it is possible for
a pod stuck in pending state to be prevented from
deletion even though there are in fact enough healthy
replicas.

This commit allows pods in Pending state to be removed.

This commit also adds associated unit tests.

related-bug: #80389
2020-05-12 12:44:05 -04:00
Jordan Liggitt
23e9fb1bb5 Fix podIP validation 2020-04-30 19:49:45 -04:00