Commit Graph

110393 Commits

Author SHA1 Message Date
Patrick Ohly
d33e66b81b e2e: reduce built time for framework
Pulling the CreateKubeConfig function from the expensive to build
test/utils/apiserver package had a considerable impact on the overall build
time because that package depends on a lot of other packages.

Because only that one function is needed by the framework, that extra build
time can be avoided by moving it into its own package.
2022-09-10 17:56:23 +02:00
Kubernetes Prow Robot
d9f21e55df
Merge pull request #111998 from pohly/e2e-framework-after-each
e2e framework: replace custom cleanup support with Ginkgo v2 mechanisms
2022-09-09 16:17:22 -07:00
Kubernetes Prow Robot
b48b0eac6a
Merge pull request #112349 from pohly/klog-update
build: update to klog v2.80.1
2022-09-09 14:37:24 -07:00
Kubernetes Prow Robot
e6fa40a11c
Merge pull request #112355 from mimowo/handling-pod-failures-roundtrip-test
Fix the TestRoundTripTypes by adding default to the fuzzer
2022-09-09 12:25:23 -07:00
Kante Yin
096dafe757
Feat: unify the status handle when return in bindingCycle (#112103)
Signed-off-by: kerthcet <kerthcet@gmail.com>

Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-09-09 08:31:23 -07:00
Michal Wozniak
31740d1c37 Fix the TestRoundTripTypes by adding default to the fuzzer 2022-09-09 16:47:08 +02:00
Patrick Ohly
7eb472246f e2e framework: use new apiserver helper package 2022-09-09 13:51:07 +02:00
Patrick Ohly
fc092eb145 e2e: remove cleanup actions
The framework.AddCleanupAction API was a workaround for Ginkgo v1 not invoking
AfterEach callbacks after a test failure. Ginkgo v2 not only fixed that, but
also added a DeferCleanup API which can be used to run some code if (and only
if!) the corresponding setup code ran. In several cases that makes the test
cleanup simpler.
2022-09-09 13:51:07 +02:00
Patrick Ohly
b7529097ca e2e framework: add unit test for test execution
This covers multiple facets of the current framework and of Ginkgo:

- Ginkgo output is verbose and includes detailed progress
  messages (BeforeEach/AfterEach tracing).
- Namespace creation.
- Order of callback invocation.
2022-09-09 13:51:07 +02:00
Patrick Ohly
f6029e4281 test: add helper code for running apiserver inside unit test
This runs etcd and an apiserver using it inside the test process. The caller
can either use the ClientSet or the config file. More options might get added
in the future.

Co-author: Antonio Ojea <antonio.ojea.garcia@gmail.com>
2022-09-09 13:51:04 +02:00
Patrick Ohly
60d92dd96a build: update to klog v2.80.1
The fix for https://github.com/kubernetes/klog/issues/348 is required before
https://github.com/kubernetes/kubernetes/pull/111998 can be merged because the
way how a unit test in that PR uses klog triggers the data race.
2022-09-09 13:11:55 +02:00
Kubernetes Prow Robot
2b2be7fa6b
Merge pull request #111277 from chymy/improve-kubeadm-subcommand-tips
kubeadm: improve tips of incorrect input of kubedm subcommand
2022-09-09 00:49:23 -07:00
Kubernetes Prow Robot
d569886a23
Merge pull request #112341 from enj/enj/i/second_time_is_the_charm
Remove in-tree credential plugins (again)
2022-09-08 20:35:36 -07:00
Kubernetes Prow Robot
c9c3d2e9d9
Merge pull request #111768 from weilaaa/feature_add_symmetric_difference_in_sets_string
add method symmetric difference in sets.String
2022-09-08 20:35:25 -07:00
Kubernetes Prow Robot
a7936658ba
Merge pull request #112193 from jindijamie/master
Add an option for aggregator
2022-09-08 17:21:24 -07:00
Monis Khan
09cde58bbc
Remove in-tree credential plugins (again)
This change reverts three commits:

1. Revert "Revert "Remove gcp and azure auth plugins""
   This reverts commit 651b4f5b64.

2. Revert "update-gofmt"
   This reverts commit 79c09f0b31.

3. Revert "Update removal warnings to 1.26"
   This reverts commit 68758fc5c5.

Signed-off-by: Monis Khan <mok@microsoft.com>
2022-09-08 19:43:12 -04:00
Kubernetes Prow Robot
082da2f04e
Merge pull request #112017 from enj/enj/i/exec_tls_cache
exec auth: support TLS config caching
2022-09-08 15:35:22 -07:00
Patrick Ohly
f7864977b6 e2e internal: support Ginkgo v2 log time stamps
When using By or some other Ginkgo output functions, Ginkgo v2 now adds a time
stamp at the end of the line that we need to ignore. Will become relevant when
testing more complete output.
2022-09-08 22:50:01 +02:00
Patrick Ohly
53e1c7b4c3 e2e framework: remove AddAfterEach
For cleanup purposes the ginkgo.DeferCleanup is a better replacement for
f.AddAfterEach:
- the cleanup only gets executed when the corresponding setup code ran
  and can use the same local variables
- the callback runs after the test and before the framework
  deletes namespaces (as before)
- if one callback fails, the others still get executed

For the original purpose (https://github.com/kubernetes/kubernetes/pull/86177 "This is
very useful for custom gathering scripts.") it is now possible to use
ginkgo.AfterEach because it will always get executed. Just beware that its
callbacks run in first-in-first-out order.
2022-09-08 22:50:01 +02:00
Patrick Ohly
cbf94307ef e2e framework: clean up instance after all other code ran
In contrast to ginkgo.AfterEach, ginkgo.DeferCleanup runs the callback in
first-in-last-out order. Using it makes the following test code work as
expected:

    f := framework.NewDefaultFramework("some test")

    ginkgo.AfterEach(func() {
        // do something with f.ClientSet
    })

Previously, f.ClientSet was already set to nil by the framework's cleanup code.
2022-09-08 22:50:01 +02:00
Kubernetes Prow Robot
9188d55689
Merge pull request #112308 from ii/promote-namespace-replace-test
Promote CoreV1NamespaceReplace Test +1 Endpoint
2022-09-08 13:11:43 -07:00
Kubernetes Prow Robot
a7a5bfaef4
Merge pull request #112294 from pohly/importaliases
E2E import aliases
2022-09-08 13:11:31 -07:00
Monis Khan
831d95b6a0
exec auth: support TLS config caching
This change updates the transport.Config .Dial and .TLS.GetCert fields
to use a struct wrapper.  This indirection via a pointer allows the
functions to be compared and thus makes them valid to use as map keys.
This change is then leveraged by the existing global exec auth and TLS
config caches to return the same authenticator and TLS config even when
distinct but identical rest configs were used to create distinct
clientsets.

Signed-off-by: Monis Khan <mok@microsoft.com>
2022-09-08 14:51:28 -04:00
Kubernetes Prow Robot
1ad457bff5
Merge pull request #112329 from palnabarun/update-publishing-bot-rules
Update branch rules in publishing rules to Go 1.18.6
2022-09-08 11:17:45 -07:00
Nabarun Pal
4d0b44bb89
update branch rules in publishing rules to Go 1.18.6
Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2022-09-08 22:41:07 +05:30
Kubernetes Prow Robot
cc4b7dc3c5
Merge pull request #111986 from enj/enj/i/transformer_leak
kms: fix go routine leak in gRPC connection
2022-09-08 09:49:46 -07:00
Patrick Ohly
2ace9a884e e2e: generalize the framework e2e* import alias rule
All framework sub packages should used e2e<package name> as import alias, also
the daemonset sub package that previously wasn't listed explicitly.
2022-09-08 18:37:52 +02:00
Patrick Ohly
a00a1c99d5 preferredimports: support regular expressions for the import path
Having to list all packages isn't very manageable and requires constant
maintenance that is easy to miss. For example, test/e2e/framework/daemonset was
created without adding an entry for it. Promptly one file doesn't use the
intended e2edaemonset alias.

A simpler solution is to support matching the import path against a regular
expression and deriving the intended alias by expanding placeholders (${name},
$1, etc.) with the corresponding submatches from the import path. Example:

   k8s.io/kubernetes/test/e2e/framework/([^/]*) -> e2e$1

This support is backwards compatible because normal import paths don't contain
characters that are special in a regular expression and normal aliases don't
contain placeholders.

A regular expression must match the entire import path, otherwise it is
skipped.
2022-09-08 18:37:52 +02:00
Di Jin
6d78a25374 Add integration test
Add integration test to ensure aggregator is not forwarding redirect response
2022-09-08 09:36:12 -07:00
Monis Khan
4e68e9b5ad
kms: fix go routine leak in gRPC connection
Signed-off-by: Monis Khan <mok@microsoft.com>
2022-09-08 11:46:57 -04:00
Kubernetes Prow Robot
1c9cf66f73
Merge pull request #112301 from aojea/ipv6_rfc3849
use IPv6 Address Prefix Reserved for Documentation for api docs
2022-09-08 08:17:45 -07:00
Kubernetes Prow Robot
0e54bd2942
Merge pull request #112287 from palnabarun/master
Update images, dependencies and version to Go 1.19.1
2022-09-08 05:19:43 -07:00
Kubernetes Prow Robot
00c0c9d880
Merge pull request #112235 from demoManito/fix/upgrade-style
fix: modify declaration slice and map code style
2022-09-08 02:56:06 -07:00
Antonio Ojea
fa7ed64dae use IPv6 Address Prefix Reserved for Documentation for api docs 2022-09-08 09:45:04 +02:00
Stephen Heywood
974f4b8ee1 Promote Namespace e2e test to Conformance 2022-09-08 11:44:05 +12:00
Kubernetes Prow Robot
8287e21228
Merge pull request #112299 from shyamjvs/gzip-level-change
Reduce default gzip compression level from 4 to 1 in apiserver
2022-09-07 15:28:38 -07:00
Shyam Jeedigunta
7cd5e6597e Reduce default gzip compression level from 4 to 1 in apiserver 2022-09-07 14:23:31 -07:00
Kubernetes Prow Robot
385cc255c7
Merge pull request #111967 from alexzielenski/csa-to-ssa
[client-go] add function to upgrade managedfields CSA to SSA
2022-09-07 11:58:48 -07:00
Kubernetes Prow Robot
2969000db3
Merge pull request #111122 from alexzielenski/informer
support removal of event handlers from SharedIndexInformers
2022-09-07 11:58:37 -07:00
Nabarun Pal
fd3d11608f
Updates dependencies to reflect Go version updates to 1.19.1
Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2022-09-07 22:14:53 +05:30
Nabarun Pal
26b33246cd
Update Go version in test Makefile to 1.19.1
Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2022-09-07 22:13:58 +05:30
Nabarun Pal
b4ac3b18f6
Update publishing bot default Go version to 1.19.1
Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2022-09-07 22:13:33 +05:30
Nabarun Pal
854b50ebe1
update the default go-runner version to v2.3.1-go1.19.1-bullseye.0
Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2022-09-07 22:13:13 +05:30
Nabarun Pal
242649ee74
Update kube-cross version to v1.25.0-go1.19.1-bullseye.0
Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2022-09-07 21:49:44 +05:30
Kubernetes Prow Robot
2b203348fb
Merge pull request #112022 from JackZxj/release-lock
update lock getter of leaderelection
2022-09-07 08:52:37 -07:00
Kubernetes Prow Robot
a488f4b95c
Merge pull request #107515 from MikeSpreitzer/explain-reset-fields-failure
Make TestApplyResetFields exhibit surprising object
2022-09-07 07:14:37 -07:00
weilaaa
2b55c94e37 add symmetric difference in sets 2022-09-07 20:25:44 +08:00
Kubernetes Prow Robot
cae4c036c8
Merge pull request #112241 from xiaoliwang/simplified_regexp
Optimize: simplified regexp
2022-09-07 02:28:36 -07:00
demoManito
35c26f48e4 fix: map and slice create style 2022-09-07 17:10:13 +08:00
jiepeng
211e0a6496 simplified regexp 2022-09-07 15:51:36 +08:00