Commit Graph

18303 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
6df64241d0 Merge pull request #116598 from natasha41575/updateKustV5
Update kubectl kustomize to kyaml/v0.14.1, cmd/config/v0.11.1, api/v0…
2023-03-14 17:44:55 -07:00
Kubernetes Prow Robot
f22504a9ba Merge pull request #116539 from pohly/ginkgo-gomega-update
dependencies: ginkgo v2.9.1, gomega v1.27.3
2023-03-14 17:44:40 -07:00
Kubernetes Prow Robot
52559dc6fb Merge pull request #116536 from alexanderConstantinescu/pr-115204-followup
[KCCM] service controller - #115204 follow-up
2023-03-14 17:44:33 -07:00
Kubernetes Prow Robot
2467eb8a7b Merge pull request #116345 from aramase/aramase/f/kms_cache_key
[KMSv2] use encDEK, keyID and annotations to generate cache key
2023-03-14 17:44:25 -07:00
Kubernetes Prow Robot
f3aebc85b9 Merge pull request #114930 from kannon92/add-new-labels
Add batch.kubernetes.io to labels created in the Job controller.
2023-03-14 17:44:13 -07:00
Kubernetes Prow Robot
9c1d73bfd6 Merge pull request #116581 from humblec/csiNodeExpand
Update NodeExpandSecretRef comment for beta
2023-03-14 16:34:56 -07:00
Kubernetes Prow Robot
f7bcff44cd Merge pull request #116425 from jsafrane/flip-selinux
Flip SELinuxMountReadWriteOncePod to Beta
2023-03-14 16:34:41 -07:00
Kubernetes Prow Robot
1586138519 Merge pull request #115750 from saschagrunert/otel-beta
Graduate `KubeletTracing` feature to beta
2023-03-14 16:34:33 -07:00
Kubernetes Prow Robot
98b1980a42 Merge pull request #114242 from austince/feat/per-queue-metrics
Allow setting per-workqueue metrics providers
2023-03-14 16:34:26 -07:00
Kubernetes Prow Robot
5469b170fe Merge pull request #107826 from smarterclayton/context_wait
wait: Introduce new methods that allow detection of context cancellation
2023-03-14 16:34:14 -07:00
Kubernetes Prow Robot
a9fd6dfc73 Merge pull request #116603 from seans3/discovery-resilience
Aggregated discovery client resilient to nil GVK in response
2023-03-14 15:14:42 -07:00
Kubernetes Prow Robot
fbfc887a09 Merge pull request #116556 from pohly/dra-podschedulingcontext
dra: PodScheduling -> PodSchedulingContext
2023-03-14 15:14:34 -07:00
Kubernetes Prow Robot
900278dd41 Merge pull request #116390 from alexzielenski/kubectl/explain/openapiv3/on-by-default
kubectl explain: use openapiv3 by default
2023-03-14 15:14:26 -07:00
Kubernetes Prow Robot
715e957084 Merge pull request #115374 from pacoxu/add-net.ipv4.ip_local_reserved_ports
add net.ipv4.ip_local_reserved_ports to safe sysctls
2023-03-14 15:14:14 -07:00
Patrick Ohly
fe59e091eb dependencies: ginkgo v2.9.1, gomega v1.27.4
They contain some nice-to-have improvements (for example, better printing of
errors with gomega/format.Object) but nothing that is critical right now.

"go mod tidy" was run manually in
staging/src/k8s.io/kms/internal/plugins/mock (https://github.com/kubernetes/kubernetes/pull/116613
not merged yet).
2023-03-14 22:26:27 +01:00
Anish Ramasekar
8eacf09649 [KMSv2] use encDEK, keyID and annotations to generate cache key
It is possible for a KMSv2 plugin to return a static value as Ciphertext
and store the actual encrypted DEK in the annotations. In this case,
using the encDEK will not work. Instead, we are now using a combination
of the encDEK, keyID and annotations to generate the cache key.

Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2023-03-14 21:24:44 +00:00
Kubernetes Prow Robot
3c6ad6df1d Merge pull request #116580 from justinsb/applyset_refactor
kubectl prunev2: Refactor the applyset to be more reusable
2023-03-14 14:13:26 -07:00
Kubernetes Prow Robot
a99779eb63 Merge pull request #116579 from justinsb/kubectl_diff_split_tracker_from_prune
kubectl diff: refactor tracker into a separate type
2023-03-14 14:13:19 -07:00
Kubernetes Prow Robot
f2e1a67c05 Merge pull request #116535 from denkensk/fix-match
feat: forbid to set matchLabelKeys when labelSelector isn’t set in topologySpreadConstraints
2023-03-14 14:13:04 -07:00
Kubernetes Prow Robot
c0ef73222f Merge pull request #116522 from robscott/topology-1-27-updates
Introducing Topology Mode Annotation, Deprecating Topology Hints Annotation
2023-03-14 14:12:48 -07:00
Kubernetes Prow Robot
83cd5ec710 Merge pull request #115935 from enj/enj/i/unsafe_str_byte
token/cache: use go 1.20's approach for no-copy string/bytes conversions
2023-03-14 14:12:33 -07:00
Kubernetes Prow Robot
28fa3cbbf1 Merge pull request #115847 from moshe010/pod-resource-api-dra-upstream
Extend the PodResources API to include resources allocated by DRA
2023-03-14 14:12:26 -07:00
Kubernetes Prow Robot
89a9c0c8bb Merge pull request #96120 from LorbusChris/kubelet-journal-logs
KEP 2258: add node log query
2023-03-14 14:12:14 -07:00
Alexander Zielenski
0c0a91d4d9 throw missing field in std err 2023-03-14 12:47:08 -07:00
Kubernetes Prow Robot
9c2d28f7d5 Merge pull request #116595 from MadhavJivrajani/bump-kubectl-subresource-beta
kubectl: Change subresource flag to beta
2023-03-14 12:38:50 -07:00
Alexander Zielenski
180c312f31 log name of mising field, not path 2023-03-14 12:20:11 -07:00
Clayton Coleman
133dd61578 wait: Deprecate legacy Poll methods for new context aware methods
The Poll* methods predate context in Go, and the current implementation
will return ErrWaitTimeout even if the context is cancelled, which
prevents callers who are using Poll* from handling that error directly
(for instance, if you want to cancel a function in a controlled fashion
but still report cleanup errors to logs, you want to know the difference
between 'didn't cancel', 'cancelled cleanly', and 'hit an error).

This commit adds two new methods that reflect how modern Go uses
context in polling while preserving all Kubernetes-specific behavior:

	PollUntilContextCancel
	PollUntilContextTimeout

These methods can be used for infinite polling (normal context),
timed polling (deadline context), and cancellable poll (cancel context).
All other Poll/Wait methods are marked as deprecated for removal in
the future. The ErrWaitTimeout error will no longer be returned from the
Poll* methods, but will continue to be returned from ExponentialBackoff*.
Users updating to use these new methods are responsible for converting
their error handling as appropriate. A convenience helper
`Interrupted(err) bool` has been added that should be used instead of
checking `err == ErrWaitTimeout`. In a future release ErrWaitTimeout will
be made private to prevent incorrect use. The helper can be used with all
polling methods since context cancellation and deadline are semantically
equivalent to ErrWaitTimeout. A new `ErrorInterrupted(cause error)` method
should be used instead of returning ErrWaitTimeout in custom code.

The convenience method PollUntilContextTimeout is added because deadline
context creation is verbose and the cancel function must be called to
properly cleanup the context - many of the current poll users would see
code sizes increase. To reduce the overall method surface area, the
distinction between PollImmediate and Poll has been reduced to a single
boolean on PollUntilContextCancel so we do not need multiple helper methods.

The existing methods were not altered because ecosystem callers have been
observed to use ErrWaitTimeout to mean "any error that my condition func
did not return" which prevents cancellation errors from being returned
from the existing methods. Callers must make a deliberate migration.

Callers migrating to `PollWithContextCancel` should:

1. Pass a context with a deadline or timeout if they were previously using
	`Poll*Until*` and check `err` for `context.DeadlineExceeded` instead of
	`ErrWaitTimeout` (more specific) or use `Interrupted(err)` for a generic
	check.
2. Callers that were waiting forever or for context cancellation should
	ensure they are checking `context.Canceled` instead of `ErrWaitTimeout`
	to detect when the poll was stopped early.

Callers of `ExponentialBackoffWithContext` should use `Interrupted(err)`
instead of directly checking `err == ErrWaitTimeout`. No other changes are
needed.

Code that returns `ErrWaitTimeout` should instead define a local cause
and return `wait.ErrorInterrupted(cause)`, which will be recognized by
`wait.Interrupted()`. If nil is passed the previous message will be used
but clients are highly recommended to use typed checks vs message checks.

As a consequence of this change the new methods are more efficient - Poll
uses one less goroutine.
2023-03-14 13:14:11 -06:00
Sean Sullivan
26bf8a7ceb Aggregated discovery resilient to nil GVK 2023-03-14 18:50:06 +00:00
Alexander Zielenski
636c259474 use referred type's type when it is not an object
i think we should also do this when it has no GVK? objects with no GVK cant be explained
2023-03-14 11:20:16 -07:00
justinsb
d016fdcc83 kubectl prunev2: Refactor the applyset to be more reusable
This enables sharing with diff.
2023-03-14 17:56:47 +00:00
Jan Safranek
58c4ead0ad Add featureGate to CSIDriver.SELinuxMount 2023-03-14 18:47:17 +01:00
Kubernetes Prow Robot
6a111bebe2 Merge pull request #116377 from kinvolk/rata/userns
KEP-127: user namespace support for stateless pods
2023-03-14 10:40:43 -07:00
Kubernetes Prow Robot
480a0c2c36 Merge pull request #116353 from KnVerey/applyset-crd-parents
ApplySet: allow custom resources to be parent objects
2023-03-14 10:40:36 -07:00
Kubernetes Prow Robot
4950f51903 Merge pull request #116155 from enj/enj/f/dek_reuse
kmsv2: re-use DEK while key ID is unchanged
2023-03-14 10:40:28 -07:00
Moshe Levi
2a568bcfc8 kubelet podresources: extend List to support Dynamic Resources and implement Get API
Signed-off-by: Moshe Levi <moshele@nvidia.com>
2023-03-14 19:33:04 +02:00
natasha41575
09e6e4db1d Update kubectl kustomize to kyaml/v0.14.1, cmd/config/v0.11.1, api/v0.13.2, kustomize/v5.0.1 2023-03-14 11:40:28 -05:00
Kubernetes Prow Robot
23023776b2 Merge pull request #110435 from haircommander/exec-sync-cve
cri-api: document expectation of 16 MB limit
2023-03-14 09:38:16 -07:00
Madhav Jivrajani
9fbd08e075 kubectl: Change subresource flag to beta
Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
2023-03-14 21:44:32 +05:30
Alex Wang
199c37acef feat: update matchLabelKeys comment and code auto-generate
Signed-off-by: Alex Wang <wangqingcan1990@gmail.com>
2023-03-14 23:51:50 +08:00
Aravindh Puthiyaparambil
aadad09410 api: Add EnableNodeLogQuery to KubeletConfiguration
Added EnableNodeLogQuery field to kubelet/apis/config/types.go and
staging/src/k8s.io/kubelet/config/v1beta1/types.go, then executed.
 `hack/update-codegen.sh`.

This new field will default to off and will need to be explicitly
enabled in addition to the NodeLogQuery gate to use the feature.
2023-03-14 08:45:19 -07:00
Katrina Verey
923d9b63fd Allow conformant CRDs to be ApplySet parents 2023-03-14 11:09:08 -04:00
Kubernetes Prow Robot
689fc37dd2 Merge pull request #112334 from dgrisonnet/fix-eventseries-count
Fix EventSeries starting count discrepancy
2023-03-14 07:28:16 -07:00
Monis Khan
832d6f0e19 kmsv2: re-use DEK while key ID is unchanged
This change updates KMS v2 to not create a new DEK for every
encryption.  Instead, we re-use the DEK while the key ID is stable.

Specifically:

We no longer use a random 12 byte nonce per encryption.  Instead, we
use both a random 4 byte nonce and an 8 byte nonce set via an atomic
counter.  Since each DEK is randomly generated and never re-used,
the combination of DEK and counter are always unique.  Thus there
can never be a nonce collision.  AES GCM strongly encourages the use
of a 12 byte nonce, hence the additional 4 byte random nonce.  We
could leave those 4 bytes set to all zeros, but there is no harm in
setting them to random data (it may help in some edge cases such as
live VM migration).

If the plugin is not healthy, the last DEK will be used for
encryption for up to three minutes (there is no difference on the
behavior of reads which have always used the DEK cache).  This will
reduce the impact of a short plugin outage while making it easy to
perform storage migration after a key ID change (i.e. simply wait
ten minutes after the key ID change before starting the migration).

The DEK rotation cycle is performed in sync with the KMS v2 status
poll thus we always have the correct information to determine if a
read is stale in regards to storage migration.

Signed-off-by: Monis Khan <mok@microsoft.com>
2023-03-14 10:23:50 -04:00
Kubernetes Prow Robot
fcf5d23e68 Merge pull request #96275 from swatisehgal/noderesourcetopology
Remove NodeResourceTopology API from staging
2023-03-14 06:00:17 -07:00
Humble Chirammal
92f59b6323 Update NodeExpandSecretRef comment for beta
Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>
2023-03-14 17:57:24 +05:30
justinsb
9c5c8b243d kubectl diff: refactor tracker into a separate type
This means that we can reuse the logic even if we swap out the pruner.
2023-03-14 12:06:44 +00:00
Swati Sehgal
126e184bc8 noderesourcetopology: remove reference to NRT-API in README.
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-03-14 17:34:07 +05:30
Katrina Verey
6a31757f45 Applyset dry run tests + ID value (#116265)
* Test for ApplySet with --dry-run=client|server

* Use the real format for ApplySet ID

* Incorporate feedback

* Adjustments from rebase
2023-03-14 04:46:16 -07:00
Swati Sehgal
76d9b8dd87 noderesourcetopology-api: Remove nrt from publishing-bot rules.yaml
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-03-14 15:13:35 +05:30
Patrick Ohly
2b8a4e8097 api: generated files for PodSchedulingContext 2023-03-14 10:18:08 +01:00