Commit Graph

121978 Commits

Author SHA1 Message Date
Gaurav Kumar Ghildiyal
6680700b5d
Add e2e and integration tests for Service.spec.trafficDistribution (#123812)
* Add e2e tests for Service.spec.trafficDistribution

* Fix linting issue

* Fix spelling

* Add integration tests for trafficDistribution

* Use nodeSelection instead of nodeName to schedule pods on a specific zonal node

* Fix import alias corev1 -> v1 in e2e test

* Address comments

* Add a way to only print log lines in case of errors. This is deemed to be good behaviour by e2e tests guidelines
2024-03-13 14:46:21 -07:00
Kubernetes Prow Robot
3a75a8c8d9
Merge pull request #123891 from p0lyn0mial/upstream-cacher-decrease-running-time-of-test-wait-unti-fresh
apiserver/storage/cacher: decrease of running time of TestWaitUntilWatchCacheFreshAndForceAllEvents
2024-03-13 06:49:18 -07:00
Kubernetes Prow Robot
308d664e3f
Merge pull request #123887 from p0lyn0mial/upstream-cacher-decrease-running-time-of-tests
apiserver/storage/cacher: decrease the running time of tests in the cacher package.
2024-03-13 04:59:33 -07:00
Lukasz Szaszkiewicz
5a74c8e220 apiserver/storage/cacher: decrease the running time of tests in the cacher package.
It turns out that kube has a custom timeout for tests of 3 minutes.
The tests in the cacher package are utilizing nearly the
entire time and are being terminated, resulting in failing jobs.

Before the change, the TestWatchSemantics took ~43s to run. With this simple change, it now takes ~18s.

When we created the tests, we didn't measure the running time and assumed that waiting 1 second on a watch channel
to make sure no more events are received was sufficient.
This PR decreases the waiting time to 300 milliseconds.
Modern computers can perform many tasks within that time.
In addition to that, the tests are serial in nature, meaning that there is no other
actor that could add items to the database, which could result in receiving new items.

After the change the total running time decreased by 17%.
Before the tests needed ~176s after they need ~146s.
The changes also improved TestWatchSemanticInitialEventsExtended.
2024-03-13 11:59:20 +01:00
Kubernetes Prow Robot
881cc5bc96
Merge pull request #123897 from p0lyn0mial/upstream-cacher-decrease-running-time-of-empty-watch-event-cache
apiserver/storage/cacher: decrease of running time of TestEmptyWatchEventCache
2024-03-13 03:55:54 -07:00
Lukasz Szaszkiewicz
926122c035 apiserver/storage/cacher: decrease of running time of TestEmptyWatchEventCache
updates the test to wait 300 ms instead of 3s
the watch was established otherwise
we would be blocking on a call to cache.Watch(...)
in addition to that, the tests are serial in nature,
meaning that there is no other actor
that could add items to the database,
which could result in receiving new items.

Before:
go test -race  -run TestEmptyWatchEventCache
ok  	k8s.io/apiserver/pkg/storage/cacher	8.450s

After:
go test -race  -run TestEmptyWatchEventCache
ok  	k8s.io/apiserver/pkg/storage/cacher	2.635s
2024-03-13 09:00:51 +01:00
Kubernetes Release Robot
c9384550cb CHANGELOG: Update directory for v1.30.0-beta.0 release 2024-03-13 05:40:04 +00:00
Kubernetes Prow Robot
f90461c43e
Merge pull request #123904 from kannon92/innocent-eviction-potential-fix
innocent-pod should not be evicted due to exceeding requests/limits
2024-03-12 16:20:54 -07:00
Kubernetes Prow Robot
2e528db812
Merge pull request #123873 from jiahuif-forks/tests/validating-admission-policy/typechecking-manual-retry
ValidatingAdmissionPolicy: retry policy creation for CRD type checking E2E test
2024-03-12 14:38:18 -07:00
Jiahui Feng
4f6212fb0e generated: ./hack/update-conformance-yaml.sh 2024-03-12 13:35:50 -07:00
Jiahui Feng
2c2d424b01 make type checking tests non-conformance. 2024-03-12 11:15:30 -07:00
Kevin Hannon
19ae61bab0 innocent-pod should not be evicted due to exceeding requests/limits 2024-03-12 13:37:11 -04:00
Kubernetes Prow Robot
634fc1b483
Merge pull request #123896 from aojea/revert-122541-headless_selector
Revert "Implement a field selector for ClusterIP on Services"
2024-03-12 08:34:13 -07:00
Kubernetes Prow Robot
3409f0594c
Merge pull request #123674 from serathius/non-recursive
Fix non-recursive list returning "resource version too high" error when consistent list from cache is enabled
2024-03-12 08:34:06 -07:00
Kubernetes Prow Robot
30422d5f22
Merge pull request #123866 from aojea/flake_openapi
don´t run openapi spec with ConsistentListFromCache feature gate enabled
2024-03-12 06:53:31 -07:00
Antonio Ojea
7ab1ef644e
Revert "Implement a field selector for ClusterIP on Services" 2024-03-12 12:20:27 +00:00
Lukasz Szaszkiewicz
3ecbb4dee0 apiserver/storage/cacher: decrease of running time of TestWaitUntilWatchCacheFreshAndForceAllEvents
The individual cases can be safely run in parallel.

Before
go test -race  -run TestWaitUntilWatchCacheFreshAndForceAllEvents
ok  	k8s.io/apiserver/pkg/storage/cacher	10.787s

After:
go test -race  -run TestWaitUntilWatchCacheFreshAndForceAllEvents
ok  	k8s.io/apiserver/pkg/storage/cacher	4.857s
2024-03-12 10:56:19 +01:00
Marek Siarkowicz
a527cab9fc Fix non-recursive list when consistent list from cache is enabled 2024-03-12 10:17:45 +01:00
Antonio Ojea
727d127e6f don´t run openapi spec with ConsistentListFromCache feature gate enabled
Change-Id: I959a5df6259a358db2232733b386afc274b021bd
2024-03-11 21:45:02 +00:00
Jiahui Feng
dc2974c646 retry policy creation for CRD type checking E2E test 2024-03-11 14:39:43 -07:00
Kubernetes Prow Robot
3ec6a38795
Merge pull request #123828 from klueska/non-nil-parameters
dra scheduler: ensure that we never have nil claim/class parameters
2024-03-11 14:35:57 -07:00
Kubernetes Prow Robot
e062f925ae
Merge pull request #123732 from serathius/parallel-featureflags
Fix SetFeatureGateDuringTest handling of Parallel tests
2024-03-11 13:32:48 -07:00
Marek Siarkowicz
9fcf279e2b Fix SetFeatureGateDuringTest handling of Parallel tests
Stop using defer as parallel subtest will might result in main test
finishing before subtest.

Fatal when same flag is set twice.
2024-03-11 20:08:52 +01:00
Kubernetes Prow Robot
016d8b11ae
Merge pull request #123865 from dims/disable-aws-drivers-for-in-tree-volumes-test
Disable `aws` drivers for `In-tree Volumes` test
2024-03-11 11:26:13 -07:00
Kubernetes Prow Robot
57c89abb45
Merge pull request #123792 from mimowo/propose-api-comments-fix
Adjust the Job field API comments and validation to the current state
2024-03-11 11:26:04 -07:00
Kubernetes Prow Robot
2010ca8c5a
Merge pull request #123849 from AkihiroSuda/fix-123848
e2e_node: mount_rro: skip if feature gate is disabled; fix error string comparison
2024-03-11 08:51:34 -07:00
Davanum Srinivas
4aed5652ed
Disable aws drivers for In-tree Volumes test
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-03-11 11:08:39 -04:00
Kevin Klues
21a0dd1d70 dra scheduler: create default claim/class parameters instead of nil
Without this, the scheduler was crashing in newClaimController() in
pkg/scheduler/framework/plugins/dynamicresources/structuredparameters.go

The code in newClaimController() assumes that the parameters are not nil.
Furthermore it assumes that there is at least one DriverRequest populated in
order to allocate any resources to a claim.

This PR adds logic to define default claim/class parameters that will allow
allocation to proceed even if an end user doesn't provide any class or claim
parameters themselves.

Signed-off-by: Kevin Klues <kklues@nvidia.com>
2024-03-11 13:57:16 +00:00
Kevin Klues
fc2134c84c dra kubelet: fix error log
Previously we were returning the error string from 'err' (which is nil), when
we should have been returning it from result.Error. Without this it is hard to
debug issues with NodeUnprepareResources.

Signed-off-by: Kevin Klues <kklues@nvidia.com>
2024-03-11 13:51:29 +00:00
Kubernetes Prow Robot
b3926d137c
Merge pull request #123831 from klueska/fix-unprepare-resources
Add StructuredResourceModel to UnprepareResources call
2024-03-11 03:25:14 -07:00
Kubernetes Prow Robot
05ccec23aa
Merge pull request #123856 from aramase/aramase/t/reload_int_test_fix
fix test flake in TestStructuredAuthenticationConfigReload
2024-03-11 02:22:32 -07:00
Anish Ramasekar
51c26b7002
fix test flake in TestStructuredAuthenticationConfigReload
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2024-03-10 22:36:26 -07:00
Akihiro Suda
ea14ccdf13
e2e_node: mount_rro: fix error string comparison
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-03-11 11:50:25 +09:00
Akihiro Suda
5cc1e56248
e2e_node: mount_rro: add SkipUnlessFeatureGateEnabled(RecursiveReadOnlyMounts)
Fix issue 123848

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-03-11 11:50:25 +09:00
Kubernetes Prow Robot
ebc1a7b7fb
Merge pull request #123847 from wangzhen127/update-npd-configure
Support fetching NPD from github releases in standalone mode
2024-03-10 19:23:49 -07:00
Kubernetes Prow Robot
611dbaa055
Merge pull request #122790 from carlory/fix-121696
Fix flaky test: Test_Run_OneVolumeDetachFailNodeWithReadWriteOnce
2024-03-10 19:23:40 -07:00
Kubernetes Prow Robot
1f22594c9a
Merge pull request #123742 from thockin/cleanup_underscore_tmp
Cleanup _tmp usage
2024-03-10 17:53:44 -07:00
Kubernetes Prow Robot
52e857756b
Merge pull request #123846 from carlory/fix-update-go-workspace
Fix the dirname command in macOS does not have a -z option
2024-03-10 16:11:40 -07:00
Zhen Wang
3ce6c104e2 Support fetching NPD from github releases in standalone mode
We stop releasing NPD tar files to gs://kubernetes-release. This PR
changes it to pull from github release notes by default. It still
supports overriding the defaults and pulling from a GCS bucket,
which is used by NPD CI tests.
2024-03-10 21:49:29 +00:00
carlory
56da06b6dd Fix the dirname command in macOS does not have a -z option 2024-03-10 23:44:10 +08:00
Kubernetes Prow Robot
8f80e01467
Merge pull request #123719 from enj/enj/f/authn_config_beta
Mark StructuredAuthenticationConfiguration feature gate as beta
2024-03-09 17:09:56 -08:00
Kubernetes Prow Robot
09093f270a
Merge pull request #123793 from aramase/aramase/f/authn_config_reload_metrics
Add metrics for authentication config reload
2024-03-09 15:58:55 -08:00
Anish Ramasekar
62ac88b9ea
Add metrics for authentication config reload
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2024-03-09 14:40:22 -08:00
Kubernetes Prow Robot
77ecfb7800
Merge pull request #123525 from enj/enj/f/authn_config_reload
Add dynamic reload support for authentication configuration
2024-03-09 14:13:37 -08:00
Monis Khan
b4935d910d
Add dynamic reload support for authentication configuration
Signed-off-by: Monis Khan <mok@microsoft.com>
2024-03-09 14:29:33 -05:00
Kubernetes Prow Robot
eafd2897e2
Merge pull request #123180 from AkihiroSuda/rro
KEP-3857: Recursive Read-only (RRO) mounts
2024-03-09 11:01:50 -08:00
Kevin Klues
13a6dcc21c dra kubelet: add StructuredResourceModel to UnprepareResources call
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2024-03-09 18:08:14 +00:00
Akihiro Suda
d4925ce8f8
e2e: KEP-3857: Recursive Read-only (RRO) mounts
Usage:
```
make test-e2e-node \
  TEST_ARGS='--service-feature-gates=RecursiveReadOnlyMounts=true --kubelet-flags="--feature-gates=RecursiveReadOnlyMounts=true"' \
  FOCUS="Mount recursive read-only" SKIP=""
```

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-03-10 03:00:59 +09:00
Akihiro Suda
c7f52b34f3
kubelet: KEP-3857: Recursive Read-only (RRO) mounts
See <https://kep.k8s.io/3857>.

An example manifest:
```yaml
apiVersion: v1
kind: Pod
metadata:
  name: rro
spec:
  volumes:
    - name: mnt
      hostPath:
        # tmpfs is mounted on /mnt/tmpfs
        path: /mnt
  containers:
    - name: busybox
      image: busybox
      args: ["sleep", "infinity"]
      volumeMounts:
        # /mnt-rro/tmpfs is not writable
        - name: mnt
          mountPath: /mnt-rro
          readOnly: true
          mountPropagation: None
          recursiveReadOnly: IfPossible
        # /mnt-ro/tmpfs is writable
        - name: mnt
          mountPath: /mnt-ro
          readOnly: true
        # /mnt-rw/tmpfs is writable
        - name: mnt
          mountPath: /mnt-rw
```

Requirements:
- Feature gate "RecursiveReadOnlyMounts" to be enabled
- Linux kernel >= 5.12
- runc >= 1.1

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-03-10 03:00:59 +09:00
Akihiro Suda
6f12e1d8e5
kubelet: expose containerStatuses.volumeMounts
For KEP-3857: Recursive Read-only (RRO) mounts

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-03-10 03:00:59 +09:00