Commit Graph

33 Commits

Author SHA1 Message Date
Dr. Stefan Schimanski
d8c5f71403
kube-apiserver: split up config creation into generic and non-generic part
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
2024-05-01 11:28:25 +02:00
Patrick Ohly
b92273a760 apiserver + controllers: enhance context support
27a68aee3a introduced context support for events. Creating an event
broadcaster with context makes tests more resilient against leaking goroutines
when that context gets canceled at the end of a test and enables per-test
output via ktesting.

The context could get passed to the constructor. A cleaner solution is to
enhance context support for the apiserver and then pass the context into the
controller's run method. This ripples up the call stack to all places which
start an apiserver.
2024-04-29 20:59:21 +02:00
Dr. Stefan Schimanski
3b6d2a66a4
pkg/controlplane: split apart generic server part of instance.go
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
2024-04-29 10:15:02 +02:00
Dr. Stefan Schimanski
e37917fea7
pkg/controlplane: split up config into generic controlplane and kube-related part
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
2024-04-26 14:14:06 +02:00
Patrick Ohly
1d653e6185 test: use cancelation from ktesting
The return type of ktesting.NewTestContext is now a TContext. Code
which combined it WithCancel often didn't compile anymore (cannot overwrite
ktesting.TContext with context.Context). This is a good thing because all of
that code can be simplified to let ktesting handle the cancelation.
2024-03-01 07:51:22 +01:00
Dr. Stefan Schimanski
764da8a01d
FIXUP: cmd/kube-apiserver/app/options: split apart controlplane part 2023-06-26 21:50:38 +02:00
Dr. Stefan Schimanski
6e079545c4
cmd/kube-apiserver: move options completion into options package 2023-06-26 15:20:40 +02:00
Dr. Stefan Schimanski
e6ed4c7934
CLEANUP: cmd/kube-apiserver/app: remove trivial funcs 2023-06-07 10:05:43 +03:00
HirazawaUi
5289a7b029 fix fd leaks and failed file removing for test directory 2023-05-09 09:22:31 -05:00
Kante Yin
a7035f5459 Pass Context to StartTestServer
Signed-off-by: Kante Yin <kerthcet@gmail.com>
2023-05-04 10:25:09 +08:00
Kante Yin
ad55d0cbc9 Use context instead when cleaning up
Signed-off-by: Kante Yin <kerthcet@gmail.com>
2023-02-17 17:13:35 +08:00
Wojciech Tyczyński
6b59525746 Clean shutdown of flowcontrol integration tests 2022-06-15 16:53:42 +02:00
Wojciech Tyczyński
c802118e81 Update scheduler tests 2022-05-27 14:57:21 +02:00
Wojciech Tyczyński
6f706775bc Clean shutdown of test apiserver 2022-05-26 10:42:48 +02:00
ahrtr
fe95aa614c io/ioutil has already been deprecated in golang 1.16, so replace all ioutil with io and os 2022-02-03 05:32:12 +08:00
Antonio Ojea
0cd75e8fec run hack/update-netparse-cve.sh 2021-08-20 10:42:09 +02:00
David Eads
84590fe27c remove --ssh- options, deprecated 13 releases, that only work on GCE 2021-06-03 13:54:35 -04:00
Shihang Zhang
925900317e allow multiple of --service-account-issuer 2021-04-19 09:54:11 -07:00
tiloso
3cbdc711de Fix staticcheck in test/integration/{examples,framework}
Part of #92402, fixes staticcheck failures SA1006, SA1019 and SA2002 in
test/integration/examples and test/integration/framework.
2020-12-14 21:54:37 +01:00
knight42
cfc2b330a7
refactor(apiserver): ignore the insecure flags
Leave the insecure flags intact but stop serving on insecure port.
2020-10-29 23:20:17 +08:00
Daniel Smith
15e0e3e90e rename 2020-09-02 10:48:26 -07:00
Mateusz Gozdek
dfe1f968ac
kube-apiserver: use SO_REUSEPORT when creating listener on Unix systems
So multiple instances of kube-apiserver can bind on the same address and
port, to provide seamless upgrades.

Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
2020-03-13 23:55:57 +01:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
Mike Danese
d55d6175f8 refactor 2020-01-29 08:50:45 -08:00
Mike Danese
a4ca9e6c93 migrate callers to g/g/uuid 2019-11-04 23:15:29 -08:00
David Eads
f14f4c933e add ability to pre-configure poststarthooks for apiservers 2019-10-01 09:08:18 -04:00
Khaled Henidak(Kal)
93c06821e6 Phase 2: service and endpoint processing 2019-08-28 15:59:43 +00:00
Lubomir I. Ivanov
76906dd738 test: partially decouple from cmd/kubeadm
The test package imports cmd/kubeadm, which is far from ideal.
There are a couple of reasons for the import:
1) Marshaling of Ingress from api/extensions/v1beta1.

To fix that include a local function in e2e/manifest/manifest.go
that does that same as the kubeadm MarshalToYaml.

2) Using PKI helper function in apimachinery and auth tests.

To fix that include a new file under test/utils/pki_helpers.go
that only contains the required helpers instead of including the whole
kubeadm pkiutil package.

There is another related problem:
e2e_node/e2e_node_suite_test.go includes:
k8s.io/kubernetes/cmd/kubeadm/app/util/system

But this has to be done in a follow up.
2019-04-04 15:41:28 +03:00
Jordan Liggitt
8f47501418 Ensure namespaces exist on start 2019-03-07 15:09:46 -05:00
Eric Walker
75df4dc04c Remove test/integration/* from hack/.golint_failures 2019-02-28 19:52:39 -07:00
Andrew Lytvynov
18458392ca Extract new keyutil package from client-go/util/cert
This package contains public/private key utilities copied directly from
client-go/util/cert. All imports were updated.

Future PRs will actually refactor the libraries.

Updates #71004
2019-02-19 09:48:59 -08:00
mourya007
7c37e91a6d Re-Organize the pkutil library 2019-01-26 14:56:36 +05:30
Patrick Barker
d995047366 adds dynamic audit integration test 2019-01-16 16:24:02 -08:00