Commit Graph

124331 Commits

Author SHA1 Message Date
Patrick Ohly
91d7882e86 DRA: new API for 1.31
This is a complete revamp of the original API. Some of the key
differences:
- refocused on structured parameters and allocating devices
- support for constraints across devices
- support for allocating "all" or a fixed amount
  of similar devices in a single request
- no class for ResourceClaims, instead individual
  device requests are associated with a mandatory
  DeviceClass

For the sake of simplicity, optional basic types (ints, strings) where the null
value is the default are represented as values in the API types. This makes Go
code simpler because it doesn't have to check for nil (consumers) and values
can be set directly (producers). The effect is that in protobuf, these fields
always get encoded because `opt` only has an effect for pointers.

The roundtrip test data for v1.29.0 and v1.30.0 changes because of the new
"request" field. This is considered acceptable because the entire `claims`
field in the pod spec is still alpha.

The implementation is complete enough to bring up the apiserver.
Adapting other components follows.
2024-07-22 18:09:34 +02:00
Kubernetes Prow Robot
af71138323
Merge pull request #124837 from carlory/rm-FindCreatablePluginBySpec
remove unused FindCreatablePluginBySpec
2024-07-22 08:01:54 -07:00
Kubernetes Prow Robot
3f933ef262
Merge pull request #124053 from PichuChen/patch-1
Fix a typo
2024-07-22 08:01:40 -07:00
Itamar Holder
a6df16af85 node e2e test: exclude critical pods from swapping
Signed-off-by: Itamar Holder <iholder@redhat.com>
2024-07-22 17:56:52 +03:00
Itamar Holder
6c1f14c468 unit tests: exclude critical pods from swapping
Signed-off-by: Itamar Holder <iholder@redhat.com>
2024-07-22 17:56:52 +03:00
Itamar Holder
532cd5f84c Exclude critical pods from having swap access
Signed-off-by: Itamar Holder <iholder@redhat.com>
2024-07-22 17:56:52 +03:00
Peter Hunt
0979ba9cb8 kubelet/stats: verify there is at least one process in each container
0 processes is too low a bar to be meaningfully testing that the process
stats are being reported.

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2024-07-22 10:54:42 -04:00
Peter Hunt
5fd7219cf4 kubelet/stats: fix pid stats for cadvisor stats provider
the process stats aren't correct coming from only the pod stats.
They need to be summed for all of the containers, as cadvisor
is only reading per pid (per container process)

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2024-07-22 10:54:42 -04:00
Kevin Hannon
7d8ba7849b priority pid tests should match on processes
pids 0
process should not be nonzero
2024-07-22 10:54:42 -04:00
David Porter
6e6b2b76a3 test: Update summary test to check for process count
The process count is expected to always be >= 1 for pods in the test.

Let's check it's >= 1, so we can catch issues if the proecss count is
not reported.

Signed-off-by: David Porter <david@porter.me>
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2024-07-22 10:54:42 -04:00
David Porter
f58b46cb97 fix process stats
Signed-off-by: David Porter <david@porter.me>
2024-07-22 10:54:42 -04:00
Hemant Kumar
f7f1a6c81a Address review comments and return nicer errors 2024-07-22 10:43:38 -04:00
PannagaRamamanohara
7df640d197 Promote FSQuotaMonitoring flag to beta 2024-07-22 10:18:21 -04:00
Kubernetes Prow Robot
8b8f84c6a7
Merge pull request #125862 from sanposhiho/cleanup-nominated
cleanup: remove duplicated AddNominatedPod
2024-07-22 06:50:03 -07:00
Kubernetes Prow Robot
1f436e0fba
Merge pull request #124108 from carlory/update-test-InTreePluginXXXUnregister
update unit test for adc to test volume migration
2024-07-22 06:49:49 -07:00
PannagaRamamanohara
d16fd6a915 pkg/volume: Use QuotaMonitoring in UserNamespace
Enable LocalStorageCapacityIsolationFSQuotaMonitoring
only when hostUsers in PodSpec is set to false.
Modify unit tests and e2e tests to verify

Signed-off-by: PannagaRamamanohara <pbhojara@redhat.com>
2024-07-22 09:43:57 -04:00
Kensei Nakada
2a51bd81fa fix: async metric recording 2024-07-22 21:32:19 +09:00
Yuki Iwai
594490fd77 Job: Add the CompletionsReached reason to the SuccessCriteriaMet condition
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
2024-07-22 21:24:52 +09:00
杨朱 · Kiki
bc3c07091b
Fix a bug where the target pod doesn't become schedulable within 5 minutes when a deleted pod uses the same PVC with the ReadWriteOncePod access mode. (#126263)
Co-authored-by: Kensei Nakada <handbomusic@gmail.com>
2024-07-22 01:20:34 -07:00
Anish Shah
665df5794e wait for pod to be ready before continuing with the test
This test is flaky. I have noticed that this happens because the pod is not READY when it is being deleted at the end of the test. This fix ensures that the pod is READY before continuing with the rest of the test.
2024-07-22 05:26:59 +00:00
Kubernetes Prow Robot
00d03ec049
Merge pull request #126259 from liggitt/node-get-authz
Authorize Node reads via name, not graph
2024-07-21 13:08:21 -07:00
Jordan Liggitt
c75c07c8e1
Authorize Node reads via name, not graph 2024-07-21 15:01:46 -04:00
Kubernetes Prow Robot
69eee1c4a2
Merge pull request #126149 from sttts/sttts-aggregator-availability-controller-split
Step 11 - Split aggregator availability controller into local and remote part
2024-07-21 09:54:46 -07:00
Dr. Stefan Schimanski
b27142852f
test/integration: adapt numbers in TestAPIServerTransportMetrics with less rest client creations
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
2024-07-21 17:41:50 +02:00
Dr. Stefan Schimanski
834cd7ca4a
aggregator: split availability controller into local and remote part
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
2024-07-21 17:31:24 +02:00
Patrick Ohly
bcececadfb CEL: add QuantityDeclType
Most functions in k8s.io/apiserver/pkg/cel work with DeclType for type
definitions, which made the existing QuantityType unusable with them. The new
QuantityDeclType fills that gap.
2024-07-21 17:28:14 +02:00
Patrick Ohly
62d21589ef api test: update TestDefaulting
Logging and sub-tests were added to help debug this problem:
the test passes for ResourceClaim (same defaulting!) and fails
for the list, but only if run together with the other test cases?!

    $ go test ./pkg/api/testing
    --- FAIL: TestDefaulting (1.76s)
        --- FAIL: TestDefaulting/resource.k8s.io/v1alpha3,_Kind=ResourceClaimList (0.01s)
            defaulting_test.go:238: expected resource.k8s.io/v1alpha3, Kind=ResourceClaimList to trigger defaulting due to fuzzing
    FAIL
    FAIL	k8s.io/kubernetes/pkg/api/testing	17.294s
    FAIL
    $ go test -run=TestDefaulting/resource.k8s.io/v1alpha3,_Kind=ResourceClaimList ./pkg/api/testing
    ok  	k8s.io/kubernetes/pkg/api/testing	0.062s

What fixed that problem was increasing the likelihood of generating the right
test object by iterating more often before giving up.
2024-07-21 17:28:14 +02:00
Patrick Ohly
8a629b9f15 DRA: remove "sharable" from claim allocation result
Now all claims are shareable up to the limit imposed by the size of the
"reserverFor" array.

This is one of the agreed simplifications for 1.31.
2024-07-21 17:28:14 +02:00
Patrick Ohly
de5742ae83 DRA: remove immediate allocation
As agreed in https://github.com/kubernetes/enhancements/pull/4709, immediate
allocation is one of those features which can be removed because it makes no
sense for structured parameters and the justification for classic DRA is weak.
2024-07-21 17:28:14 +02:00
Patrick Ohly
b51d68bb87 DRA: bump API v1alpha2 -> v1alpha3
This is in preparation for revamping the resource.k8s.io completely. Because
there will be no support for transitioning from v1alpha2 to v1alpha3, the
roundtrip test data for that API in 1.29 and 1.30 gets removed.

Repeating the version in the import name of the API packages is not really
required. It was done for a while to support simpler grepping for usage of
alpha APIs, but there are better ways for that now. So during this transition,
"resourceapi" gets used instead of "resourcev1alpha3" and the version gets
dropped from informer and lister imports. The advantage is that the next bump
to v1beta1 will affect fewer source code lines.

Only source code where the version really matters (like API registration)
retains the versioned import.
2024-07-21 17:28:13 +02:00
Dr. Stefan Schimanski
bbdc247406
aggregator: make linter happy
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
2024-07-21 16:45:28 +02:00
Dr. Stefan Schimanski
b5759ad4f9
aggregator: (pre-)move availability controller
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
2024-07-21 13:48:50 +02:00
Dr. Stefan Schimanski
c5095069a8
aggregator: separate out status controller metrics
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
2024-07-21 13:48:49 +02:00
Kubernetes Prow Robot
815efa2baa
Merge pull request #126250 from my-git9/pkiutil-consot
kubeadm: remove unused constants in util/pkiutil
2024-07-21 03:02:57 -07:00
Kensei Nakada
82a54e8cc8 cleanup: remove duplicated addNominatedPodUnlocked 2024-07-21 16:04:25 +09:00
Kubernetes Prow Robot
10496b35a8
Merge pull request #126015 from micahhausler/kubelet-cert-validation
Enhance node admission to validate kubelet CSR's CN
2024-07-20 21:27:42 -07:00
Kubernetes Prow Robot
558c9536a1
Merge pull request #123678 from kinvolk/userns-use-kubelet-user-mappings
kubelet: Add logs for userns custom mappings parsing
2024-07-20 19:59:57 -07:00
Micah Hausler
b251efe0ad Enhance node admission to validate kubelet CSR's CN
Signed-off-by: Micah Hausler <mhausler@amazon.com>
2024-07-20 19:06:00 -05:00
Kubernetes Prow Robot
b14769f2af
Merge pull request #126224 from neolit123/1.31-fix-bug-in-join-patches-healthz
kubeadm: fix join bug where kubeletconfig was not patched in memory
2024-07-20 14:27:24 -07:00
Kubernetes Prow Robot
90a84704d6
Merge pull request #126231 from seans3/websocket-https-proxy-fix
Falls back to SPDY for gorilla/websocket https proxy error
2024-07-20 13:23:16 -07:00
Kubernetes Prow Robot
8527092e02
Merge pull request #119024 from wafuwafu13/deprecated-node-label
chore(node/util): add more labels to `deprecatedNodeLabels`
2024-07-20 11:31:40 -07:00
carlory
deb9fc97d3 vac add e2e test 2024-07-21 00:48:51 +08:00
Lubomir I. Ivanov
b90b280c5a kubeadm: fix join bug where kubeletconfig was not patched in memory
During kubeadm join in 1.30 kubeadm started respecting
the kubeletconfiguration healthz address/port. Previously
it hardcoded the health check to localhost:defaultport.

A corner case was not handled where the user applies --patches
on join to modify the local kubeletconfiguration. This results
in kubeletconfiguration patch target patches not being applied to
the KubeletConfiguration in memory and the health check
running on the address:port which are present in the kubelet-config
configmap.

Fix that by explicitly calling a new function to patch the
KubeletConfiguration in memory. This is scoped to only handle
the healthz checks *after* the kubelet config.yaml was already
patched and written to disk.
2024-07-20 19:31:19 +03:00
xin.li
c1dca0ad7c kubeadm: remove unused constants in util/pkiutil
Signed-off-by: xin.li <xin.li@daocloud.io>
2024-07-20 23:30:25 +08:00
Kubernetes Prow Robot
892acaa6a7
Merge pull request #126107 from enj/enj/i/svm_not_found_err
svm: set UID and RV on SSA patch to cause conflict on logical create
2024-07-20 08:18:01 -07:00
Sean Sullivan
bc52647251 moving for easier cherry-pick 2024-07-20 05:29:57 -07:00
Kubernetes Prow Robot
b293ca9057
Merge pull request #126229 from aojea/network_policies_0.5.0
bump kube-network-policies to v0.5.0
2024-07-20 05:13:54 -07:00
Kensei Nakada
fa8092f838 support UpdatePodScaleDown instead of UpdatePodRequest 2024-07-20 19:20:38 +09:00
Kubernetes Prow Robot
f2f7708375
Merge pull request #126244 from googs1025/informer
chore(servicecidr): use WaitForCacheSync after sharedInformerFactory Start in integration test
2024-07-20 03:11:39 -07:00
Kensei Nakada
0dee497876 fix: make updatePodOther private 2024-07-20 17:49:46 +09:00