Commit Graph

47015 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
f44d561c1f
Merge pull request #115075 from aojea/ipaddress
IPAddress allocator
2023-03-14 19:26:13 -07:00
kidddddddddddddddddddddd
ac626f8abc remove test in strategy_test 2023-03-15 09:47:10 +08: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
f315a4669a
Merge pull request #116576 from pohly/dra-core-validation
api: extend validation of dynamic resource allocation fields in PodSpec
2023-03-14 16:34:48 -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
Nick Turner
86f4136003 Webhook framework for cloud controller manager
Provides framework for CCMs to host webhooks.
2023-03-14 23:28:05 +00:00
Kevin Klues
579295e727 Update kubeletplugin API for DynamicResourceAllocation to v1alpha2
This PR makes the NodePrepareResources() and NodeUnprepareResource()
calls of the kubeletplugin API for DynamicResourceAllocation
symmetrical. It wasn't clear how one would use the set of CDIDevices
passed back in the NodeUnprepareResource() of the v1alpha1 API, and the
new API now passes back the full ResourceHandle that was originally
passed to the Prepare() call. Passing the ResourceHandle is strictly
more informative and a plugin could always (re)derive the set of
CDIDevice from it.

This is a breaking change, but this release is scheduled to break
multiple APIs for DynamicResourceAllocation, so it makes sense to do
this now instead of later.

Signed-off-by: Kevin Klues <kklues@nvidia.com>
2023-03-14 23:09:44 +00:00
Antonio Ojea
ba42ed9a49 make update
Change-Id: I19e12ca05d977dca63043cb07ecf8a90e0e525c5
2023-03-14 22:58:12 +00:00
Antonio Ojea
756f1bfe99 add repair loop
Change-Id: I63464bdd5db706ddf7dc5d828b8d03ad532d7981
2023-03-14 22:58:11 +00:00
Antonio Ojea
b2c8190ee7 allow to set the service reference on the allocator 2023-03-14 22:58:11 +00:00
Antonio Ojea
e6f197a991 plumb new ipallocators in the apiserver
plumb the new allocators from the control-plane instance to the
registry_core

Change-Id: I240cc91942260f725492597f1b599f7480560b1e
2023-03-14 22:58:11 +00:00
Antonio Ojea
b022475448 clusterip allocator based on IPAddress API
add a new ClusterIP allocator that uses the new IPAddress API resource
and an informer as the backend, instead a bitmap snapshotted on etcd.

Change-Id: Ia891a2900acd2682d4d169abab65cdd9270a8445
2023-03-14 22:58:11 +00:00
Antonio Ojea
aa18a0cd3f enable IPAddress on storage
Change-Id: Iaeac050223bb7db6acba601aa9b7254c74f2b5d2
2023-03-14 22:58:11 +00:00
Antonio Ojea
a2dfbd6117 Add IPAddress API to the REST registry
ipaddress registry storage

don't generate names for ipaddress
2023-03-14 22:58:11 +00:00
Antonio Ojea
d9cc625538 add apis to apiserver storage
Change-Id: Iea1263ad612c13b93baf8a07641265bf56f08728
2023-03-14 22:58:11 +00:00
Antonio Ojea
befd131fa1 add feature gate
Add MultiCIDRServiceAllocator feature gate.
2023-03-14 22:58:11 +00:00
Antonio Ojea
d06dbadd14 IPAddress printers
Change-Id: I60f40f4fe20b3ebd61b8ee137e55bcdefc1f2c96
2023-03-14 22:58:07 +00:00
Antonio Ojea
c36562dfd7 IPAddress validation
Validate IPAddress name is in canonical format
Validate ParentRef is required, and Resource and Name.
Validate IPAddress is inmutable on update.
2023-03-14 22:56:44 +00:00
Antonio Ojea
036f57f3cb Add IPAddress API
Change-Id: I9cf710f011b58409ab880d3b2e7f841f228ee5ee
2023-03-14 22:56:44 +00:00
Moshe Levi
ffb07d1e78 kubelet dra: add lock to addCDIDevices
Signed-off-by: Moshe Levi <moshele@nvidia.com>
2023-03-15 00:50:45 +02:00
Kensei Nakada
543f15d10c HPA: expose the metrics "metric_computation_duration_seconds" and "metric_computation_total" from HPA controller 2023-03-14 22:47:24 +00:00
Kevin Klues
452f345c47 Update generated code for resource.k8s.io/v1alpha2
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2023-03-14 22:41:44 +00:00
Kevin Klues
74d634a028 Update kubelet support for recent changes to resource.k8s.io/v1alpha2
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2023-03-14 22:34:18 +00:00
Kevin Klues
da0b75f8f9 Update validation for recent changes to resource.k8s.io/v1alpha2
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2023-03-14 22:34:18 +00:00
Kevin Klues
53dda4ffe2 Update AllocationResult and ResourceHandle for resource.k8s.io/v1alpha2
This implements the change outlined in the following KEP update:
https://github.com/kubernetes/enhancements/pull/3802

Signed-off-by: Kevin Klues <kklues@nvidia.com>
2023-03-14 22:34:18 +00:00
Kubernetes Prow Robot
e8acfc45ba
Merge pull request #116610 from xing-yang/vSphere_lock
Lock CSIMigrationvSphere feature gate for k8s 1.27
2023-03-14 15:15:05 -07:00
Kubernetes Prow Robot
0e8eae6e35
Merge pull request #116607 from alculquicondor/optimize-spreading
Optimize topology spreading for null selector
2023-03-14 15:14:57 -07:00
Kubernetes Prow Robot
fae6f642a9
Merge pull request #116606 from SergeyKanzhelev/appaArmorNoReevaluation
AppArmor no reevaluation of host is needed
2023-03-14 15:14:49 -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
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
Claudiu Belu
f335812719 unittests: Fixes unit tests for Windows (part 5)
Currently, there are some unit tests that are failing on Windows due to
various reasons:

- getHostDNSConfig is reading a resolv.conf file. However, we don't have
  that on Windows. Instead, we can get the DNS server list and the DNS
  suffix list from Windows itself.

On Windows, getHostDNSConfig will now return the host's DNS configuration
if the given resolverConfig is "Host". If it's not "Host" or an empty string,
an error will be returned.

Based on the code from kubernetes/test/images/agnhost/dns/dns_windows.go
2023-03-14 22:11:29 +00:00
Kubernetes Prow Robot
34acfb877a
Merge pull request #116546 from marosset/winstats-10-seconds
Updating perfCounterUpdatePeriod for Windows to 10 seconds
2023-03-14 14:13:11 -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
27e23bad7d
Merge pull request #116529 from pohly/controllers-with-name
kube-controller-manager: convert to structured logging
2023-03-14 14:12:55 -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
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
vinay kulkarni
86efc8bd79 Add isInPlacePodVerticalScalingAllowed for restart check block 2023-03-14 20:30:02 +00:00
Kubernetes Prow Robot
c47d2ae648
Merge pull request #116561 from mattcary/ss-v1beta1-defaulter
StatefulSet v1beta1 defaulter tests
2023-03-14 12:38:34 -07:00
Kubernetes Prow Robot
1d830156c7
Merge pull request #115299 from danwinship/stale-conntrack-handling
clean up kube-proxy stale-conntrack-entry handling, revert broken code
2023-03-14 12:38:26 -07:00
Ziqi Zhao
d1aa73312c
pkg/controller/util support contextual logging (#115049)
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2023-03-14 12:38:14 -07:00
vinay kulkarni
5b2682ac04 Make in-place resize exclusion conditions (such as static pods) very obvious 2023-03-14 19:37:35 +00:00
xing-yang
223a7c5506 Remove the unit test to enable the feature gate
vSphere CSI Migration feature gate is locked now.
2023-03-14 19:32:21 +00:00
Aldo Culquicondor
3dae9ba6d6
Optimize topology spreading for null selector
Change-Id: I28f031a040b143fa9452b4400cc3ae85d58e572c
2023-03-14 15:01:59 -04:00
Sergey Kanzhelev
44159dfc32 AppArmor no reevaluation of host is needed 2023-03-14 18:35:01 +00:00
Patrick Ohly
99151c39b7 kube-controller-manager: convert to structured logging
Most of the individual controllers were already converted earlier. Some log
calls were missed or added and then not updated during a rebase. Some of those
get updated here to fill those gaps.

Adding of the name to the logger used by each controller gets
consolidated in this commit. By using the name under which the
controller is registered we ensure that the names in the log
are consistent.
2023-03-14 19:16:32 +01:00
Jan Safranek
58c4ead0ad Add featureGate to CSIDriver.SELinuxMount 2023-03-14 18:47:17 +01:00
Kubernetes Prow Robot
25edb4943a
Merge pull request #116465 from sourcelliu/nodeaffinity
Fix PreFilter logic problem in node affinity
2023-03-14 10:40:52 -07: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
49649c89ea
Merge pull request #113584 from yangjunmyfm192085/volume-contextual-logging
volume: use contextual logging
2023-03-14 10:40:16 -07:00
Moshe Levi
67a71c0bd7 kubelet podresources: add unit tests for DyanmicResource and Get method
Signed-off-by: Moshe Levi <moshele@nvidia.com>
2023-03-14 19:33:04 +02: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
Moshe Levi
9c57613912 Add ClassName to chekpoint state and in-memory cache
Signed-off-by: Moshe Levi <moshele@nvidia.com>
2023-03-14 19:33:04 +02:00
Moshe Levi
71d6e4d53c kubelet metrics: add pod resources get metrics
Signed-off-by: Moshe Levi <moshele@nvidia.com>
2023-03-14 19:33:03 +02:00
Moshe Levi
91234c701e kube features: add KubeletPodResourcesDynamicResources and KubeletPodResourcesGet
Signed-off-by: Moshe Levi <moshele@nvidia.com>
2023-03-14 19:33:03 +02:00
Francesco Romani
5e03998991 kubelet: podresources: pack parameters in a struct
To enable rate limiting, needed for GA graduation,
we need to pass more parameters to the already crowded
`ListenAndServePodresources` function.

To tidy up a bit, pack the parameters in a helper struct,
with no intended changes in behavior.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2023-03-14 19:33:01 +02:00
Humble Chirammal
0bdb2db18d update internal type of csiNodeExpand feature to beta
Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>
2023-03-14 22:12:17 +05:30
Kubernetes Prow Robot
e660a1702b
Merge pull request #116571 from mengjiao-liu/scheduler-plugins-defaultbinder
Migrate pkg/scheduler/framework/plugins/defaultbinder to contextual logging
2023-03-14 09:39:59 -07:00
Kubernetes Prow Robot
e192a7dbcc
Merge pull request #116330 from SataQiu/clean-kubelet-20230307
Followup 112643: remove residual code associated with DynamicKubeletConfig
2023-03-14 09:39:51 -07:00
Kensei Nakada
b49b34c03a
HPA: expose the metrics "reconciliations_total" and "reconciliation_duration_seconds" from HPA controller (#116010) 2023-03-14 09:39:42 -07:00
Kubernetes Prow Robot
cb5ad1e044
Merge pull request #115576 from silenceshell/fix-fake-os-files-concurrent-map-write
fix concurrent-map-write of FakeOS.Create
2023-03-14 09:39:26 -07:00
Kubernetes Prow Robot
8bf7805e05
Merge pull request #115397 from sourcelliu/boottime
Add test for pkg/kubelet/util
2023-03-14 09:39:18 -07:00
Kubernetes Prow Robot
af97bb9ac5
Merge pull request #115053 from qingwave/remove-unuse-code
Remove unuse code in pkg/kubelet/util
2023-03-14 09:39:10 -07:00
Kubernetes Prow Robot
898143a96a
Merge pull request #114904 from TommyStarK/kubelet/pod_startup_latency_tracker
kubelet: fix recording when pulling image did finish
2023-03-14 09:39:02 -07:00
Kubernetes Prow Robot
aa49f001bc
Merge pull request #114701 from goushicui/vlm
update comment
2023-03-14 09:38:53 -07:00
Kubernetes Prow Robot
b623fcc181
Merge pull request #114634 from TommyStarK/unit-tests/pkg-kubelet-cloudresource
kubelet/cloudresource: Improving test coverage
2023-03-14 09:38:45 -07:00
kunkunhaohao
a772691165
Update pod_container_manager_linux.go (#114598)
* Update pod_container_manager_linux.go

This is a simple optimization to reduce repeated invoking of the GetPodContainerName function.

* Update pod_container_manager_linux.go

将podContainerName, _ := m.GetPodContainerName(pod)更靠近使用podcontainerName变量的位置
2023-03-14 09:38:36 -07:00
Kubernetes Prow Robot
f769c66aa8
Merge pull request #113622 from 249043822/br-context-logging-daemon
daemonset: use contextual logging
2023-03-14 09:38:28 -07:00
Dan Winship
7696bcd10c Remove some now-obviously-unnecessary checks
Now that the endpoint update fields have names that make it clear that
they only contain UDP objects, it's obvious that the "protocol == UDP"
checks in the iptables and ipvs proxiers were no-ops, so remove them.
2023-03-14 12:18:58 -04:00
Dan Winship
c5c0d9f5bd Make deleteEndpointConnection test use syncProxyRules
Rather than calling fp.deleteEndpointConnection() directly, set up the
proxy to have syncProxyRules() call it, so that we are testing it in
the way that it actually gets called.

Squash the IPv4 and IPv6 unit tests together so we don't need to
duplicate all that code. Fix a tiny bug in NewFakeProxier() found
while doing this...
2023-03-14 12:18:58 -04:00
Dan Winship
dea8e34ea7 Improve the naming of the stale-conntrack-entry-tracking fields
The APIs talked about "stale services" and "stale endpoints", but the
thing that is actually "stale" is the conntrack entries, not the
services/endpoints. Fix the names to indicate what they actual keep
track of.

Also, all three fields (2 in the endpoints update object and 1 in the
service update object) are currently UDP-specific, but only the
service one made that clear. Fix that too.
2023-03-14 12:18:58 -04:00
Dan Winship
4381973a44 Revert (most of) "Issue 70020; Flush Conntrack entities for SCTP"
This commit did not actually work; in between when it was first
written and tested, and when it merged, the code in
pkg/proxy/endpoints.go was changed to only add UDP endpoints to the
"stale endpoints"/"stale services" lists, and so checking for "either
UDP or SCTP" rather than just UDP when processing those lists had no
effect.

This reverts most of commit aa8521df66
(but leaves the changes related to
ipvs.IsRsGracefulTerminationNeeded() since that actually did have the
effect it meant to have).
2023-03-14 12:18:58 -04:00
Aravindh Puthiyaparambil
d12696c20f
kubelet: Expose simple journald and Get-WinEvent shims on the logs endpoint
Provide an administrator a streaming view of journal logs on Linux
systems using journalctl, and event logs on Windows systems using the
Get-WinEvent PowerShell cmdlet without them having to implement a client
side reader.

Only available to cluster admins.

The implementation for journald on Linux was originally done by Clayton
Coleman.

Introduce a heuristics approach to query logs

The logs query for node objects will follow a heuristics approach
when asked to query for logs from a service. If asked to get the
logs from a service foobar, it will first check if foobar logs to the
native OS service log provider. If unable to get logs from these, it
will attempt to get logs from /var/foobar, /var/log/foobar.log or
/var/log/foobar/foobar.log in that order.
The logs sub-command can also directly serve a file if the query looks
like a file.

Co-authored-by: Clayton Coleman <ccoleman@redhat.com>
Co-authored-by: Christian Glombek <cglombek@redhat.com>
2023-03-14 08:54:36 -07:00
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
Jan Safranek
a53c6f1dc8 Add validation of CSIDriver.SELinuxMount 2023-03-14 16:49:55 +01:00
Aravindh Puthiyaparambil
26279a5282
kubelet: Add validation for EnableNodeLogQuery 2023-03-14 08:45:20 -07: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
Aravindh Puthiyaparambil
d52cbd4a5a
feature: Add NodeLogQuery feature gate
Enable the query endpoint only if this gate is enabled in addition to
the EnableNodeLogQuery kubelet config option.
2023-03-14 08:45:18 -07:00
Kubernetes Prow Robot
a9008b502d
Merge pull request #116577 from jsafrane/fix-standalone-mode
Fix volume reconstruction in standalone mode
2023-03-14 08:37:02 -07:00
Kubernetes Prow Robot
204a9a1f17
Merge pull request #116459 from ffromani/podresources-ratelimit-minimal
add podresources DOS prevention using rate limit
2023-03-14 08:36:45 -07:00
Kubernetes Prow Robot
2bd69db8d7
Merge pull request #116351 from vinaykul/restart-free-pod-vertical-scaling-kubelet-fix-followup
Initialize pod resource allocation checkpoint manager to noop
2023-03-14 08:36:37 -07:00
Alex Wang
8a1f9f43e6 feat: validate matchLabelKeys when labelSelector isn't set
Signed-off-by: Alex Wang <wangqingcan1990@gmail.com>
2023-03-14 22:36:41 +08:00
Divyen Patel
eca25d9e12 lock CSIMigrationvSphere feature gate 2023-03-14 19:57:57 +05:30
Jan Safranek
a84dc2d5c5 Flip SELinuxMountReadWriteOncePod to Beta
And enable all e2e tests by default. They're still behind
`[Feature:SELinux]` tag to ensure the underlying OS supports SELinux.
2023-03-14 14:32:38 +01: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
Jan Safranek
c4f8c3f628 Fix volume reconstruction in standalone mode
Kubelet in standalone mode won't have kubeclient, it cannot get node.status
and get devices from it. Such a kubelet cannot mount attachable volumes
anyway.
2023-03-14 12:32:21 +01:00
Patrick Ohly
e97531b349 api: extend validation of dynamic resource allocation fields in PodSpec
The generated ResourceClaim name and the names of the ResourceClaimTemplate and
ResourceClaim referenced by a pod must be valid according to the resource API,
otherwise the pod cannot start.

Checking this was removed from the original implementation out of concerns
about validating fields in core against limitations imposed by a separate,
alpha API.  But as this was pointed out again in
https://github.com/kubernetes/kubernetes/pull/116254#discussion_r1134010324
it gets added back.

The same strings that worked before still work now. In particular, the
constraints for a spec.resourceClaim.name are still the same (DNS label).
2023-03-14 11:58:41 +01:00
Kubernetes Prow Robot
c8f001d798
Merge pull request #114504 from vrutkovs/tracing-kubelet-toplevel
kubelet: create top-level traces for pod sync and GC
2023-03-14 03:12:16 -07:00
Patrick Ohly
2b8a4e8097 api: generated files for PodSchedulingContext 2023-03-14 10:18:08 +01:00
Patrick Ohly
fec5233668 api: resource.k8s.io PodScheduling -> PodSchedulingContext
The name "PodScheduling" was unusual because in contrast to most other names,
it was impossible to put an article in front of it. Now PodSchedulingContext is
used instead.
2023-03-14 10:18:08 +01:00
Kubernetes Prow Robot
0e06be57a6
Merge pull request #116299 from pohly/dra-v1alpha2
api: resource.k8s.io v1alpha1 -> v1alpha2
2023-03-14 02:15:08 -07:00
Mengjiao Liu
c512232782 Migrate pkg/scheduler/framework/plugins/defaultbinder to contextual logging 2023-03-14 17:02:25 +08:00
Kubernetes Prow Robot
921dfed168
Merge pull request #116566 from liggitt/fix-fuzzer
Fix StatefulSet fuzzer
2023-03-14 00:45:09 -07:00
Patrick Ohly
29941b8d3e api: resource.k8s.io v1alpha1 -> v1alpha2
For Kubernetes 1.27, we intend to make some breaking API changes:
- rename PodScheduling -> PodSchedulingHints (https://github.com/kubernetes/kubernetes/issues/114283)
- extend ResourceClaimStatus (https://github.com/kubernetes/enhancements/pull/3802)

We need to switch from v1alpha1 to v1alpha2 for that.
2023-03-14 07:52:03 +01:00
Kubernetes Prow Robot
152876a3eb
Merge pull request #115668 from jiahuif-forks/feature/validating-admission-policy/type-system
Type System for ValidatingAdmissionPolicy
2023-03-13 23:27:09 -07:00
Kubernetes Prow Robot
dfc63f218c
Merge pull request #116557 from smarterclayton/sync_known_race
kubelet: TestSyncKnownPods should not race
2023-03-13 22:27:24 -07:00
Kubernetes Prow Robot
59b11feadd
Merge pull request #116553 from thockin/pr-111942-takeover
API docs trivial typo
2023-03-13 22:27:16 -07:00
Jordan Liggitt
f7ab379489
Fix StatefulSet fuzzer 2023-03-14 01:19:12 -04:00