Commit Graph

170 Commits

Author SHA1 Message Date
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
Arda Güçlü
ef39a89142 Remove deprecated discovery/ServerResources function
ServerResources function was deprecated and instead ServerGroupsAndResources
function is suggested.

This PR removes ServerResources function and move every place to use ServerGroupsAndResources.
2021-12-22 11:14:09 +03:00
Kubernetes Prow Robot
62faf2cdc2
Merge pull request #106721 from aojea/apiserver_dual_service
apiserver endpoint reconciler ip families
2021-12-17 15:23:54 -08:00
Davanum Srinivas
497e9c1971
Cleanup OWNERS files (No Activity in the last year)
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-12-15 10:34:02 -05: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
Davanum Srinivas
9405e9b55e
Check in OWNERS modified by update-yamlfmt.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-12-09 21:31:26 -05:00
wangyysde
d2abddd909 rename v2beta2 to v2
Signed-off-by: wangyysde <net_use@bzhy.com>

Generation swagger.json.

Use v2 path for hpa_cpu_field.

run update-codegen.sh

Signed-off-by: wangyysde <net_use@bzhy.com>
2021-11-09 10:34:54 +08:00
Ben Luddy
3f929b1634
Use a lister for bootstrap flowcontrol config objects.
Instead of listing all flowschemas and prioritylevelconfigurations on
each tick, read from local informer caches.
2021-10-20 11:40:00 -04:00
Antonio Ojea
da8ce6aa3e improve error message on control-plane endpoint reconciler 2021-10-08 19:16:46 +02:00
Kubernetes Prow Robot
372103f4b8
Merge pull request #100672 from wangyx1992/structured-log
Structured Logging migration: modify logs of controller-manager
2021-09-22 20:27:10 -07:00
Kubernetes Prow Robot
047a6b9f86
Merge pull request #104874 from wojtek-t/migrate_clock_1
Unify towards k8s.io/utils/clock - part 1
2021-09-13 19:09:20 -07:00
Kubernetes Prow Robot
06ec11d71b
Merge pull request #104883 from aojea/service_finalizer_delete
Add integration test for Services Finalizes Racing with the Repair Loop
2021-09-13 18:01:20 -07:00
Antonio Ojea
7c12daed0f move repair loop interval to a constant
use Extraconfig to configure the repair interval

and add an integration test for services finalizers, and
possible races with the services repair loop.
2021-09-13 23:54:19 +02:00
wojtekt
792408ae48 Migrate to k8s.io/utils/clock in lease controller 2021-09-10 14:27:44 +02:00
Abu Kashem
e2b8701545
apf: ebable v1beta2 2021-09-09 08:28:53 -04:00
Kubernetes Prow Robot
fca3175df7
Merge pull request #104231 from astraw99/fix_unified_workers
Unify controller worker num param `threadiness` to `workers`
2021-08-27 09:34:05 -07:00
Antonio Ojea
0cd75e8fec run hack/update-netparse-cve.sh 2021-08-20 10:42:09 +02:00
Jordan Liggitt
39a1293cbc Drop beta REST APIs removed in 1.22 2021-08-09 11:10:16 -04:00
astraw99
e6df935fd3 unify worker num to workers 2021-08-09 15:46:04 +08:00
David Eads
8aba8e2a2c remove the ssh tunneler implementation from kube-apiserver 2021-06-03 14:30:14 -04:00
David Eads
84590fe27c remove --ssh- options, deprecated 13 releases, that only work on GCE 2021-06-03 13:54:35 -04: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
David Eads
567418f377 update unit tests to handle APIs that were removed 2021-05-13 12:04:15 -04:00
wangyx1992
7175d82a27 Structured Logging migration: modify logs of controller-manager
Signed-off-by: wangyx1992 <wang.yixiang@zte.com.cn>
2021-04-25 11:27:44 +08:00
Kubernetes Prow Robot
496a94bf98
Merge pull request #100979 from mikedanese/tlscleanup
force implementors of dyanmiccertificates providers to think about notify
2021-04-20 09:06:33 -07:00
Monis Khan
91241eac9b
Prune stale entries from OWNERS files
Signed-off-by: Monis Khan <mok@vmware.com>
2021-04-13 20:54:50 -04:00
Mike Danese
9b7d654a08 force implementors of dyanmiccertificates providers to think about notify
Right now, `_, ok := provider.(Notifier); !ok` can mean one of two
things:

1. The provider does not support notification because the provided
   content is static.
2. The implementor of the provider hasn't gotten around to implementing
   Notifier yet.

These have very different implications. We should not force consumers of
these interfaces to have to figure out the static of Notifier across
sometimes numerous different implementations. Instead, we should force
implementors to implement Notifier, even if it's a noop.

Change-Id: Ie7a26697a9a17790bfaa58d67045663bcc71e3cb
2021-04-12 11:29:15 -07:00
Morten Torkildsen
21fba79d45 Promote PDBs to GA 2021-03-09 10:29:11 -05:00
Patrick Ohly
a94c141060 CSIStorageCapacity: promote API to beta
The v1alpha1 API is left in place for now to ease the migration.
2021-03-08 20:52:50 +01:00
Swetha Repakula
6bc5796750 Update controlplane to use EndpointSlice V1 API 2021-03-06 20:05:24 -08:00
Swetha Repakula
108fd44f7c Graduate EndpointSlice feature gate to GA 2021-03-06 15:58:47 -08:00
Kubernetes Prow Robot
36244f31ef
Merge pull request #99662 from swetharepakula/eps-ga-api-changes
Graduate EndpointSlice API to GA
2021-03-06 15:23:54 -08:00
Swetha Repakula
a9891b4b9b Graduate EndpointSlice API to GA
* Removes discovery v1alpha1 API
  * Replaces per Endpoint Topology with a read only DeprecatedTopology
  in GA API
  * Adds per Endpoint Zone field in GA API
2021-03-05 12:02:41 -08:00
Maciej Szulik
9364d0fc81
Promote CronJobs to batch/v1 2021-03-05 12:44:23 +01:00
Kubernetes Prow Robot
110b9272f2
Merge pull request #99782 from liggitt/race-tests
Fix or remove tests that don't work in race mode
2021-03-04 18:34:48 -08:00
Swetha Repakula
6f5329d4c0 Remove EndpointSliceNodeName feature gate logic
- feature gate has graduated to GA and will always be enabled, so no
 longer need to check if enabled
2021-03-04 09:57:15 -08:00
Jordan Liggitt
68bb8b827b Fix or remove tests that don't work in race mode 2021-03-04 09:51:52 -05:00
David Eads
3cf9bc547f Use a versioner to convert an internal type into an external type for
beta serving
2021-03-03 07:05:43 -05:00
Jordan Liggitt
4515889574 Prefer v1 storage versions 2021-03-02 12:06:13 -05:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
Kubernetes Prow Robot
5c7338339d
Merge pull request #99011 from deads2k/stop-extensions
conditionally serve beta
2021-02-23 19:16:49 -08:00
Kubernetes Prow Robot
4f1dd5d2fb
Merge pull request #96987 from soltysh/drop_batch-alpha
Drop batch/v2alpha1
2021-02-17 06:35:06 -08:00
Nikhita Raghunath
6cef3a4e33 *: remove nikhiljindal from OWNERS 2021-02-16 10:59:26 +05:30
Nikhita Raghunath
6b12c96a9b *: remove madhusudancs from reviewers 2021-02-16 10:59:26 +05:30
Nikhita Raghunath
b11516d69f *: move gmarek to emeritus_approvers 2021-02-16 10:59:19 +05:30
David Eads
f6941fcfa2 move removed kind evaluation to genericapiserver 2021-02-12 12:20:39 -05:00
Maciej Szulik
7d9f36cd85
Generated changes 2021-02-12 17:51:15 +01:00
Maciej Szulik
3dab7462d1
Drop batch/v2alpha1 API 2021-02-12 17:51:12 +01:00
Michael Taufen
6aa80d9172 Graduate ServiceAccountIssuerDiscovery to GA
Waiting on KEP updates first:
https://github.com/kubernetes/enhancements/pull/2363
2021-02-01 11:44:23 -08:00
David Eads
37cc89ed8d finish removal of exportoptions 2021-01-22 13:47:31 -05:00
wojtekt
c2d61896f4 Add suggestion to storage interface Delete method 2020-12-16 08:12:57 +01:00
Kubernetes Prow Robot
36f571404f
Merge pull request #96527 from adtac/apfbeta
promote API priority and fairness types and APIs to beta
2020-11-13 19:33:04 -08:00
yue9944882
849be447f5 APF: graduate API and types to beta
Signed-off-by: Adhityaa Chandrasekar <adtac@google.com>
2020-11-13 23:20:39 +00:00
Laszlo Janosi
c970a46bc1
Mixed protocol support for Services with type=LoadBalancer (#94028)
* Mixed protocol support for Services with type=LoadBalancer

KEP: https://github.com/kubernetes/enhancements/blob/master/keps/sig-network/20200103-mixed-protocol-lb.md
Add new feature gate to control the support of mixed protocols in Services with type=LoadBalancer
Add new fields to the ServiceStatus
  Add Ports to the LoadBalancerIngress, so cloud provider implementations can report the status of the requested load balanc
er ports
  Add ServiceCondition to the ServiceStatus so Service controllers can indicate the conditions of the Service

* regenerate conflicting stuff
2020-11-13 13:21:04 -08:00
Kubernetes Prow Robot
ec734aced7
Merge pull request #96525 from deads2k/beta-stop-serving-2
stop serving deleted APIs
2020-11-13 10:53:14 -08:00
Kubernetes Prow Robot
765d949bfc
Merge pull request #96440 from robscott/endpointslice-pre-ga
Adding NodeName to EndpointSlice API, deprecation updates
2020-11-12 16:03:13 -08:00
Rob Scott
84e4b30a3e
Updates related to PR feedback
- Remove feature gate consideration from EndpointSlice validation
- Deprecate topology field, note that it will be removed in future
release
- Update kube-proxy to check for NodeName if feature gate is enabled
- Add comments indicating the feature gates that can be used to enable
alpha API fields
- Add comments explaining use of deprecated address type in tests
2020-11-12 12:30:50 -08:00
David Eads
e0a2383699 stop serving deleted APIs 2020-11-12 14:19:58 -05:00
Kubernetes Prow Robot
12d9183da0
Merge pull request #95718 from SergeyKanzhelev/runtimeClass2
RuntimeClass GA
2020-11-12 00:44:51 -08:00
Kubernetes Prow Robot
9223413a77
Merge pull request #95579 from masap/fix_cidr_warning
test: Fix using deprecated default cluster IPs
2020-11-11 22:38:49 -08:00
Rob Scott
877ad98c53
Updating ControlPlane to support NodeName field 2020-11-11 16:50:40 -08:00
Sergey Kanzhelev
06da0e5e74 GA of RuntimeClass feature gate and API 2020-11-11 19:22:32 +00:00
Kubernetes Prow Robot
f5e4a73266
Merge pull request #96196 from roycaihw/move-lease-controller
Move lease controller to k8s.io/component-helpers/apimachinery
2020-11-11 01:50:28 -08:00
Haowei Cai
e79ba4877e move lease controller to k8s.io/component-helpers/apimachinery 2020-11-10 15:51:03 -08:00
Haowei Cai
e363709d73 add V(4) log when apiserver lease was deleted before this controller reacts 2020-11-10 15:32:16 -08:00
Haowei Cai
bfebc7aefd generated 2020-11-10 15:32:16 -08:00
Haowei Cai
1d43fd4694 add apiserver lease garbage collector 2020-11-10 15:12:14 -08:00
Kubernetes Prow Robot
281866b35c
Merge pull request #95533 from roycaihw/apiserver-lease-controller
Add kube-apiserver lease controller
2020-11-06 18:09:37 -08:00
Haowei Cai
39f8daf967 generated 2020-11-06 13:33:08 -08:00
Haowei Cai
3761a00e5b add kube-apiserver-lease-controller poststart hook 2020-11-06 13:33:08 -08:00