Commit Graph

113685 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
161b00c639
Merge pull request #115617 from cyclinder/cyclinder1
close grpc server in test file to avoid goroutine leak
2023-02-10 07:39:30 -08:00
Kubernetes Prow Robot
70dde8d746
Merge pull request #111453 from ardaguclu/debug-support-files
(kubectl debug): Support debugging via files
2023-02-10 03:43:30 -08:00
Arda Güçlü
c40f9f8bbb Add explicitNamespace into ignore list in debug unit tests
Since, `explicitNamespace` is set by kubeconfig automatically, we can
safely add this field into ignore list.
2023-02-10 11:31:19 +03:00
Arda Güçlü
e0fedec69d (kubectl debug): Support debugging via files
Currently `kubectl debug` only supports passing names in command line.
However, users might want to pass resources in files by passing `-f` flag like
in all other kubectl commands.

This PR adds this ability.
2023-02-10 10:21:30 +03:00
Kubernetes Prow Robot
d2f40481d1
Merge pull request #115669 from aramase/aramase/f/structured_logging_check_kms
logcheck.conf: ensure that kms and value/encrypt uses structured logging
2023-02-09 20:37:46 -08:00
Kubernetes Prow Robot
2c37b470b3
Merge pull request #113794 from littlejiancc/feature_stateful_cleanup
Simplify case conditions
2023-02-09 20:37:39 -08:00
Kubernetes Prow Robot
b2f8c8f00d
Merge pull request #115635 from bobbypage/npd-time-fix
test: Simplify NPD start timestamp calculation
2023-02-09 18:37:31 -08:00
Anish Ramasekar
b6b00e65bc
logcheck.conf: ensure that kms and value/encrypt uses structured logging
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2023-02-10 02:28:39 +00:00
cyclinder
1bdcd18bf6 close grpc server in test file to avoid goroutine leak
Signed-off-by: cyclinder <kuocyclinder@gmail.com>
2023-02-10 09:51:26 +08:00
Kubernetes Prow Robot
de4260fd65
Merge pull request #115667 from aramase/aramase/f/structured_logging
[KMS] Use structured logging in value/encrypt
2023-02-09 17:02:46 -08:00
Anish Ramasekar
6db7496db6
[KMS] Use structured logging in value/encrypt
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2023-02-09 23:57:07 +00:00
Kubernetes Prow Robot
9a51625ebe
Merge pull request #115665 from aramase/aramase/f/update_vendor_k8s_utils
Update k8s.io/utils to `a36077c30491`
2023-02-09 15:50:53 -08:00
Kubernetes Prow Robot
0698d9eb82
Merge pull request #115649 from aramase/grpc-metrics
[KMSv2] Add metrics for grpc service
2023-02-09 15:50:45 -08:00
Kubernetes Prow Robot
6e2e61bb3c
Merge pull request #115657 from saschagrunert/inject-base64
Allow SSH e2e node base64 key injection
2023-02-09 14:45:06 -08:00
Kubernetes Prow Robot
e476c88ca8
Merge pull request #115350 from aramase/kmsv2/cache-sha256
[KMSv2] store hash of encrypted DEK as key in cache
2023-02-09 14:44:55 -08:00
Kubernetes Prow Robot
95c65ca3a0
Merge pull request #115454 from dgrisonnet/promote-pod-resource-metrics
Promote pod resource metrics to stable
2023-02-09 12:36:16 -08:00
Anish Ramasekar
09e02052fd
Update k8s.io/utils to a36077c30491
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2023-02-09 20:09:41 +00:00
Damien Grisonnet
49da8a1d4a scheduler: promote pod resource metrics to stable
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2023-02-09 20:30:45 +01:00
Anish Ramasekar
de3b2d525b
[KMSv2] Add metrics for grpc service
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2023-02-09 18:51:37 +00:00
Anish Ramasekar
f72cf5c510
[KMSv2] store hash of encrypted DEK as key in cache
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2023-02-09 17:26:27 +00:00
Shang Jian Ding
d35da348c6
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>
2023-02-09 09:18:22 -08:00
Sascha Grunert
85106dc327
Allow SSH e2e node base64 key injection
With the change of the CRI-O jobs to use butane, we now have a
verification for base64 data urls in place. This means that the
following URL is invalid:

```
data:text/plain;base64,GCE_SSH_PUBLIC_KEY_FILE_CONTENT
```

This means we have to pass valid base64 to the URL. To fix that, we now
allow to inject SSH key values with both, the
`GCE_SSH_PUBLIC_KEY_FILE_CONTENT` field and its base64 encoded variant.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2023-02-09 16:17:11 +01:00
Kubernetes Prow Robot
05f451b58f
Merge pull request #115645 from vaibhav2107/test-registry
Updated the change in registry
2023-02-09 04:56:24 -08:00
Kubernetes Prow Robot
19eddfc567
Merge pull request #110953 from Abirdcfly/220705
cleanup kubectl describe cronjob v1beta1 in 1.26
2023-02-09 02:40:24 -08:00
vaibhav2107
6ab8a8fbec Updated the change in registry 2023-02-09 09:37:44 +05:30
Kubernetes Prow Robot
119dc95369
Merge pull request #114472 from danwinship/kep-3178-to-beta
update IPTablesOwnershipCleanup to beta
2023-02-08 19:44:35 -08:00
Kubernetes Prow Robot
9b09d0600a
Merge pull request #115569 from Huang-Wei/psr-unconditional-validation
Enforce nodeName cannot be set along with non-empty schedulingGates
2023-02-08 16:16:47 -08:00
David Porter
7fe371a974 test: Simplify NPD start timestamp calculation
The NPD test checks when NPD started to determine if it is needed to
check the kubelet start event. The current logic requires parsing the
journalctl logs which is quite fragile and is broken now because of
systemd changing the expected log format.

Newer versions of systemd do not print "end at" or "logs begin at" and
instead may print "No entries", which will result in the test panicking.

```
$ journalctl -u foo.service
-- No entries --
```

For units started, it will not print "end at" or "logs begin at":

```
root@ubuntu-jammy:~# journalctl -u foo.service
Feb 08 22:02:19 ubuntu-jammy systemd[1]: Started /usr/bin/sleep 1s.
Feb 08 22:02:20 ubuntu-jammy systemd[1]: foo.service: Deactivated successfully.
```

To avoid relying on log parsing which is fragile, let's instead directly
ask systemd when the NPD service started and parse the resulting
timestamp.

Signed-off-by: David Porter <david@porter.me>
2023-02-08 13:58:45 -08:00
Kubernetes Prow Robot
468ce59183
Merge pull request #115557 from MikeSpreitzer/cleanup-path-hack
Simplify construction of /metrics request
2023-02-08 09:28:58 -08:00
Dan Winship
1e8cc4b4a1 update IPTablesOwnershipCleanup to beta 2023-02-08 08:26:10 -05:00
Kubernetes Prow Robot
b0171f77f6
Merge pull request #115514 from pohly/event-broadcaster-shutdown
client-go: don't wait too long after EventBroadcaster.Shutdown
2023-02-08 04:38:58 -08:00
Kubernetes Prow Robot
b7ad17978e
Merge pull request #115601 from mattcary/no-lssd-test
Remove obsolete GKE local SSD test
2023-02-07 18:36:58 -08:00
Matthew Cary
69808b74ec Remove obsolete GKE local SSD test
Change-Id: I156bd03ac740c2ebe394081d3106851f7182269f
2023-02-07 17:33:32 -08:00
Kubernetes Prow Robot
afee91ff65
Merge pull request #115597 from Riaankl/remove-four-csidrive-endpoints
Remove 4 CSIDriver endpoints with conformance test from the Ineligible endpoint list
2023-02-07 16:06:59 -08:00
Riaan Kleinhans
999e9f14f7
remove conformance tested endpoints 2023-02-08 11:55:44 +13:00
Wei Huang
feed8c683d
Enforce nodeName cannot be set along with non empty schedulingGates 2023-02-07 13:53:28 -08:00
Kubernetes Prow Robot
dfb976e25a
Merge pull request #114376 from baomingwang/serialization-error-metric
Added serialization from etcd error metric
2023-02-07 13:46:59 -08:00
Kubernetes Prow Robot
e4c8802407
Merge pull request #115577 from princepereira/ppereira-kubeproxy-ipv6-ut
[#115501] Unit testcase for the fix for issue with missing Loadbalancer policies for IPV6 endpoints in Dualstack mode.
2023-02-07 12:11:00 -08:00
Kubernetes Prow Robot
5437d493da
Merge pull request #114364 from bart0sh/PR102-prepare-DRA-resources-before-CNI-setup
kubelet: prepare DRA resources before CNI setup
2023-02-07 08:09:04 -08:00
Kubernetes Prow Robot
090025f5e6
Merge pull request #115548 from pohly/e2e-wait-for-pods-with-gomega
e2e: wait for pods with gomega, II
2023-02-07 07:01:21 -08:00
Kubernetes Prow Robot
22b88dea36
Merge pull request #115315 from enj/enj/i/kas_kubelet_conn_close
kubelet/client: collapse transport wiring onto standard approach
2023-02-07 07:01:14 -08:00
Kubernetes Prow Robot
b30ff25fdb
Merge pull request #112662 from Iceber/fix_sample_apiserver_readme
sample-apiserver: create the client cert with SHA256
2023-02-07 07:01:01 -08:00
Kubernetes Prow Robot
4f321041bd
Merge pull request #115537 from MadhavJivrajani/bump-tools-deps-go120
*: Bump golangci-lint version and adapt to new linters
2023-02-07 05:53:12 -08:00
Kubernetes Prow Robot
4b0d433dd9
Merge pull request #115536 from pwschuurman/kep-3335-enable-disable-unit-test
Add enablement/disablement unit test for StatefulSetStartOrdinal feature
2023-02-07 05:53:00 -08:00
Kubernetes Prow Robot
fc002b2f07
Merge pull request #115529 from aojea/ipam_reconile
replace nodeipam custom logic by  a workqueue
2023-02-07 03:33:00 -08:00
Prince Pereira
83e9565dc6 [#115501] Unit testcase for the fix for issue with missing Loadbalancer policies for IPV6 endpoints in Dualstack mode. 2023-02-07 16:13:14 +05:30
Kubernetes Prow Robot
8e20effbb7
Merge pull request #114695 from chendave/fix_cross_move
kubeadm: backup kubelet config for "upgrade node" and "upgrade apply"
2023-02-07 02:18:58 -08:00
Madhav Jivrajani
5e1f440d0a *: Fix linter warnings
Adapt to newly improved linters in golangci-lint v1.51.1

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
2023-02-07 13:01:41 +05:30
Kubernetes Prow Robot
e944fc28ca
Merge pull request #115443 from torredil/master
Add windows nodeSelector to e2e storage testing pods
2023-02-06 18:27:09 -08:00
Kubernetes Prow Robot
6eb008620c
Merge pull request #115379 from artemvmin/serial-mkfs
Add an option to limit the number of concurrent mkfs calls
2023-02-06 18:26:58 -08:00