Commit Graph

410 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
edac6fce2a
Merge pull request #109338 from kerthcet/cleanup/forget-to-close-when-error
test/integration/framework: call closeFn() in startAPIServerOrDie() on error
2022-05-03 19:31:22 -07:00
Kubernetes Prow Robot
cc2807c521
Merge pull request #109303 from wojtek-t/clean_storage_shutdown
Cleanup rest storage resources on shutdown
2022-05-03 19:30:57 -07:00
Kubernetes Prow Robot
743238e951
Merge pull request #108048 from aojea/custom_etcd_integration
integration: custom etcd gracefully termination
2022-05-03 17:18:48 -07:00
Wojciech Tyczyński
e95f8f2e42 Clean apiserver shutdown in integration tests 2022-04-19 15:59:13 +02:00
Antonio Ojea
1756fe60d4 integration: custom etcd gracefully termination
when running integration tests without an external etcd, the framework
spawns an etcd instance executing it in its own process and killing
it once the test stops.

Instead of killing it directly, allow etcd to exit gracefully or kill
it after 5 seconds.
2022-04-18 19:09:38 +02:00
kerthcet
fbf07e989c fix: forget to call close() in error
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-04-06 22:21:23 +08:00
Jefftree
67d3dbfaae Separate OpenAPI V2 and V3 Config 2022-03-29 17:49:56 -07:00
Antonio Ojea
2660ac8a6d integration framework: log number of leaked goroutines 2022-03-01 15:31:13 +01:00
Kubernetes Prow Robot
21c0f6f6ff
Merge pull request #107677 from pohly/scheduler-integration-benchmark
scheduler integration benchmark improvements
2022-02-14 01:23:28 -08:00
Patrick Ohly
e1e84c8e5f scheduler_perf: run with -v=0 by default
This provides a mechanism for overriding the forced increase of the klog
verbosity to 4 when starting the apiserver and uses that for the scheduler_perf
benchmark. Other tests run as before.

A global variable was used because adding an explicit parameter to several
helper functions would have caused a lot of code churn (test ->
integration/util.StartApiserver ->
integration/framework.RunAnAPIServerUsingServer ->
integration/framework.startAPIServerOrDie).
2022-02-11 16:58:33 +01: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
Jeffrey Ying
ecb9b620fe
Revert "Populate OpenAPI in all integration tests" 2022-01-26 13:30:03 -05:00
Jefftree
eb8f6fe0f9 Populate OpenAPI in all integration tests 2022-01-25 14:16:31 -08:00
jlsong01
3006aa534b fix flake on TestQuotaLimitService 2022-01-19 21:58:57 +08:00
Antonio Ojea
cd9b22aabc apiserver endpoint reconciler ip families
The apiserver may be configured to generate the Service
kubernetes.default and its endpoints addresses.

This service is single-stack, hence, the endpoints and the ClusterIP
must have the same IP family.
2021-12-13 15:43:41 +01:00
Jiahui Feng
9c05de2f31 prune enum when OpenAPIEnums is disabled. 2021-11-09 13:00:00 -08:00
Patrick Ohly
21d1bcd6b8 initialize logging after flag parsing
It wasn't documented that InitLogs already uses the log flush frequency, so
some commands have called it before parsing (for example, kubectl in the
original code for logs.go). The flag never had an effect in such commands.

Fixing this turned into a major refactoring of how commands set up flags and
run their Cobra command:

- component-base/logs: implicitely registering flags during package init is an
  anti-pattern that makes it impossible to use the package in commands which
  want full control over their command line. Logging flags must be added
  explicitly now, something that the new cli.Run does automatically.

- component-base/logs: AddFlags would have crashed in kubectl-convert if it
  had been called because it relied on the global pflag.CommandLine. This
  has been fixed and kubectl-convert now has the same --log-flush-frequency
  flag as other commands.

- component-base/logs/testinit: an exception are tests where flag.CommandLine has
  to be used. This new package can be imported to add flags to that
  once per test program.

- Normalization of the klog command line flags was inconsistent. Some commands
  unintentionally didn't normalize to the recommended format with hyphens. This
  gets fixed for sample programs, but not for production programs because
  it would be a breaking change.

This refactoring has the following user-visible effects:

- The validation error for `go run ./cmd/kube-apiserver --logging-format=json
  --add-dir-header` now references `add-dir-header` instead of `add_dir_header`.

- `staging/src/k8s.io/cloud-provider/sample` uses flags with hyphen instead of
  underscore.

- `--log-flush-frequency` is not listed anymore in the --logging-format flag's
  `non-default formats don't honor these flags` usage text because it will also
  work for non-default formats once it is needed.

- `cmd/kubelet`: the description of `--logging-format` uses hyphens instead of
  underscores for the flags, which now matches what the command is using.

- `staging/src/k8s.io/component-base/logs/example/cmd`: added logging flags.

- `apiextensions-apiserver` no longer prints a useless stack trace for `main`
  when command line parsing raises an error.
2021-09-30 13:46:49 +02:00
Kubernetes Prow Robot
86d23cf441
Merge pull request #105206 from pohly/test-integration-help
test/integration: skip etcd startup for -help flag
2021-09-24 10:29:23 -07:00
Patrick Ohly
81b4a695b3 test/integration: skip etcd startup for -help flag
By parsing flags in the test's main function before starting etcd we bail out
early without ever starting etcd when the test was invoked with -help.

Otherwise etcd must be available, gets started and then hangs because
flag.Parse itself exits when called by testing.go. This bypasses the code in
EtcdMain which normally stops etcd.
2021-09-24 11:51:58 +02:00
Kubernetes Prow Robot
686379281d
Merge pull request #97665 from heqg/unused-function-NewSingleContentTypeSerializer
remove unused function of NewSingleContentTypeSerializer
2021-09-21 22:16:00 -07:00
Abu Kashem
d99497ef6d
apf: update e2e test to use v1beta2 2021-09-09 08:28:58 -04:00
Antonio Ojea
0cd75e8fec run hack/update-netparse-cve.sh 2021-08-20 10:42:09 +02:00
Abu Kashem
581b088f76
integration test: provide a timeout for /health 2021-07-09 08:38:15 -04:00
Mengjiao Liu
8e4212c01a test/integration: rename package and files name from master to controlplane in test/integration 2021-06-29 17:21:29 +08:00
Jordan Liggitt
52b629efbc Drop use of deprecated clientv3.SetLogger 2021-06-15 09:53:06 -04:00
Jordan Liggitt
2979c3325e Switch to go.etcd.io/etcd/client/v3 2021-06-15 09:53:06 -04:00
Kubernetes Prow Robot
51cbebab1f
Merge pull request #102687 from mengjiao-liu/rename-master-to-controlplane
test/integration: Rename master to controlplane
2021-06-14 09:49:16 -07:00
Marek Siarkowicz
12447bc803 Upgrade etcd server version to 3.5.0-rc.0 2021-06-09 17:00:05 +02:00
Mengjiao Liu
0fcd3c951c test/integration: Rename master to controlplane or apiserver 2021-06-08 17:26:57 +08:00
Mengjiao Liu
257b494478 test/integration: Rename masterConfig to instanceConfig 2021-06-08 17:21:47 +08:00
Mengjiao Liu
ac5535c949 test/integration: Rename MasterConfigOptions to ControlPlaneConfigOptions 2021-06-08 16:58:46 +08:00
Kubernetes Prow Robot
a52571144f
Merge pull request #102597 from mengjiao-liu/rename-masterConfig
test/integration: Rename masterConfig to controlPlaneConfig
2021-06-05 10:41:05 -07:00
Kubernetes Prow Robot
74af3b712d
Merge pull request #102297 from deads2k/ssh-tunnels
remove --ssh- options, deprecated 13 releases, that only work on GCE
2021-06-05 10:40:50 -07:00
Mengjiao Liu
6871b2b3c7 Rename masterConfig to controlPlaneConfig 2021-06-04 20:55:08 +08:00
David Eads
84590fe27c remove --ssh- options, deprecated 13 releases, that only work on GCE 2021-06-03 13:54:35 -04:00
Mengjiao Liu
ab45d5e496 part of master to controlplane in test/integration
SetMaster -> SetAPIServer
2021-06-04 00:08:13 +08:00
Mengjiao Liu
77b5ad2fb0 Part of master to controlplane in test/integration(1.22) 2021-06-03 18:29:05 +08:00
Mengjiao Liu
387154f1a9 Part3: master to controlplane in test/integration
Rename RunAMaster to RunAControlPlane
2021-06-03 11:06:19 +08:00
Mengjiao Liu
d3f92af74f Part of master to controlplane in test/integration
NewMasterConfig -> NewControlPlaneConfig
2021-05-28 14:39:52 +08:00
Mengjiao Liu
c9ec486287 Part of master to controlplane in test/integration
Rename NewIntegrationTestMasterConfig to NewIntegrationTestControlPlaneConfig
2021-05-25 13:26:28 +08:00
David Eads
d6a4afa5b8 update integration tests to reflect the kube version to stop serving removed APIs 2021-05-13 12:04:15 -04:00
Gautier Delorme
34b0fcef5f remove go-openapi/spec
Signed-off-by: Gautier Delorme <gautier.delorme@gmail.com>
2021-04-21 11:31:49 +02:00
Shihang Zhang
925900317e allow multiple of --service-account-issuer 2021-04-19 09:54:11 -07:00
pacoxu
ce50018a76 part1 of e2e: master to apiserver/control-plane
Signed-off-by: pacoxu <paco.xu@daocloud.io>
2021-03-31 15:50:18 +08:00
Benjamin Elder
1a7cf6c91a remove bazel logic from test/integration/framework 2021-03-07 15:27:44 -08:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
Wei Huang
9a67558784
Fix a bug that untolerated variable is used as tolerated 2021-02-02 16:04:02 -08:00
Mike Dame
578ff3ec34 Move Taint/Toleration helpers to component-helpers repo
This is part of the goal for scheduling to remove dependencies on internal
packages for the scheduling framework. It also provides these functions in an
external location for other components and projects to import.
2021-02-01 11:06:03 -05:00
he.qingguo
6340b7e0aa remove unused function of NewSingleContentTypeSerializer
Signed-off-by: he.qingguo <he.qingguo@zte.com.cn>
2021-01-04 10:40:37 +08: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