Commit Graph

112544 Commits

Author SHA1 Message Date
Swati Sehgal
8594b2271f nrt-api: Indicate that PRs are not directly accepted to the repo
- Add contributing.md
- Add .github/PULL_REQUEST_TEMPLATE.md
2022-12-12 16:48:31 +00:00
Swati Sehgal
bd8f4680b7 nrt-api: Add all mandatory template files to the staging repo
- Add OWNERS and SECURITY_CONTACTS
- Add LICENSE file
- Add README.md
- Add code-of-conduct.md

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2022-12-12 16:48:31 +00:00
Swati Sehgal
62e4d39c2f node: e2e: address review comments (2022/12/12)
- use `ginkgo.DeferCleanup` instead of clean up in the AfterEach block
- encourage use of ginkgo by not extending expect.go

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2022-12-12 16:31:40 +00:00
SataQiu
090c36027f apiserver: cleanup unused StrategyExceptions 2022-12-12 23:56:24 +08:00
Rita Zhang
c085031a8f
Update the godoc on the encryption config API on how to specify group/resources to be encrypted
Signed-off-by: Rita Zhang <rita.z.zhang@gmail.com>
2022-12-12 07:22:09 -08:00
Ionut Balutoiu
3feea9db7c tests: Add DaemonSet with LB rolling update test
Add a test case with a DaemonSet behind a simple load balancer whose
address is being constantly hit via HTTP requests.

The test passes if there are no errors when doing HTTP requests to the
load balancer address, during DaemonSet `RollingUpdate` operations.

Signed-off-by: Ionut Balutoiu <ibalutoiu@cloudbasesolutions.com>
2022-12-12 17:16:12 +02:00
Swati Sehgal
a9e3689e63 node: e2e: ensure clean cluster state before e2e tests are run
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2022-12-12 14:50:36 +00:00
Swati Sehgal
7e880d1bab node: e2e: ensure log rotation pod is deleted after test
Some node e2e tests check for expected number of pods running
on the node to verify the correct state of that node after running
test scenarios. An example of such a check is in the device plugin
end to end test here: [1].

If the node is not left in a clean state after an e2e test finishes
running, it can lead to flaky tests because the node might have
unexpected pods running on the node.

In order to avoid that, we make sure that the test pods are
cleaned up after the test runs.

[1]: https://github.com/kubernetes/kubernetes/blob/master/test/e2e_node/device_plugin_test.go#L189-L190

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2022-12-12 14:50:32 +00:00
Kubernetes Prow Robot
0e19bbb916
Merge pull request #113742 from princepereira/ppereira-kubeproxy-flags
Add a flag to HNS Load Balancer policy to hint HNS about the VIP being an External IP
2022-12-12 04:23:33 -08:00
Kensei Nakada
9fd15f1fa3 use TotalScore summarized in NodePluginScores 2022-12-12 11:43:22 +00:00
Kubernetes Prow Robot
cef3e3ffe6
Merge pull request #114027 from anggao/master
e2e: make GetSubnetPrefix IP family agnostic
2022-12-12 02:45:33 -08:00
Patrick Ohly
5c09ca57ff e2e storage: remove context.WithCancel
The context provided by Ginkgo will get cancelled automatically.
2022-12-12 11:30:07 +01:00
Patrick Ohly
896c6fa082 e2e framework: add AnnotatedLocationWithOffset
This is useful in helper functions which themselves don't need to be recorded.
2022-12-12 11:30:07 +01:00
Patrick Ohly
c466c49682 e2e apps: avoid assertions in wait.Until callback
wait.Until catches panics and logs them, which leads to confusing
output. Besides, the test is written so that failures must get reported to the
main goroutine.
2022-12-12 11:30:07 +01:00
Patrick Ohly
2168dd5334 e2e apps: capture expected state before making changes
Looking up the expected nodes in the goroutine raced with the test making
changes to the configuration. When doing (unrelated?) changes, the test started
to fail:

Oct 23 15:47:03.092: INFO: Unexpected error:
    <*errors.errorString | 0xc001154c70>: {
        s: "no subset of available IP address found for the endpoint test-rolling-update-with-lb within timeout 2m0s",
    }
Oct 23 15:47:03.092: FAIL: no subset of available IP address found for the endpoint test-rolling-update-with-lb within timeout 2m0s
2022-12-12 11:30:07 +01:00
Patrick Ohly
7454c3ff81 e2e metrics: remove incorrect comment
The "should report resource usage through the resource metrics api" E2E test
calls getResourceMetrics, which calls GrabKubeletMetricsWithoutProxy.
2022-12-12 11:30:07 +01:00
Patrick Ohly
8c27313cfd e2e storage: don't panic when server stops
Now that everything is connected to a per-test context, the gRPC server might
encounter an error before it gets shut down normally. We must not panic in that
case because it would kill the entire Ginkgo worker process. This is not even
an error, so just log it as info message.
2022-12-12 11:30:07 +01:00
Patrick Ohly
f897c86119 e2e framework: support ignoring "not found" errors during DeferCleanup
The wrapper can be used in combination with ginkgo.DeferCleanup to ignore
harmless "not found" errors during delete operations.

Original code suggested by Onsi Fakhouri.
2022-12-12 11:30:07 +01:00
Patrick Ohly
73b60ba769 e2e framework: don't fail when DumpAllNamespaceInfo is nil
It is set in all of the test/e2e* suites, but not in the ginkgo output
tests. This check is needed before adding a test case there which would trigger
this nil pointer access.
2022-12-12 11:30:07 +01:00
Kubernetes Prow Robot
bc6afee049
Merge pull request #114361 from kerthcet/cleanup/emit-errors-more-precise
Tune the error messages in scheduler cache
2022-12-12 00:15:44 -08:00
Kubernetes Prow Robot
c80b03fee8
Merge pull request #113499 from kerthcet/cleanup/map-empty-judgement
Fix: resourceToWeightMap will never be nil here
2022-12-12 00:15:33 -08:00
Arda Güçlü
d0f558612a use io instead ioutil 2022-12-12 09:34:35 +03:00
Arda Güçlü
4699801d65 Add unit test for error case 2022-12-12 09:18:27 +03:00
Arda Güçlü
fb3d9e3ac9 rollout restart: Change error message to more descriptive
`rollout restart` command calculates patches according to the
`kubectl.kubernetes.io/restartedAt` annotation whose time format is
RFC3339. That is sufficient for users. However, if automated scripts
execute `rollout restart` in multiple times within second, commands fails
by returning an error "empty patch".

This PR changes error message to more descriptive format to warn users
that rollout restart does not work subsequent execution within second.
2022-12-12 09:18:26 +03:00
Sean Sullivan
5e8648b9f1 Refactor to simplify factory Validator 2022-12-11 18:20:28 -08:00
Ang Gao
1931494333 make GetSubnetPrefix IP family agnostic 2022-12-12 01:26:42 +00:00
Tim Hockin
dd0a50336e
ServiceInternalTrafficPolicyType: s/Type//
Rename ServiceInternalTrafficPolicyType => ServiceInternalTrafficPolicy
2022-12-11 13:48:31 -08:00
Tim Hockin
d0e2b06850
ServiceExternalTrafficPolicyType: s/Type//
Rename ServiceExternalTrafficPolicyType => ServiceExternalTrafficPolicy
2022-12-11 13:48:27 -08:00
Kubernetes Prow Robot
23c65ec590
Merge pull request #114411 from aojea/e2e_panic
don't assert error inside goroutines
2022-12-11 10:13:32 -08:00
Kubernetes Prow Robot
92ec97149c
Merge pull request #114408 from liggitt/gorilla
Mark github.com/gorilla dependencies to avoid increasing use
2022-12-11 09:07:25 -08:00
Kubernetes Prow Robot
f256321e76
Merge pull request #114401 from pohly/e2e-ginkgo-timeouts-callbacks
e2e: accept context from Ginkgo
2022-12-11 09:07:14 -08:00
Kubernetes Prow Robot
074f3f5aca
Merge pull request #114358 from SataQiu/using-v2-20221208
Autoscaling: advance v2 as the preferred API version over v1
2022-12-11 09:05:00 -08:00
Antonio Ojea
2956bb39a1 don't assert error inside goroutines
Change-Id: Ifed741d1973e96063378620daf7b8b22647bc2fb
2022-12-11 15:34:17 +00:00
SataQiu
4c60ee00aa remove GA featuregates: CSIInlineVolume, CSIMigration, DaemonSetUpdateSurge, EphemeralContainers, IdentifyPodOS, LocalStorageCapacityIsolation, NetworkPolicyEndPort, StatefulSetMinReadySeconds 2022-12-11 19:27:41 +08:00
Kubernetes Prow Robot
014e3be258
Merge pull request #114409 from SataQiu/kubeadm-20221211
kubeadm: cleanup the temporary workaround about kubelet --container-runtime flag
2022-12-11 03:11:14 -08:00
Kubernetes Prow Robot
47d58265ae
Merge pull request #114404 from hoskeri/discovery-error-check
Check the correct error in d.downloadAPIs
2022-12-11 00:05:15 -08:00
SataQiu
76bb3364d2 kubeadm: cleanup the temporary workaround about kubelet --container-runtime flag 2022-12-11 15:52:12 +08:00
SataQiu
40a6d6306a autoscaling: advance v2 as the preferred API version over v1 2022-12-11 13:09:39 +08:00
Jordan Liggitt
cdebf3a64c
Mark github.com/gorilla dependencies to avoid increasing use 2022-12-10 23:54:13 -05:00
Kubernetes Prow Robot
909f5be802
Merge pull request #113707 from lucacome/bump-grpc
Bump grpc to v1.51.0
2022-12-10 16:43:42 -08:00
Abhijit Hoskeri
450ba4f506 Check the correct error in d.downloadAPIs
The error result of `d.downloadAPIs()` is set in `aerr`,
not `err`.

This prevents a nil-ptr dereference of apiGroups in the next step.

Signed-off-by: Abhijit Hoskeri <abhijithoskeri@gmail.com>
2022-12-10 16:32:02 -08:00
Kubernetes Prow Robot
8d2fbfc5a9
Merge pull request #113933 from liggitt/retry-race
Fix client-go request retry race
2022-12-10 13:43:41 -08:00
Patrick Ohly
a4e6fea164 e2e: fix line numbering in unit tests
Adding the "context" import in the previous commit must get compensated by
removing one of the blank lines in the output unit tests, otherwise the stack
backtrace don't match expectations.
2022-12-10 21:49:05 +01:00
Patrick Ohly
16f05373f4 e2e framework internal: normalize anonymous functions with parameters
This will become relevant for

   ginkgo.BeforeEach(func(ctx context.Context) { ... })
2022-12-10 21:47:17 +01:00
Kubernetes Prow Robot
d2ed6d355e
Merge pull request #114279 from pacoxu/coredns-v1.10.0
update coredns to v1.10.0
2022-12-10 12:21:52 -08:00
Kubernetes Prow Robot
39537ccc12
Merge pull request #113909 from cncal/fix_bounded_frequency_runner_unittest
fix wrong statement in unittest of BoundedFrequencyRunner
2022-12-10 12:21:41 -08:00
Patrick Ohly
0d73c0d0e5 e2e: fix linter errors
Adding "ctx" as parameter in the previous commit led to some linter errors
about code that overwrites "ctx" without using it.

This gets fixed by replacing context.Background or context.TODO in those code
lines with the new ctx parameter.

Two context.WithCancel calls can get removed completely because the context
automatically gets cancelled by Ginkgo when the test returns.
2022-12-10 20:35:46 +01:00
Kubernetes Prow Robot
1456799d39
Merge pull request #114294 from seans3/remove-dry-run-verifier
Removes unnecessary dry run verifier
2022-12-10 10:51:41 -08:00
Patrick Ohly
df5d84ae81 e2e: accept context from Ginkgo
Every ginkgo callback should return immediately when a timeout occurs or the
test run manually gets aborted with CTRL-C. To do that, they must take a ctx
parameter and pass it through to all code which might block.

This is a first automated step towards that: the additional parameter got added
with

    sed -i 's/\(framework.ConformanceIt\|ginkgo.It\)\(.*\)func() {$/\1\2func(ctx context.Context) {/' \
        $(git grep -l -e framework.ConformanceIt -e ginkgo.It )
    $GOPATH/bin/goimports -w $(git status | grep modified: | sed -e 's/.* //')

log_test.go was left unchanged.
2022-12-10 19:50:18 +01:00
Sean Sullivan
530f65d6fd Removes unnecessary dry run verifier 2022-12-10 09:43:01 -08:00