Commit Graph

2911 Commits

Author SHA1 Message Date
Anish Ramasekar 0abb668640 Update k8s.io/utils to `a36077c30491`
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>

Kubernetes-commit: 09e02052fdf3d248368b3d05d5c922d616528c4c
2023-02-09 20:09:41 +00:00
Shang Jian Ding 04703e5d61 Implement kubectl debug profiles: general, baseline, and restricted (#114280)
* feat(debug): add more profiles

Signed-off-by: Jian Zeng <anonymousknight96@gmail.com>

* feat(debug): implment serveral debugging profiles

Including `general`, `baseline` and `restricted`.

I plan to add more profiles afterwards, but I'd like to get early
reviews.

Signed-off-by: Jian Zeng <anonymousknight96@gmail.com>

* test: add some basic tests

Signed-off-by: Jian Zeng <anonymousknight96@gmail.com>

* chore: add some helper functions

Signed-off-by: Jian Zeng <anonymousknight96@gmail.com>

* ensure pod copies always get their probes cleared

not wanting probes to be present is something we want
for all the debug profiles; so an easy place to implement
this is at the time of pod copy generation.

* ensure debug container in pod copy is added before the profile application

The way that the container list modification was defered causes the
debug container to be added after the profile applier runs. We now
make sure to have the container list modification happen before
the profile applier runs.

* make switch over pod copy, ephemeral, or node more clear

* use helper functions

added a helper function to modify a container out of a list that
matches the provided container name.

also added a helper function that adds capabilities to container
security.

* add tests for the debug profiles

* document new debugging profiles in command line help text

* add file header to profiles_test.go

* remove URL to KEP from help text

* move probe removal to the profiles

* remove mustNewProfileApplier in tests

* remove extra whiteline from import block

* remove isPodCopy helper func

* switch baselineProfile to using the modifyEphemeralContainer helper

* rename addCap to addCapability, and don't do deep copy

* fix godoc on modifyEphemeralContainer

* export DebugOptions.Applier for extensibility

* fix unit test

* fix spelling on overriden

* remove debugStyle facilities

* inline setHostNamespace helper func

* remove modifyContainer, modifyEphemeralContainer, and remove probes

their logic have been in-lined at call sites

* remove DebugApplierFunc convenience facility

* fix baseline profile implementation

it shouldn't have SYS_PTRACE base on
https://github.com/kubernetes/enhancements/tree/master/keps/sig-cli/1441-kubectl-debug#profile-baseline

* remove addCapability helper, in-lining at call sites

* address Arda's code review comments

1 use Bool instead of BoolPtr (now deprecated)
2 tweak for loop to continue when container name is not what we expect
3 use our knowledge on how the debug container is generated to simplify
  our modification to the security context
4 use our knowledge on how the pod for node debugging is generated to no
  longer explicit set pod's HostNework, HostPID and HostIPC fields to
  false

* remove tricky defer in generatePodCopyWithDebugContainer

* provide helper functions to make debug profiles more readable

* add note to remind people about updating --profile's help text when adding new profiles

* Implement helper functions with names that improve readability

* add styleUnsupported to replace debugStyle(-1)

* fix godoc on modifyContainer

* drop style prefix from debugStyle values

* put VisitContainers in podutils & use that from debug

* cite source for ContainerType and VisitContainers

* pull in AllContainers ContainerType value

* have VisitContainer take pod spec rather than pod

* in-line modifyContainer

* unexport helper funcs

* put debugStyle at top of file

* merge profile_applier.go into profile.go

* tweak dropCapabilities

* fix allowProcessTracing & add a test for it

* drop mask param from help funcs, since we can already unambiguous identify the container by name

* fix grammar in code comment

---------

Signed-off-by: Jian Zeng <anonymousknight96@gmail.com>
Co-authored-by: Jian Zeng <anonymousknight96@gmail.com>

Kubernetes-commit: d35da348c60a3c7505419741f2546ff8b0e38454
2023-02-09 11:18:22 -06:00
Kubernetes Publisher ddf00a2aef Merge pull request #110953 from Abirdcfly/220705
cleanup kubectl describe cronjob v1beta1 in 1.26

Kubernetes-commit: 19eddfc5675c3a9206e33333719bcf719bb99928
2023-02-09 14:57:08 +00:00
Kubernetes Publisher e67364c45a Merge pull request #115379 from artemvmin/serial-mkfs
Add an option to limit the number of concurrent mkfs calls

Kubernetes-commit: 6eb008620cd0ee3501326ee003d47fbaf1fa5b52
2023-02-07 05:54:29 +00:00
Artem Minyaylov 74a067ea6e Update k8s.io/utils to latest version
Update all usages of FakeExec to pointer to avoid copying the mutex

Kubernetes-commit: f573e149423dc578284789fdff8eeb3c195b5ccf
2023-02-03 14:51:25 -08:00
Kubernetes Publisher 4a582d37a9 Merge pull request #115485 from SergeyKanzhelev/epmeneralContainersQoS
small comment the ephemeral containers are not accounted for the QoS …

Kubernetes-commit: c34ddb5054e50a39e75cfc2eb7c5ca4a2145f6e6
2023-02-03 17:42:27 +00:00
Sergey Kanzhelev 8890f6a4d9 small comment the ephemeral containers are not accounted for the QoS calculation
Kubernetes-commit: b517d640a418f30dbc3c5bd5eb4fe5e8e26ab231
2023-02-02 18:21:39 +00:00
Kubernetes Publisher 1126105b03 Merge pull request #115266 from pohly/gomega-update
dependencies: update gomega to v1.26.0

Kubernetes-commit: 6d17cb2051b3a9958ed3353df242312d85e75d43
2023-01-30 21:50:16 +00:00
Kubernetes Publisher 1683b2d704 Merge pull request #108835 from guettli/patch-2
Extend example to contain --as=...

Kubernetes-commit: 4198d66457d5147ff717bf4beae52c0ec8a5f7cf
2023-01-30 17:47:54 +00:00
Thomas Guettler b7f6852b36 Extend example to contain --as==...
Kubernetes-commit: 2b980b8c01dfa17c08a4357b185b684bf69aa86f
2023-01-29 19:39:58 +01:00
Kubernetes Publisher 3ec401449e Merge pull request #114550 from alexzielenski/apiserver/smd/update-kube-openapi
update kube-openapi dependency

Kubernetes-commit: df03edaf755f71a61f4f817ca374ebe3b6416270
2023-01-25 05:50:40 +00:00
Alexander Zielenski 3c71e2f30f update kube-openapi
Kubernetes-commit: 7641ff75412c1d8b547c4fa388d3901aeeda6948
2023-01-23 15:32:33 -08:00
Patrick Ohly 116ace9325 dependencies: update gomega to v1.26.0
If gomega.Eventually/Consistently run into a situation where it observes some
state of e.g. a pod which does not satisfy the condition and then further
polling fails with API server errors, gomega will report both the most recent
pod state and API error instead of just the API error.

Kubernetes-commit: aa1279b5eb79177f5351368d8d9159982b1bfb5e
2023-01-23 15:19:38 +01:00
Kubernetes Publisher e5d82f5403 Merge pull request #114976 from kidddddddddddddddddddddd/python3
use python3 in hack

Kubernetes-commit: 6b55f097bb2140381a58312aeede37fc76a0762e
2023-01-19 17:38:45 +00:00
Kubernetes Publisher c960e25eb9 Merge pull request #114936 from seans3/openapi-validation-refactor
Refactor validation files into pkg/validation

Kubernetes-commit: c02b7e7a819b76f1f509856b4094d2dbc25ce56c
2023-01-19 17:38:44 +00:00
Kubernetes Publisher 248be67094 Merge pull request #113637 from mikedanese/http-proxy
switch spdy round trip tests to simple http proxy

Kubernetes-commit: 0acf6dbf7c094b71291b9fd7f78d5385565aa97c
2023-01-19 02:56:04 +00:00
kidddddddddddddddddddddd 8052841e39 use python3 in hack
Kubernetes-commit: cb6a1886c0b662978a5830d9eea56efb75eaa37b
2023-01-11 11:45:42 +08:00
Sean Sullivan fca10494ce Refactor validation files into openapi/validation
Kubernetes-commit: 84b226409aa656fbacdcd633807dd0b04d1fb34e
2023-01-09 15:59:41 -08:00
Mike Danese 18431dbb90 vendor: removed unused dep github.com/elazarl/goproxy
Kubernetes-commit: f61c4245c18724dcac88f0ad9f347e82bbb57cd7
2022-11-04 22:14:46 +00:00
Kubernetes Publisher 11b7602e84 Merge pull request #115129 from liggitt/gotools-1.20
bump honnef.co/go/tools to support go1.20

Kubernetes-commit: 106332252bdfa3a4e4ce7e01a3f389a0bb99d06a
2023-01-18 09:08:42 +00:00
Kubernetes Publisher d3c91c0f82 Merge pull request #114542 from pacoxu/EphemeralContainers
cleanup: EphemeralContainers feature gate related codes

Kubernetes-commit: c913e6ce62d23b19eebec9beda91d7599bf5099b
2023-01-17 21:25:26 +00:00
Jordan Liggitt 0279964d09 Fix shadowing lint error
Kubernetes-commit: 7a41b950cc00ee129b82e4a64d845e8d559d28ff
2023-01-17 12:09:24 -05:00
Kubernetes Publisher 88d8e6045f Merge pull request #114886 from a7i/kubectl-hpa-v2
kubectl: use autoscaling v2 for hpa

Kubernetes-commit: 1b95370225f1971c9e13beee24129d3191b0b3a8
2023-01-17 15:15:08 +00:00
Kubernetes Publisher 5a17509328 Merge pull request #114883 from bobbypage/cadvisor_v047
deps: Bump cAdvisor to v0.47.1

Kubernetes-commit: 3e049c5e689f0b811329e0e3d23ac2007076d1e9
2023-01-12 22:19:26 +00:00
Kubernetes Publisher b52c0622a1 Merge pull request #114766 from MadhavJivrajani/prepare-for-go1.20
[Prepare for go1.20] *: Bump versions and fix tests

Kubernetes-commit: 4802d7bb62c2623be8e4f940f6b5c1fcddd6c744
2023-01-12 22:19:25 +00:00
David Porter e379bc403b deps: Bump to cAdvisor v0.47.1
Signed-off-by: David Porter <david@porter.me>

Kubernetes-commit: 761dd3640e4e11741c342fcf5fc869e09901cdb1
2023-01-11 16:05:25 -08:00
Amir Alavi 749342438f kubectl: use v2 for hpa
Signed-off-by: Amir Alavi <amiralavi7@gmail.com>

Kubernetes-commit: 69b853fa308cb7cb40486a733626d4344ab1be85
2023-01-06 23:45:54 -05:00
Madhav Jivrajani 0681191ccb *: Bump version of vmware/govmomi
Bumping version to include changes that
better handle TLS errors. Bump nescessary
to prepare for when the version of Go is
bumped to 1.20

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>

Kubernetes-commit: 8b064fa4be71b5f1b498fabb5caade3c57f5d434
2023-01-02 20:56:02 +05:30
Kubernetes Publisher d3b5f30a11 Merge pull request #114879 from olivierlemasle/bump-kube-openapi
Bump kube-openapi

Kubernetes-commit: 8fdaac238e4f7f560066ea3a324cdbcaae564ac9
2023-01-12 05:43:22 +00:00
Kubernetes Publisher 24dff13e8d Merge pull request #113467 from pacoxu/psp-cleanup
Remove PodSecurityPolicy related code except client-go & API type

Kubernetes-commit: 08d9a0ef5b3b30952a558786e4b6e360701a16c6
2023-01-12 05:43:17 +00:00
Kubernetes Publisher cefb7e3401 Merge pull request #114972 from seans3/remove-openapi-printing
Removes deprecated kubectl openapi column printing

Kubernetes-commit: cfa6ad50e61afe7538525b59fdaa93807055afe4
2023-01-11 10:20:42 +00:00
Kubernetes Publisher f786078096 Merge pull request #114938 from seans3/patcher-remove-kube-openapi
Removes kube-openapi dependency from Patcher

Kubernetes-commit: 990b2f86fa410a22c6ce42f4b5249281b6cf3f66
2023-01-11 10:20:36 +00:00
Kubernetes Publisher 28b54d59dc Merge pull request #114859 from pohly/e2e-ginkgo-spec-ordering
dependencies: update ginkgo to v2.7.0

Kubernetes-commit: a11ad04564f05e5d7e2d5a3f421ec5a45b6807c5
2023-01-11 02:28:50 +00:00
Sean Sullivan 072ad05626 Removes deprecated kubectl openapi column printing
Kubernetes-commit: 2f184814b89a4bfa482b8572e98e969681e2f64c
2023-01-10 15:30:04 -08:00
Kubernetes Publisher ca8dddc982 Merge pull request #114937 from seans3/export-delete-option
Exports WarningPrinter field in DeleteOptions

Kubernetes-commit: 5cbd6960c805c22e1c741dde3ce9f2e10f869bce
2023-01-10 20:30:51 +00:00
Kubernetes Publisher 3612c18ed8 Merge pull request #114863 from danlenar/master
Use label selector for filtering out resources when pruning for kubectl diff.

Kubernetes-commit: 3742d14998fc41dd8c086e8d44cf6b50023c831e
2023-01-10 10:00:31 +00:00
Sean Sullivan 99206f74b9 Removes kube-openapi dependency from Patcher
Kubernetes-commit: 34aa661eed606fd049f79a12ab3344f5093811fa
2023-01-09 19:13:30 -08:00
Sean Sullivan d545780f6d Exports WarningPrinter field in DeleteOptions
Kubernetes-commit: 75ff830ab198348b0c727d05e54754d5f73a7286
2023-01-09 17:14:16 -08:00
Olivier Lemasle a1f24eef64 Bump kube-openapi
Kubernetes-commit: 8b8e20fcdbbeeb4520995e4f7c6a003a33062dd2
2023-01-09 20:41:41 +01:00
Kubernetes Publisher c522f5e5e3 Merge pull request #114869 from liggitt/kube-openapi
bump kube-openapi

Kubernetes-commit: 0e49c542d7a73dd056f8f32f33939207dd009b14
2023-01-07 09:42:13 +00:00
Jordan Liggitt 16836e0dc3 bump kube-openapi
Kubernetes-commit: d78de56d769ee9bd2193ccadbac5621d4a0ae89d
2023-01-06 12:21:58 -05:00
Kubernetes Publisher ca101725ec Merge pull request #114829 from liggitt/oauth-revert
Revert "bump golang.org/x/oauth2"

Kubernetes-commit: 293bf70916de8ef61d5f868f53959f1e15b3e091
2023-01-07 09:42:11 +00:00
Kubernetes Publisher 2a579a1f15 Merge pull request #113348 from seans3/prune-ssa-fix
Disallow prune for server-side applied objects

Kubernetes-commit: 4e800983fb8da4a5960a58ad9b380484770647d1
2023-01-07 09:42:07 +00:00
Kubernetes Publisher b46583a036 Merge pull request #114822 from liggitt/oauth2
bump golang.org/x/oauth2

Kubernetes-commit: 4e785dc7e3ac1d01cedd23a0ed9c4a67dc9c214f
2023-01-07 09:42:05 +00:00
Patrick Ohly c87170eaaf dependencies: update ginkgo to v2.7.0
The new ginkgo release adds sorting of specs. This was triggered by
the observation that parallel test execution of Kubernetes E2E tests
sometimes ran the same spec twice and (presumably) other specs not at all
because spec order was random due to iteration over a map.

Sorting should avoid that problem.

Kubernetes-commit: baf832d80d798d53ceb7d4de3a39330c6eda5c6a
2023-01-05 21:19:14 +01:00
Daniel Lenar 5c8d4bb380 Use label selector for filtering out resources when pruning.
Matches same behavior as for kubectl apply

Signed-off-by: Daniel Lenar <dlenar@vailsys.com>

Kubernetes-commit: d53af227870a8e4434a0bf2f58770ec4dbec241f
2023-01-05 13:55:39 -06:00
Jordan Liggitt 742d1a419b Revert "bump golang.org/x/oauth2"
This reverts commit fc9a140badf29382c1396b7de4813849d6f3e3c9.

Kubernetes-commit: 9f07c8e346fef454942d205f2702885475c7fc9a
2023-01-04 17:58:08 -05:00
Jordan Liggitt 7b6a31c792 bump golang.org/x/oauth2
Kubernetes-commit: fc9a140badf29382c1396b7de4813849d6f3e3c9
2023-01-04 11:16:43 -05:00
Kubernetes Publisher d12abaf134 Merge pull request #114030 from lauchokyip/fixApply
Removed factory from apply command flag struct

Kubernetes-commit: a4deb20a1d82a17e5c2d83108bc4cc6734a01678
2022-12-23 22:30:22 +00:00
Kubernetes Publisher 0fa7bd37c4 Merge pull request #113538 from pohly/e2e-ginkgo-timeline
e2e: ginkgo timeline

Kubernetes-commit: 020fb2eb776c0affad3a9ff7dd21ba231e6c646d
2022-12-23 08:16:07 +00:00