Commit Graph

14501 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
2a821d787b Merge pull request #105525 from damemi/wire-contexts-core
Wire contexts to Core controllers
2021-11-02 03:32:58 -07:00
Kubernetes Prow Robot
6ebd6f38b9 Merge pull request #104909 from pacoxu/kubectl-qos
kubectl: include init containers when determining pod QoS
2021-11-01 20:00:58 -07:00
Kubernetes Prow Robot
349758d65d Merge pull request #105898 from tallclair/ps-metrics
[PodSecurity] Metrics improvements
2021-11-01 18:12:58 -07:00
Kubernetes Prow Robot
88f8974c8a Merge pull request #105974 from wojtek-t/pf_watch_support_8
P&F: Enable support for indexes in watch tracker
2021-11-01 17:12:58 -07:00
Kubernetes Prow Robot
764e219469 Merge pull request #105946 from prameshj/exclude-autoscaler-nodes
Remove nodes with Cluster Autoscaler taint from LB backends in service controller
2021-11-01 15:43:53 -07:00
Pavithra Ramesh
62799e33ee Remove nodes with Cluster Autoscaler taint from LB backends. 2021-11-01 14:41:21 -07:00
Tim Allclair
afad341759 Cache fast-path metrics & update unit tests 2021-11-01 14:23:00 -07:00
Tim Allclair
6c273020d3 [PodSecurity] Avoid the LegcayRegistry for metrics serving 2021-11-01 14:23:00 -07:00
Tim Allclair
21692e1683 [PodSecurity] Add error & exemption metrics 2021-11-01 14:22:58 -07:00
Tim Allclair
e46928c0b1 [PodSecurity] Fix up metrics & add tests
Update pod security metrics to match the spec in the KEP.
2021-11-01 14:11:19 -07:00
Kubernetes Prow Robot
ac2d872ed9 Merge pull request #105908 from stlaz/ps_annotations
[PodSecurity] Add annotations denoting the exemption reason and the enforcement policy used
2021-11-01 13:17:46 -07:00
Wojciech Tyczyński
21ec77dc19 Enable support for indexes in WatchTracker 2021-11-01 20:51:40 +01:00
Wojciech Tyczyński
12746f4bc1 P&F: Update WatchTracker interface to pass more information 2021-11-01 20:35:18 +01:00
Kubernetes Prow Robot
76694983a1 Merge pull request #105930 from wojtek-t/pf_watch_support_7
P&F: Update and cleanup mutating work estimator
2021-11-01 07:33:18 -07:00
Mike Dame
4960d0976a Wire contexts to Core controllers 2021-11-01 10:29:00 -04:00
Stanislav Laznicka
037daeb4fd podsecurity: add an annotation informing about which policy was enforced 2021-11-01 13:27:13 +01:00
Stanislav Laznicka
65f88c675c podsecurity: distinguish between audit and audit violation annotations 2021-11-01 13:27:11 +01:00
Stanislav Laznicka
4a79488ac2 podsecurity: annotations on responses allowed by exemption 2021-11-01 13:24:38 +01:00
Wojciech Tyczyński
4700cf622b P&F: update mutating request estimation 2021-11-01 09:35:28 +01:00
Kubernetes Prow Robot
aa6bb481ba Merge pull request #105839 from nilo19/bug/cherry-pick-856
fix: remove VMSS and VMSS instances from SLB backend pool only when necessary
2021-11-01 00:01:18 -07:00
Kubernetes Prow Robot
b403ed8578 Merge pull request #105777 from nilo19/bug/cherry-pick-860
fix: do not delete the lb that does not exist
2021-10-31 23:01:31 -07:00
Kubernetes Prow Robot
763e528e5b Merge pull request #105253 from nilo19/bug/cherry-pick-680
fix: leave the probe path empty for TCP probes
2021-10-31 23:01:19 -07:00
Monis Khan
249aefebe3 client-go exec: make sure round tripper can be unwrapped
Signed-off-by: Monis Khan <mok@vmware.com>
2021-10-29 17:59:52 -04:00
Wojciech Tyczyński
e262db7a4d P&F: move seat-seconds to a better location 2021-10-29 22:20:16 +02: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
Shivanshu Raj Shrivastava
c2fba6b84d referenced the V1Secret type (#105901) 2021-10-29 12:13:11 -07:00
Bryan Boreham
a988182f59 'kubectl events' command (#99557)
* Basic scaffolding for kubectl events command

* Simple implementation of 'kubectl events'

* Print event fields

Borrowing code from 'kubectl describe'

* Sort events before printing

* Make output more like 'kubectl get events'

Print namespace if fetching from all

* Refactor: extract print functions

To make it easier to add watch function next.

* Implement watch for new events

Run the list function same as before, so those events come out in order,
then watch from the ResourceVersion after the last event.

* Clear up some lint warnings

* Update description and example text

* refactor: introduce a listOptions variable

* Implement --for option

splitResourceTypeName() function borrowed from cli-runtime because we
need similar behaviour to Builder.ResourceNames(), but applying to
Event.InvolvedObject.

* Add kubectl/pkg/cmd/events to vendor/modules.txt

* Add back cmdutil.Factory

Needed in NewCmdAlpha to construct the 'events' command

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>

* Fix lint

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>

* Make package alias go-cromulent

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>

* Use genericclioptions.RESTClientGetter instead of cmdutil.Factory

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>

* Decode object parameter to GroupVersionKind and name

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>

* Merge two files into one

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>

* Include example for --for option

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>

* Fix inconsistent option name in error message

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>

* Remove unnecessary Validate call

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>

* Use fields from event series

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>

* Support chunking of list of events

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>

* Use watchtools utility to receive watch events

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>

* Split struct into flags and options

Flags represents the inputs from the CLI; options are what the running
command needs. This structure parallels the 'wait' command, and should
be easier to write tests for.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>

* Add some parameters to usage string

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>

* Do only one of list or watch

We tried to print the list first then start a watch after the last
event, but sometimes the server will return "watch is too old" on that
ResourceVersion.
Instead, if we need to watch just start it from the beginning.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>

* Print message if no events found

Also, if watching, don't print the headings until the first event
arrives.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2021-10-29 09:12:50 -07:00
Kubernetes Prow Robot
e580aa93d1 Merge pull request #105739 from tkashem/apf-decision-cancel
apf: call metrics.AddReject for decisionCancel
2021-10-29 08:10:51 -07:00
Kubernetes Prow Robot
59e6e3f2f3 Merge pull request #106010 from wojtek-t/cleanup_watchcache
Minor watchcache cleanup
2021-10-29 06:14:50 -07:00
Abu Kashem
f6dcf17a10 apf: call metrics.AddReject for decisionCancel 2021-10-29 09:11:23 -04:00
Wojciech Tyczyński
ace5554257 Minor watchcache cleanup 2021-10-29 14:09:53 +02:00
Madhav Jivrajani
aab7cd3d8a cacher: refactor process() function
Split process() function into processEvents() and process().
This is done in anticipation of GetAllEventsSinceThreadUnsafe()
returning an entity using which events can be constructed and
not the events itself.

Subsequently, this commit also moves updating resource version
for initEvents from Watch() to the processEvents() func.

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
2021-10-29 15:34:16 +05:30
Kubernetes Prow Robot
bb24c265ce Merge pull request #104693 from ravisantoshgudimetla/add-podOS-field
Add pod os field
2021-10-28 21:38:50 -07:00
Kubernetes Prow Robot
a8cf023abc Merge pull request #100318 from lyft/hpa-v2beta2-opt-conditions
Mark v2beta1 and v2beta2 HPA status conditions as optional
2021-10-28 20:30:51 -07:00
Kubernetes Prow Robot
c592bd40f2 Merge pull request #105609 from pohly/generic-ephemeral-volume-ga
generic ephemeral volume GA
2021-10-28 17:36:50 -07:00
Zeleena Kearney
65819f66c9 Mark v2beta1 and v2beta2 HPA status conditions as optional to resolve unnecessary apply error 2021-10-28 17:37:19 -05:00
ravisantoshgudimetla
8a6533089a testdata: Pod OS field 2021-10-28 17:33:51 -04:00
ravisantoshgudimetla
41f8f95fc5 generated: Add os field to Pod Spec 2021-10-28 17:31:52 -04:00
ravisantoshgudimetla
3b936d310c api: Introduce os field to pod spec 2021-10-28 17:31:52 -04:00
Kubernetes Prow Robot
1d9d530ee1 Merge pull request #105959 from liggitt/podsecurity-details
PodSecurity: return namespace validation errors in standard field.ErrorList format
2021-10-28 11:51:07 -07:00
Kubernetes Prow Robot
589d47e70c Merge pull request #103908 from wzshiming/fix/kubelet-config-typo
Fix typo in kubelet config
2021-10-28 11:50:59 -07:00
Kubernetes Prow Robot
eb5b5e7f0b Merge pull request #105726 from DiptoChakrabarty/podexecdoc
Fix Documentation of Default params for PodExecOptions Function
2021-10-28 09:20:39 -07:00
Kubernetes Prow Robot
6edcb60d9f Merge pull request #104915 from alculquicondor/job-ready
Track ready pods in Job status
2021-10-28 09:20:26 -07:00
Kubernetes Prow Robot
afff019fbc Merge pull request #105734 from marseel/fix/race_condition
Fix race condition in logging when request times out
2021-10-28 03:14:26 -07:00
Jordan Liggitt
3aa656b63f PodSecurity: return field errors for invalid namespace labels 2021-10-28 00:28:27 -04:00
Jordan Liggitt
c0f33ddf08 PodSecurity: fix level/version validation fieldpaths 2021-10-28 00:28:26 -04:00
Jordan Liggitt
7cd905e897 PodSecurity: plumb kind in attributes 2021-10-28 00:28:26 -04:00
Jordan Liggitt
091724a6d8 apierrors: optimize ToAggregate() for zero-length lists 2021-10-28 00:24:14 -04:00
Jordan Liggitt
57fdd167e4 apierrors: Avoid spurious <nil> in invalid error message 2021-10-27 23:45:06 -04:00
Kubernetes Prow Robot
8fd95902da Merge pull request #105922 from liggitt/podsecurity-warnings
PodSecurity: clean up namespace validation messages, time bounding, and add testing
2021-10-27 16:25:02 -07:00