Commit Graph

139 Commits

Author SHA1 Message Date
Cici Huang
0486e06261 Adding new api version of admissionregistration.k8s.io v1alpha1 for CEL in Admission Control 2022-11-07 20:51:51 +00:00
SataQiu
ecfae2bebe kube-apiserver: keep the types of LeaseEndpointReconcilerType and NoneEndpointReconcilerType the same as MasterCountReconcilerType 2022-10-26 21:49:31 +08:00
Shihang Zhang
569cd70a52 track legacy service account tokens 2022-10-24 09:37:53 -07:00
Andrew Sy Kim
c4c867dd96 add comments for Test_Controller in pkg/controlplane/controller/apiserverleasegc
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
2022-10-18 20:40:21 -04:00
Andrew Sy Kim
4a89500478 add unit tests for apiserverleasegc controller
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
2022-10-18 20:39:10 -04:00
Monis Khan
f507bc2553
Load encryption config once
This change updates the API server code to load the encryption
config once at start up instead of multiple times.  Previously the
code would set up the storage transformers and the etcd healthz
checks in separate parse steps.  This is problematic for KMS v2 key
ID based staleness checks which need to be able to assert that the
API server has a single view into the KMS plugin's current key ID.

Signed-off-by: Monis Khan <mok@microsoft.com>
2022-10-13 10:52:29 -04:00
Abu Kashem
e1a764d635
apiserver: enable v1beta3 for apf 2022-09-21 18:54:19 -04:00
Kubernetes Prow Robot
f510bcac90
Merge pull request #112402 from tkashem/test-beta-default
test: new beta version should be disabled by group,version
2022-09-19 13:17:33 -07:00
m.nabokikh
00dfba473b Add auth API to get self subject attributes
Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
2022-09-14 18:00:26 +02:00
Abu Kashem
8e7c4353b0
test: new beta version should be disabled by group,version 2022-09-12 14:34:22 -04:00
Antonio Ojea
abf74613ac remove dead code 2022-08-25 23:19:26 +02:00
Sarvesh Rangnekar
7093b10416 Introduce networking/v1alpha1 api, ClusterCIDR type
Introduce networking/v1alpha1 api group.

Add `ClusterCIDR` type to networking/v1alpha1 api group, this type
will enable the NodeIPAM controller to support multiple ClusterCIDRs.
2022-08-05 00:54:00 +00:00
Davanum Srinivas
a9593d634c
Generate and format files
- Run hack/update-codegen.sh
- Run hack/update-generated-device-plugin.sh
- Run hack/update-generated-protobuf.sh
- Run hack/update-generated-runtime.sh
- Run hack/update-generated-swagger-docs.sh
- Run hack/update-openapi-spec.sh
- Run hack/update-gofmt.sh

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-07-26 13:14:05 -04:00
Kubernetes Prow Robot
f19a26a22e
Merge pull request #111191 from aojea/controller-client-go
refactor controlplane to use just one client-go
2022-07-18 16:55:30 -07:00
Antonio Ojea
586a3d4ac5 refactor controlplane to use just one client-go 2022-07-16 13:36:32 +02:00
Abirdcfly
00b9ead02c cleanup: remove duplicate import
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-07-14 11:25:19 +08:00
Patrick Ohly
2e8fa3ee6b CSIStorageCapacity: use v1 as storage version
This can be done because downgrades are only supported down to 1.24 and that
release supports v1.
2022-07-08 10:06:06 +02:00
ZhangKe10140699
f218f7b262 Computation of the StorageVersionHash use overridden storage versions in unit test 2022-07-08 06:32:27 +08:00
Wojciech Tyczyński
b54363aceb Clean shutdown of storageversion integration tests 2022-06-06 20:33:20 +02:00
Kubernetes Prow Robot
901434942c
Merge pull request #107878 from danwinship/apiserver-endpointslice-cleanup
Clean up some EndpointSlice-related code in apiserver endpoint reconciler
2022-06-01 17:55:45 -07:00
Dan Winship
c44f5467a2 Remove unused and un-enable-able apiserver multiple ports feature
Theoretically, the apiserver could be told to advertise additional
ports on the kubernetes service, but there was no way to enable this
functionality without forking/vendoring the apiserver code. This was
apparently added in the distant past for OpenShift to use, but it has
not been used in OpenShift since Kubernetes 1.11.
2022-05-27 08:46:44 -04:00
Dan Winship
80e9d948e3 Add more Endpoints vs EndpointsSlices reconciler tests 2022-05-27 08:46:24 -04:00
Dan Winship
07de59ab60 Remove unused endpointSlicesEnabled fields 2022-05-27 08:46:23 -04:00
Dan Winship
91338c13df Use EndpointSlices in all reconciler unit tests
EndpointSlice is always enabled now, so make it non-optional in the
EndpointsAdapter, make all of the test cases pass an EndpointSlice
client, and remove the "EndpointSlices disabled"-specific tests.

By changing makeEndpointsArray() to return both an Endpoints and an
EndpointsSlice, the "initialObjects" and "expectCreate"/"expectUpdate"
fields of (almost) all of the existing unit tests are automatically
switched to be EndpointSlice-aware; instead of having an initial state
with just Endpoints (or nothing), and testing that just the Endpoints
is created/updated correctly, they now have an initial state with both
Endpoints and EndpointSlice (or nothing), and test that both objects
are created/updated correctly.

The handful of existing test cases that used inconsistent Endpoints
and EndpointSlice state have been modified to create the objects
separately.
2022-05-27 08:46:23 -04:00
Dan Winship
f543e7434a Improve reconciler test result checking
Consistently verify creates/updates based on the fake client's action
tracking, not based on the return values of the reconciler functions.
(This will also let us check that both Endpoints and EndpointSlices
were created/updated correctly.)
2022-05-27 08:46:23 -04:00
Dan Winship
4033de2034 Simplify endpoint creation in reconciler unit tests
Also make the expectCreate / expectUpdate fields into arrays while
we're rewriting their values anyway, to avoid additional churn in the
next commit.
2022-05-27 08:46:23 -04:00
Dan Winship
b07fe3a974 Simplify reconciler unit test setup
Pass initial state objects to fake.NewSimpleClientSet() rather than
calling Create() by hand.

(This will make it easier to have an initial state that is a mix of
Endpoints and EndpointSlices later on.)
2022-05-27 08:46:23 -04:00
Dan Winship
007ca4f69d Use t.Run() consistently in reconciler unit tests 2022-05-27 08:46:23 -04:00
Dan Winship
217f720c72 Fix up some kubernetes service reconciling code organization.
When the endpoint reconcilers got split out of pkg/controlplane,
GetMasterServiceUpdateIfNeeded() got moved to
pkg/controlplane/reconcilers, even though it needs to be kept in sync
with CreateOrUpdateMasterServiceIfNeeded() which stayed in
pkg/controlplane. (And everything else in pkg/controlplane/reconcilers
is about the Endpoints not the Service anyway.) So move it back.

On the flip side, the implementation of masterCountEndpointReconciler
got moved to pkg/controlplane/reconcilers, but its unit tests didn't.
So belatedly fix that.
2022-05-26 13:39:54 -04:00
Wojciech Tyczyński
b5550a3452 Cleanup portallocator/ipallocator interfaces 2022-05-23 12:19:24 +02:00
David Eads
8d5360ccbc remove enabled by default beta resources that have been removed 2022-05-18 09:37:42 -04:00
Wojciech Tyczyński
f1d901861b Migrate ipallocator and portallocator to new Events API 2022-05-09 09:37:47 +02:00
Wojciech Tyczyński
33dca56ba8 Destroy endpoints-reconciler lease storage on shutdown 2022-05-05 13:45:48 +02:00
James Laverack
7d57d5c70d Revert "Introduce APIs to support multiple ClusterCIDRs (#108290)"
This reverts commit b9792a9dae.
2022-04-13 13:58:19 +01:00
Sarvesh Rangnekar
b9792a9dae
Introduce APIs to support multiple ClusterCIDRs (#108290)
* Introduce networking/v1alpha1 api, ClusterCIDRConfig type

Introduce networking/v1alpha1 api group.

Add `ClusterCIDRConfig` type to networking/v1alpha1 api group, this type
will enable the NodeIPAM controller to support multiple ClusterCIDRs.

* Change ClusterCIDRConfig.NodeSelector type in api

* Fix review comments for API

* Update ClusterCIDRConfig API Spec

Introduce PerNodeHostBits field, remove PerNodeMaskSize
2022-03-30 19:39:00 -07:00
Kubernetes Prow Robot
0b79a791ed
Merge pull request #107180 from ardaguclu/remove-deprecated-serverresource
Remove deprecated discovery/ServerResources function
2022-03-25 23:45:21 -07:00
Kubernetes Prow Robot
14e8db067e
Merge pull request #108191 from ravisantoshgudimetla/wire-cert-contexts
Wire cert contexts
2022-03-23 11:20:17 -07:00
Patrick Ohly
921edae2b4 storage capacity: v1 API 2022-03-14 20:05:45 +01:00
Ravi Gudimetla
8b84a793b3 API Server Changes
This commit includes all the changes needed for APIServer. Instead of modifying the existing signatures for the methods which either generate or return stopChannel, we generate a context from the channel and use the generated context to be passed to the controllers which are started in APIServer. This ensures we don't have to touch APIServer dependencies.
2022-03-07 09:37:01 -05:00
David Eads
af99d192cf prevent enabling beta by default for new api groups 2022-02-23 13:51:43 -05:00
David Eads
a59b92e8c0 reduce API surface area of whether a resource is enabled 2022-02-23 13:36:33 -05:00
Sergey Kanzhelev
06ee2969ef do not serve node.k8s.io, version v1alpha1 2022-02-22 18:30:24 +00:00
David Eads
0ec20f97d2 migrate more rest handlers to select by resource enablement 2022-02-22 12:07:43 -05:00
Wojciech Tyczyński
3016b3d8f8 Change storage.Interface to utilize recurisve parameter 2022-02-21 12:52:05 +01:00
Kubernetes Prow Robot
a1ac74224e
Merge pull request #108062 from aojea/lease_reconciler
apiserver: use endpoint lease reconciler as default
2022-02-11 07:37:45 -08:00
Antonio Ojea
5a20c425f2 apiserver: use endpoint lease reconciler as default
The apiserver owns and manages the kubernetes.default service.

It has 3 different options to reconcile the endpoints that belong to
that service:

- None: endpoints are handled by an external party.
- MasterCount: legacy, it reconciles based on the endpoints generated
and a flag specifying the number of master on the cluster.
- Lease: default since 1.11, each apiserver writes a lease in etcd
and renews periodically, the endpoints are generated based on the
existing leases.

It seems that when the default was set for the lease reconciler, the
controlplane code wasn't updated and kept using the master count
reconciler.

This also starts the deprecation of the master count reconciler in
favor of the lease reconciler.
2022-02-11 09:00:54 +01:00
David Eads
41b2662bac update resourceconfig to have per-resource preferences take priority 2022-02-10 10:53:16 -05:00
Davanum Srinivas
ba1f853b5a
Add mwielgus back
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-01-10 09:02:53 -05:00
Davanum Srinivas
9682b7248f
OWNERS cleanup - Jan 2021 Week 1
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-01-10 08:14:29 -05:00
Kubernetes Prow Robot
7dcad28ab0
Merge pull request #105800 from benluddy/apf-bootstrap-configuration-lister
Use a lister for bootstrap flowcontrol config objects.
2022-01-04 07:30:52 -08:00