Commit Graph

127140 Commits

Author SHA1 Message Date
Patrick Ohly
30f5282656 DRA API: rename DeviceCapacity.Quantity to DeviceCapacity.Value
Based on review
feedback (https://github.com/kubernetes/kubernetes/pull/127511#discussion_r1823521172).
2024-11-06 13:03:20 +01:00
Patrick Ohly
0b8a85c54a update-openapi-spec.sh: enable all alpha and beta APIs
This becomes relevant once DynamicResourceAllocation becomes beta with
"disabled" as default. Otherwise AllAlpha=true enables DRAAdminAccess which
depends on DynamicResourceAllocation, which is disabled.
2024-11-06 13:03:19 +01:00
Patrick Ohly
33ea278c51 DRA: use v1beta1 API
No code is left which depends on the v1alpha3, except of course the code
implementing that version.
2024-11-06 13:03:19 +01:00
Patrick Ohly
81fd64256c DRA API: use DeviceCapacity struct instead of plain Quantity
This enables a future extension where capacity of a single device gets consumed
by different claims. The semantic without any additional fields is the same as
before: a capacity cannot be split up and is only an attribute of a device.

Because its semantically the same as before, two-way conversion to v1alpha3 is
possible.
2024-11-06 13:03:19 +01:00
Patrick Ohly
142319bd92 DRA API: use v1beta1 as storage version
This is meant to make it easier to remove the v1alpha3 because it won't be used
in clusters that started with DRA as beta in Kubernetes 1.32 when all clients
support v1beta1.
2024-11-06 13:03:19 +01:00
Patrick Ohly
0ee52b23cd DRA API: generated files 2024-11-06 13:03:19 +01:00
Patrick Ohly
2e64c72249 DRA API: register v1beta1
This is the minimal set of changes that are needed to make the new version
usable. The storage version is still v1alpha3. More changes will follow.
2024-11-06 13:03:18 +01:00
Patrick Ohly
584fdc9d1c DRA API: update lifecyle meta data
The tag is about the version/type combination, not just the type. The v1beta1
types will become deprecated automatically after three releases, starting in
1.32.

The v1alpha3 types get marked as replaced to ensure that the compatibility
version code doesn't force using v1alpha3 as storage
version (https://github.com/kubernetes/kubernetes/issues/128448).
2024-11-06 13:03:18 +01:00
Patrick Ohly
d685064ff7 DRA API: search/replace v1alpha3 -> v1beta1 2024-11-06 13:03:18 +01:00
Patrick Ohly
f1e5616f05 DRA API: verbatim copy of v1alpha3 -> v1beta1 2024-11-06 13:03:18 +01:00
Patrick Ohly
99acb67c68 DRA API: enhance validation testing
The line coverage is now at 98.5% and several more corner cases are
covered. The remaining lines are hard or impossible to reach.

The actual validation is the same as before, with some small tweaks to the
generated errors.

When failures are not as expected, it is useful to show what the expected and
actual failures look like to a user. Perhaps even better would be to put the
expected texts into the test files instead of the error structs. That would
be easier to review and shorter.
2024-11-06 13:03:18 +01:00
Jan Safranek
52b47ea4de Don't create a new controller context 2024-11-06 12:29:56 +01:00
Jan Safranek
4b99a342f4 Move feature gate to ControllerDescriptor 2024-11-06 12:29:56 +01:00
Kubernetes Prow Robot
50d0f920c0
Merge pull request #126750 from AMDEPYC/uncore_v1
Split L3 Cache Topology Awareness in CPU Manager
2024-11-06 11:13:29 +00:00
carlory
f78c903537 improve the code in test/e2e/framework/job/wait.go 2024-11-06 18:23:41 +08:00
Jan Safranek
8875f4daf0 Describe what the input list of SELinux options is 2024-11-06 11:16:06 +01:00
Jan Safranek
8791efc732 Update property name in metrics
selinux_volume_conflict should not have space in its label value - it's
harder to query for that value. Use SELinuxLabel as both human friendly (in
an event) and label value.
2024-11-06 11:16:06 +01:00
Jan Safranek
cf7a2c7d35 Add a comment why PVC indexer is used 2024-11-06 11:16:06 +01:00
Jan Safranek
3ff3ed4b6d Add comment how GetPodsForCSIDriver is useful 2024-11-06 11:16:06 +01:00
Jan Safranek
6eab8a8691 Use RWLock for the controller cache
It could help a tiny bit with parallel operations.
2024-11-06 11:16:06 +01:00
Jan Safranek
e6807a8e4f Use _ for unused parameters
Sometimes the logger is not used. This fixes some linter warnings.
2024-11-06 11:16:06 +01:00
Jan Safranek
dfb88095b0 Rename label to seLinuxLabel
In various parameters, variables and fields. To make the name more
obvious.
2024-11-06 11:16:06 +01:00
Jan Safranek
e438bc0561 Rework event recorder startup
* Remove Controller.recorder field, there already is eventRecorder.
* Start the event broadcaster in Run(), to save a bit of CPU and memory
  when something initializes the controller, but does not Run() it.
* Log events with log level 3, as the other contollers usually do.
* Use StartStructuredLogging(), which looks fancier than StartLogging
2024-11-06 11:16:06 +01:00
Jan Safranek
da2d9fa16e Fix golint errors
Revealed by the new SELinux warning controller, but not related to it.
2024-11-06 11:16:05 +01:00
Jan Safranek
aa8872d7a3 Add SELinux warning controller 2024-11-06 11:16:02 +01:00
Jan Safranek
0d71dc677e Refactor CreateVolumeSpec
Rename old CreateVolumeSpec to CreateVolumeSpecWithNodeMigration that
extracts volume.Spec with node specific CSI migration.

Add CreateVolumeSpec that does the same, only without evaluating node CSI
migration.
2024-11-06 11:15:31 +01:00
Patrick Ohly
51d5992335 DRA API: fix some comments
Wording in one case was wrong. The tombstone comment should use
the same field definition as before the removal.
2024-11-06 11:05:05 +01:00
Patrick Ohly
7b3a9afca3 DRA kubelet: add v1beta1 gRPC API
The v1beta1 API is identical to the previous v1alpha4, which erroneously was
still called "v1alpha3" in a few places, including the gRPC interface
definition itself.

The only reason for v1beta1 is to document the increased maturity of this API.

To simplify the transition, kubelet supports both v1alpha4 and v1beta1, picking
the more recent one automatically. All that DRA driver authors need to do to
implement v1beta1 is to update to the latest
k8s.io/dynamic-resource-allocation/kubeletplugin: it will automatically
register both API versions unless explicitly configured otherwise, which is
mostly just for testing.

DRA driver authors may replace their package import of v1alpha4 with v1beta1,
but they don't have to because the types in both packages are the same.
2024-11-06 11:05:05 +01:00
Kubernetes Prow Robot
f451aec237
Merge pull request #128296 from AnishShah/kubectl-resize
[FG:InPlacePodVerticalScaling] Remove restrictions on subresource flag in kubectl commands
2024-11-06 10:01:45 +00:00
Kubernetes Prow Robot
833ee8502e
Merge pull request #128194 from AnishShah/extended-resource
test: refactor logic to add/remove extended resources
2024-11-06 10:01:37 +00:00
Kubernetes Prow Robot
0fad78930f
Merge pull request #127904 from towca/jtuznik/dra-autoscaling
DRA: allow Cluster Autoscaler to integrate with DRA scheduler plugin
2024-11-06 10:01:29 +00:00
Ed Bartosh
3aa95dafea e2e_node: refactor stopping and restarting kubelet
Moved Kubelet health checks from test cases to the stopKubelet API.
This should make the API cleaner and easier to use.
2024-11-06 11:34:48 +02:00
Kubernetes Prow Robot
ab4b869b52
Merge pull request #128590 from benluddy/protobuf-storage-integration-test
Add integration test for per-resource storage encoding.
2024-11-06 08:51:44 +00:00
Kubernetes Prow Robot
89c1925e23
Merge pull request #128582 from pohly/dra-resourceslice-unit-test-fix
DRA resource slice controller: fix unit test flake
2024-11-06 08:51:36 +00:00
Kubernetes Prow Robot
3dcad5f0db
Merge pull request #128532 from neolit123/1.32-handle-custom-addreses-comp-readyz
kubeadm: use advertise address for WaitForAllControlPlaneComponents
2024-11-06 08:51:29 +00:00
Anish Shah
d4f05fdda5 Introduce a metric to track kubelet admission failure. 2024-11-06 00:07:17 -08:00
Anish Shah
5dbb793207 test: fix InPlacePodVerticalScaling e2e tests 2024-11-06 07:35:33 +00:00
Anish Shah
e1ca63489f kubectl: remove subresource restrictions from all commands
Removing this restrictions will allow us to use these commands with the
new resize subresource.
2024-11-05 23:06:40 -08:00
Kubernetes Prow Robot
aafcf4e932
Merge pull request #128453 from tallclair/cacheless-pleg
Cleanup unused cacheless PLEG code
2024-11-06 06:59:35 +00:00
Kubernetes Prow Robot
648717cc74
Merge pull request #128266 from AnishShah/resize-subresource
[FG:InPlacePodVerticalScaling] Introduce  /resize subresource to request pod resource resizing
2024-11-06 06:59:29 +00:00
Mengqi (David) Yu
d6e17ad808 Add random interval to nodeStatusReport interval every time after an actual node status change 2024-11-06 06:11:05 +00:00
Kubernetes Prow Robot
b631dae569
Merge pull request #128584 from thockin/compartmentalize_spew
Compartmentalize spew more
2024-11-06 04:19:51 +00:00
Kubernetes Prow Robot
a50b4e52a9
Merge pull request #128553 from thockin/master
Validation: merge TooLong and TooLongMaxLen
2024-11-06 04:19:43 +00:00
Kubernetes Prow Robot
5e0b818ff9
Merge pull request #128551 from tallclair/allocated-checkpoint
[FG:InPlacePodVerticalScaling] Don't checkpoint ResizeStatus
2024-11-06 04:19:36 +00:00
Kubernetes Prow Robot
bf75546494
Merge pull request #128432 from zhifei92/integrating-health-check
Integrate device plugin registration gRPC server health checks.
2024-11-06 04:19:29 +00:00
Ben Luddy
006146f58f
Add integration test for per-resource storage encoding. 2024-11-05 22:38:46 -05:00
huweiwen
b3fe7a6410 fix ExistingPodExistingVolume test case
the previous code is identical with NewPodNewVolume
2024-11-06 11:11:14 +08:00
huweiwen
b8777bc3b5 test: check for error returned by dsw.AddPodToVolume 2024-11-06 11:11:14 +08:00
huweiwen
f9a9b6f660 rename Gid => GID
according to stylecheck
2024-11-06 11:11:13 +08:00
carlory
7cb4a1f144 fix description for PersistentVolumeSource and VolumeSource 2024-11-06 10:51:04 +08:00