From 59467ef4563ac0c9a95fa1d205e5b1fa4a8f250e Mon Sep 17 00:00:00 2001 From: Jefftree Date: Wed, 21 Feb 2024 18:40:52 -0500 Subject: [PATCH 1/4] placeholder From 4d80f852dbb724243c636578de45a5438631a6be Mon Sep 17 00:00:00 2001 From: Jefftree Date: Tue, 12 Mar 2024 13:27:02 -0400 Subject: [PATCH 2/4] aggregated discovery stable --- content/en/docs/concepts/overview/kubernetes-api.md | 12 ++++++------ .../feature-gates/aggregated-discovery-endpoint.md | 3 +++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/content/en/docs/concepts/overview/kubernetes-api.md b/content/en/docs/concepts/overview/kubernetes-api.md index c0306c30846b3..aa7bca3d681d0 100644 --- a/content/en/docs/concepts/overview/kubernetes-api.md +++ b/content/en/docs/concepts/overview/kubernetes-api.md @@ -71,22 +71,22 @@ separate endpoint for each group version. ### Aggregated discovery -{{< feature-state state="beta" for_k8s_version="v1.27" >}} +{{< feature-state state="stable" for_k8s_version="v1.27" >}} -Kubernetes offers beta support for aggregated discovery, publishing +Kubernetes offers stable support for aggregated discovery, publishing all resources supported by a cluster through two endpoints (`/api` and `/apis`). Requesting this endpoint drastically reduces the number of requests sent to fetch the discovery data from the cluster. You can access the data by requesting the respective endpoints with an `Accept` header indicating the aggregated discovery resource: -`Accept: application/json;v=v2beta1;g=apidiscovery.k8s.io;as=APIGroupDiscoveryList`. +`Accept: application/json;v=v2;g=apidiscovery.k8s.io;as=APIGroupDiscoveryList`. Without indicating the resource type using the `Accept` header, the default response for the `/api` and `/apis` endpoint is an unaggregated discovery document. -The [discovery document](https://github.com/kubernetes/kubernetes/blob/release-v{{< skew currentVersion >}}/api/discovery/aggregated_v2beta1.json) +The [discovery document](https://github.com/kubernetes/kubernetes/blob/release-v{{< skew currentVersion >}}/api/discovery/aggregated_v2.json) for the built-in resources can be found in the Kubernetes GitHub repository. This Github document can be used as a reference of the base set of the available resources if a Kubernetes cluster is not available to query. @@ -295,14 +295,14 @@ cluster. {{< feature-state feature_gate_name="AggregatedDiscoveryEndpoint" >}} -Kubernetes offers beta support for aggregated discovery, publishing +Kubernetes offers stable support for aggregated discovery, publishing all resources supported by a cluster through two endpoints (`/api` and `/apis`) compared to one for every group version. Requesting this endpoint drastically reduces the number of requests sent to fetch the discovery for the average Kubernetes cluster. This may be accessed by requesting the respective endpoints with an Accept header indicating the aggregated discovery resource: -`Accept: application/json;v=v2beta1;g=apidiscovery.k8s.io;as=APIGroupDiscoveryList`. +`Accept: application/json;v=v2;g=apidiscovery.k8s.io;as=APIGroupDiscoveryList`. The endpoint also supports ETag and protobuf encoding. diff --git a/content/en/docs/reference/command-line-tools-reference/feature-gates/aggregated-discovery-endpoint.md b/content/en/docs/reference/command-line-tools-reference/feature-gates/aggregated-discovery-endpoint.md index 1b82dec7618e3..b6cba1e2402b3 100644 --- a/content/en/docs/reference/command-line-tools-reference/feature-gates/aggregated-discovery-endpoint.md +++ b/content/en/docs/reference/command-line-tools-reference/feature-gates/aggregated-discovery-endpoint.md @@ -13,6 +13,9 @@ stages: - stage: beta defaultValue: true fromVersion: "1.27" + - stage: stable + defaultValue: true + fromVersion: "1.30" --- Enable a single HTTP endpoint `/discovery/` which supports native HTTP caching with ETags containing all APIResources known to the API server. From 294dbbb3f65bab1257e5b275d5684208bb2c478d Mon Sep 17 00:00:00 2001 From: Jefftree Date: Mon, 25 Mar 2024 10:26:29 -0400 Subject: [PATCH 3/4] update comments --- .../docs/concepts/overview/kubernetes-api.md | 28 ++----------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/content/en/docs/concepts/overview/kubernetes-api.md b/content/en/docs/concepts/overview/kubernetes-api.md index aa7bca3d681d0..3a314bbed7c51 100644 --- a/content/en/docs/concepts/overview/kubernetes-api.md +++ b/content/en/docs/concepts/overview/kubernetes-api.md @@ -71,9 +71,9 @@ separate endpoint for each group version. ### Aggregated discovery -{{< feature-state state="stable" for_k8s_version="v1.27" >}} +{{< feature-state feature_gate_name="AggregatedDiscoveryEndpoint" >}} -Kubernetes offers stable support for aggregated discovery, publishing +Kubernetes offers stable support for _aggregated discovery_, publishing all resources supported by a cluster through two endpoints (`/api` and `/apis`). Requesting this endpoint drastically reduces the number of requests sent to fetch the @@ -282,30 +282,6 @@ packages that define the API objects. Kubernetes stores the serialized state of objects by writing them into {{< glossary_tooltip term_id="etcd" >}}. -## API Discovery - -A list of all group versions supported by a cluster is published at -the `/api` and `/apis` endpoints. Each group version also advertises -the list of resources supported via `/apis//` (for -example: `/apis/rbac.authorization.k8s.io/v1alpha1`). These endpoints -are used by kubectl to fetch the list of resources supported by a -cluster. - -### Aggregated Discovery - -{{< feature-state feature_gate_name="AggregatedDiscoveryEndpoint" >}} - -Kubernetes offers stable support for aggregated discovery, publishing -all resources supported by a cluster through two endpoints (`/api` and -`/apis`) compared to one for every group version. Requesting this -endpoint drastically reduces the number of requests sent to fetch the -discovery for the average Kubernetes cluster. This may be accessed by -requesting the respective endpoints with an Accept header indicating -the aggregated discovery resource: -`Accept: application/json;v=v2;g=apidiscovery.k8s.io;as=APIGroupDiscoveryList`. - -The endpoint also supports ETag and protobuf encoding. - ## API groups and versioning To make it easier to eliminate fields or restructure resource representations, From 2d9b1a465f2382184612901eb8d0bbf87e4f9eb7 Mon Sep 17 00:00:00 2001 From: Tim Bannister Date: Tue, 26 Mar 2024 12:05:02 +0000 Subject: [PATCH 4/4] Fix feature gate metadata Co-authored-by: Dipesh Rawat --- .../feature-gates/aggregated-discovery-endpoint.md | 1 + 1 file changed, 1 insertion(+) diff --git a/content/en/docs/reference/command-line-tools-reference/feature-gates/aggregated-discovery-endpoint.md b/content/en/docs/reference/command-line-tools-reference/feature-gates/aggregated-discovery-endpoint.md index b6cba1e2402b3..047217ceedda8 100644 --- a/content/en/docs/reference/command-line-tools-reference/feature-gates/aggregated-discovery-endpoint.md +++ b/content/en/docs/reference/command-line-tools-reference/feature-gates/aggregated-discovery-endpoint.md @@ -13,6 +13,7 @@ stages: - stage: beta defaultValue: true fromVersion: "1.27" + toVersion: "1.29" - stage: stable defaultValue: true fromVersion: "1.30"