Commit Graph

100 Commits

Author SHA1 Message Date
Tim Allclair
1a1ca5173e Combine RequestAuditConfig with RequestAuditConfigWithLevel 2022-11-02 15:24:14 -07:00
Jordan Liggitt
2d397e8530
Avoid following redirects in aggregator availability controller 2022-09-28 10:56:21 -04: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
ec283e526b
Expand aggregated API server integration test to include CRUD
This change updates TestAggregatedAPIServer and the related test
server wiring to exercise the full network path between the Kube API
server and the aggregated API server.  We now assert that the wardle
API service and Kube API server discovery endpoints are fully healthy.
CRUD operations are performed through the Kube API server to the
wardle API server.

Signed-off-by: Monis Khan <mok@microsoft.com>
2022-08-30 10:44:01 -04:00
apeltop
e530336b18 fix typos 2022-06-15 13:38:48 +09:00
Wojciech Tyczyński
6f706775bc Clean shutdown of test apiserver 2022-05-26 10:42:48 +02:00
Lukasz Szaszkiewicz
c4e337c57c hardens TestAggregatedAPIServer
Since ClientCAs are provided by "client-ca::kube-system::extension-apiserver-authentication::client-ca-file" controller
we need to wait until it picks up the configmap (via a lister) before checking the CAs otherwise the response might contain an empty result.
2022-05-25 12:41:26 +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
Abu Kashem
a748fdc677
apiserver: refactor PolicyRuleEvaluator to return a struct 2021-09-24 08:08:32 -04:00
Antonio Ojea
0cd75e8fec run hack/update-netparse-cve.sh 2021-08-20 10:42:09 +02:00
Abu Kashem
27f1503514
rename audit Checker interface 2021-08-12 17:42:41 -04:00
David Eads
f3597cbf2a clean usage of admissionregistration/v1beta1 from tests 2021-03-03 17:39:31 -05:00
David Eads
fe8d8c2fda remove test usage of apiregistration/v1beta1 2021-03-03 17:26:02 -05:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -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
Daniel Smith
a86afc12df update scripts 2020-09-02 10:49:40 -07: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
25651408ae generated: run refactor 2020-02-08 12:30:21 -05: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
David Eads
3fbfe60ed2 make client authentication optional for test kube-apiserver 2019-11-13 10:25:28 -05:00
David Eads
3aede35b3b dynamic reload cluster authentication info for aggregated API servers 2019-11-13 07:54:27 -05:00
Jordan Liggitt
f0e33fee21 Change wardle API group to wardle.example.com 2019-11-04 12:57:16 -05: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
Joe Betz
55ecc45455 split admissionregistration.v1beta1/Webhook into MutatingWebhook and ValidatingWebhook 2019-05-30 14:31:09 -07: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
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
34d57f295f adds dynamic audit integration test generated 2019-01-16 16:27:51 -08:00
Patrick Barker
d995047366 adds dynamic audit integration test 2019-01-16 16:24:02 -08:00
Dr. Stefan Schimanski
7b242533a2 apiserver: separate transport setting from storagebackend.Config 2019-01-02 12:52:38 +01:00
Daniel Kłobuszewski
7a10f4eda7 Add option to k8s apiserver to reject incoming requests upon audit failure 2018-11-16 10:32:49 +01:00
Nail Islamov
38895a56a8
Add wait to discovery integration test to fix flakiness 2018-08-14 01:03:03 +10:00
Kubernetes Submit Queue
28d649c2f5
Merge pull request #66932 from nilebox/discovery-include-unavailable
Automatic merge from submit-queue (batch tested with PRs 66394, 66888, 66932). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Include unavailable apiservices in discovery response

**What this PR does / why we need it**:
Include unavailable apiservices into `apis/` discovery endpoint response to fix namespace deletion https://github.com/kubernetes-incubator/service-catalog/issues/2254

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes https://github.com/kubernetes-incubator/service-catalog/issues/2254

**Special notes for your reviewer**:

**Release note**:


```release-note
kube-apiserver now includes all registered API groups in discovery, including registered extension API group/versions for unavailable extension API servers.
```
2018-08-08 07:00:14 -07:00
Nail Islamov
d4690f4aec
Include unavailable API services in discovery response 2018-08-08 07:26:27 +03:00
yue9944882
6bac6fafa0 promote informers into master.Config
review:

1. move informers into master extra config
2. move one post start hook into New()

fixes npe from master integration test
2018-08-08 09:35:45 +08:00
xuzhonghu
416a478cf6 Add String method to audit.Backend interface 2018-07-18 17:55:01 +08:00
Jeff Grafton
23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
David Eads
c5445d3c56 simplify api registration 2018-05-08 18:33:50 -04:00
Jordan Liggitt
5d11dc2524
Make integration test etcd store unique 2018-04-23 13:02:04 -04:00
Jordan Liggitt
d421affd2d
loopback webhook integration test 2018-04-20 12:30:27 -04:00
Monis Khan
300751393b
Use a dynamic RESTMapper for admission plugins
This change updates the REST mapper used by all admission plugins to
be backed by cached discovery information.  This cache is updated
every ten seconds via a post start hook and will not attempt to
update on calls to RESTMapping.  It solely relies on the hook to
keep the cache in sync with discovery.

This prevents issues with the OwnerReferencesPermissionEnforcement
admission plugin when it is used with custom resources that set
blockOwnerDeletion.

Signed-off-by: Monis Khan <mkhan@redhat.com>
2018-04-17 09:59:41 -04:00
Dr. Stefan Schimanski
145167f908 Generated files 2018-04-17 11:44:29 +02:00
Dr. Stefan Schimanski
0bb9261eb8 sample-apiserver: add v1beta1 with advanced conversion example from v1alpha1 2018-04-17 11:43:58 +02:00
Dr. Stefan Schimanski
9f906618f0 apiserver: enforce shared RequestContextMapper in delegation chain 2018-04-05 14:41:56 +02:00
hzxuzhonghu
8cce8bdc85 make kube-apiserver ServerRunOptions setdefault and Validate before use 2018-04-04 11:19:55 +08:00
hzxuzhonghu
4c26831147 apiserver's webhook admission use its own scheme 2018-04-03 20:42:38 +08:00
hzxuzhonghu
755df0461d validate authorization flags in BuiltInAuthorizationOptions.Validate 2018-03-26 20:37:02 +08:00