Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,21 @@ If your repo has certain guidelines for contribution, put them here ahead of the

- [Slack](https://kubernetes.slack.com/messages/sig-scheduling)
- [Mailing List](https://groups.google.com/forum/#!forum/kubernetes-sig-scheduling)

## Feature gate documentation workflow

Kueue treats `pkg/features/kube_features.go` as the source of truth for every feature gate. After you change that file, run:

```shell
make featuregates-update
```

This command uses Kubernetes' `compatibility_lifecycle` tool to regenerate `test/compatibility_lifecycle/reference/versioned_feature_list.yaml` and copies the result to `site/data/featuregates/versioned_feature_list.yaml`. The docs under `site/content/*/docs/installation/_index.md` consume that YAML through the `feature-gates-table` shortcode, so no manual table edits are required.

CI enforces that the YAML and documentation stay in sync. You can run the same check locally with:

```shell
make featuregates-verify
```

or simply rely on `make verify`, which now calls the verification target automatically.
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,16 @@ toc-update: mdtoc
toc-verify: mdtoc
./hack/verify-toc.sh

##@ Documentation

.PHONY: featuregates-update
featuregates-update: ## Regenerate feature-gate YAML and site data.
$(PROJECT_DIR)/hack/update-featuregates.sh

.PHONY: featuregates-verify
featuregates-verify: ## Ensure feature-gate YAML and docs are in sync.
$(PROJECT_DIR)/hack/verify-featuregates.sh

.PHONY: helm-lint
helm-lint: helm ## Run Helm chart lint test.
${HELM} lint charts/kueue
Expand Down Expand Up @@ -262,7 +272,7 @@ sync-hugo-version:

PATHS_TO_VERIFY := config/components apis charts/kueue client-go site/ netlify.toml
.PHONY: verify
verify: gomod-verify ci-lint lint-api fmt-verify shell-lint toc-verify manifests generate update-helm helm-verify helm-unit-test prepare-release-branch sync-hugo-version npm-depcheck
verify: gomod-verify ci-lint lint-api fmt-verify shell-lint toc-verify featuregates-verify manifests generate update-helm helm-verify helm-unit-test prepare-release-branch sync-hugo-version npm-depcheck
git --no-pager diff --exit-code $(PATHS_TO_VERIFY)
if git ls-files --exclude-standard --others $(PATHS_TO_VERIFY) | grep -q . ; then exit 1; fi

Expand Down
4 changes: 3 additions & 1 deletion hack/internal/tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ tool (
gotest.tools/gotestsum
helm.sh/helm/v3/cmd/helm
k8s.io/code-generator
k8s.io/kubernetes/test/compatibility_lifecycle/cmd
sigs.k8s.io/controller-runtime/tools/setup-envtest
sigs.k8s.io/controller-tools/cmd/controller-gen
sigs.k8s.io/kind
Expand All @@ -35,6 +36,7 @@ require (
gotest.tools/gotestsum v1.13.0
helm.sh/helm/v4 v4.0.1
k8s.io/code-generator v0.34.2
k8s.io/kubernetes v1.34.2
sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20250407161039-6ad5c1dd4418
sigs.k8s.io/controller-tools v0.19.0
sigs.k8s.io/kind v0.30.0
Expand Down Expand Up @@ -175,7 +177,7 @@ require (
github.com/cncf/xds/go v0.0.0-20251110193048-8bfbf64dc13e // indirect
github.com/common-nighthawk/go-figure v0.0.0-20210622060536-734e95fb86be // indirect
github.com/containerd/containerd v1.7.29 // indirect
github.com/containerd/errdefs v0.3.0 // indirect
github.com/containerd/errdefs v1.0.0 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/containerd/platforms v0.2.1 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect
Expand Down
6 changes: 4 additions & 2 deletions hack/internal/tools/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,8 @@ github.com/common-nighthawk/go-figure v0.0.0-20210622060536-734e95fb86be h1:J5BL
github.com/common-nighthawk/go-figure v0.0.0-20210622060536-734e95fb86be/go.mod h1:mk5IQ+Y0ZeO87b858TlA645sVcEcbiX6YqP98kt+7+w=
github.com/containerd/containerd v1.7.29 h1:90fWABQsaN9mJhGkoVnuzEY+o1XDPbg9BTC9QTAHnuE=
github.com/containerd/containerd v1.7.29/go.mod h1:azUkWcOvHrWvaiUjSQH0fjzuHIwSPg1WL5PshGP4Szs=
github.com/containerd/errdefs v0.3.0 h1:FSZgGOeK4yuT/+DnF07/Olde/q4KBoMsaamhXxIMDp4=
github.com/containerd/errdefs v0.3.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M=
github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI=
github.com/containerd/errdefs v1.0.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M=
github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I=
github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo=
github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A=
Expand Down Expand Up @@ -1761,6 +1761,8 @@ k8s.io/kubectl v0.34.2 h1:+fWGrVlDONMUmmQLDaGkQ9i91oszjjRAa94cr37hzqA=
k8s.io/kubectl v0.34.2/go.mod h1:X2KTOdtZZNrTWmUD4oHApJ836pevSl+zvC5sI6oO2YQ=
k8s.io/kubelet v0.34.1 h1:doAaTA9/Yfzbdq/u/LveZeONp96CwX9giW6b+oHn4m4=
k8s.io/kubelet v0.34.1/go.mod h1:PtV3Ese8iOM19gSooFoQT9iyRisbmJdAPuDImuccbbA=
k8s.io/kubernetes v1.34.2 h1:WQdDvYJazkmkwSncgNwGvVtaCt4TYXIU3wSMRgvp3MI=
k8s.io/kubernetes v1.34.2/go.mod h1:m6pZk6a179pRo2wsTiCPORJ86iOEQmfIzUvtyEF8BwA=
k8s.io/metrics v0.34.2 h1:zao91FNDVPRGIiHLO2vqqe21zZVPien1goyzn0hsz90=
k8s.io/metrics v0.34.2/go.mod h1:Ydulln+8uZZctUM8yrUQX4rfq/Ay6UzsuXf24QJ37Vc=
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y=
Expand Down
1 change: 1 addition & 0 deletions hack/internal/tools/pinversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
_ "gotest.tools/gotestsum"
_ "helm.sh/helm/v4/cmd/helm"
_ "k8s.io/code-generator"
_ "k8s.io/kubernetes/test/compatibility_lifecycle"
_ "sigs.k8s.io/controller-runtime/tools/setup-envtest"
_ "sigs.k8s.io/controller-tools/cmd/controller-gen"
_ "sigs.k8s.io/kind"
Expand Down
35 changes: 35 additions & 0 deletions hack/update-featuregates.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env bash

# Copyright 2024 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -o errexit
set -o nounset
set -o pipefail

REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
MOD_FILE="${REPO_ROOT}/hack/internal/tools/go.mod"
K8S_TOOL_PKG="k8s.io/kubernetes/test/compatibility_lifecycle"
REFERENCE_DIR="${REPO_ROOT}/test/compatibility_lifecycle/reference"
REFERENCE_FILE="${REFERENCE_DIR}/versioned_feature_list.yaml"
SITE_DATA_DIR="${REPO_ROOT}/site/data/featuregates"
SITE_DATA_FILE="${SITE_DATA_DIR}/versioned_feature_list.yaml"

mkdir -p "${REFERENCE_DIR}"
mkdir -p "${SITE_DATA_DIR}"

go run -mod=mod -modfile="${MOD_FILE}" "${K8S_TOOL_PKG}" feature-gates update

cp "${REFERENCE_FILE}" "${SITE_DATA_FILE}"

41 changes: 41 additions & 0 deletions hack/verify-featuregates.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/usr/bin/env bash

# Copyright 2024 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -o errexit
set -o nounset
set -o pipefail

REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
MOD_FILE="${REPO_ROOT}/hack/internal/tools/go.mod"
K8S_TOOL_PKG="k8s.io/kubernetes/test/compatibility_lifecycle"
REFERENCE_FILE="${REPO_ROOT}/test/compatibility_lifecycle/reference/versioned_feature_list.yaml"
SITE_DATA_FILE="${REPO_ROOT}/site/data/featuregates/versioned_feature_list.yaml"

if [[ ! -f "${REFERENCE_FILE}" ]]; then
echo "missing reference file: ${REFERENCE_FILE}" >&2
exit 1
fi

if ! go run -mod=mod -modfile="${MOD_FILE}" "${K8S_TOOL_PKG}" feature-gates verify; then
echo "Please run 'hack/update-featuregates.sh' to regenerate feature gates." >&2
exit 1
fi

if ! cmp -s "${REFERENCE_FILE}" "${SITE_DATA_FILE}"; then
echo "Feature-gate YAML under site/data/featuregates is out of sync. Re-run hack/update-featuregates.sh." >&2
exit 1
fi

1 change: 0 additions & 1 deletion pkg/features/kube_features.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ var defaultVersionedFeatureGates = map[featuregate.Feature]featuregate.Versioned
{Version: version.MustParse("0.4"), Default: false, PreRelease: featuregate.Alpha},
{Version: version.MustParse("0.5"), Default: true, PreRelease: featuregate.Beta},
},

FlavorFungibility: {
{Version: version.MustParse("0.5"), Default: true, PreRelease: featuregate.Beta},
},
Expand Down
52 changes: 2 additions & 50 deletions site/content/en/docs/installation/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,48 +280,7 @@ spec:

### Feature gates for alpha and beta features

| Feature | Default | Stage | Since | Until |
| --------------------------------------------- | ------- | ----- | ----- | ----- |
| `FlavorFungibility` | `true` | Beta | 0.5 | |
| `MultiKueue` | `false` | Alpha | 0.6 | 0.8 |
| `MultiKueue` | `true` | Beta | 0.9 | |
| `MultiKueueBatchJobWithManagedBy` | `false` | Alpha | 0.8 | 0.15 |
| `MultiKueueBatchJobWithManagedBy` | `true` | Beta | 0.15 | |
| `PartialAdmission` | `false` | Alpha | 0.4 | 0.4 |
| `PartialAdmission` | `true` | Beta | 0.5 | |
| `VisibilityOnDemand` | `false` | Alpha | 0.6 | 0.8 |
| `VisibilityOnDemand` | `true` | Beta | 0.9 | |
| `PrioritySortingWithinCohort` | `true` | Beta | 0.6 | |
| `LendingLimit` | `false` | Alpha | 0.6 | 0.8 |
| `LendingLimit` | `true` | Beta | 0.9 | |
| `TopologyAwareScheduling` | `false` | Alpha | 0.9 | 0.13 |
| `TopologyAwareScheduling` | `true` | Beta | 0.14 | |
| `LocalQueueDefaulting` | `false` | Alpha | 0.10 | 0.11 |
| `LocalQueueDefaulting` | `true` | Beta | 0.12 | |
| `LocalQueueMetrics` | `false` | Alpha | 0.10 | |
| `HierarchicalCohort` | `true` | Beta | 0.11 | |
| `ObjectRetentionPolicies` | `false` | Alpha | 0.12 | 0.12 |
| `ObjectRetentionPolicies` | `true` | Beta | 0.13 | |
| `TASFailedNodeReplacement` | `false` | Alpha | 0.12 | 0.13 |
| `TASFailedNodeReplacement` | `true` | Beta | 0.14 | |
| `AdmissionFairSharing` | `false` | Alpha | 0.12 | |
| `AdmissionFairSharing` | `true` | Beta | 0.15 | |
| `TASFailedNodeReplacementFailFast` | `false` | Alpha | 0.12 | 0.13 |
| `TASFailedNodeReplacementFailFast` | `true` | Beta | 0.14 | |
| `TASReplaceNodeOnPodTermination` | `false` | Alpha | 0.13 | 0.13 |
| `TASReplaceNodeOnPodTermination` | `true` | Beta | 0.14 | |
| `ElasticJobsViaWorkloadSlices` | `false` | Alpha | 0.13 | |
| `ManagedJobsNamespaceSelectorAlwaysRespected` | `false` | Alpha | 0.13 | 0.15 |
| `ManagedJobsNamespaceSelectorAlwaysRespected` | `true` | Beta | 0.15 | |
| `FlavorFungibilityImplicitPreferenceDefault` | `false` | Alpha | 0.13 | 0.16 |
| `WorkloadRequestUseMergePatch` | `false` | Alpha | 0.14 | |
| `SanitizePodSets` | `true` | Beta | 0.13 | |
| `MultiKueueAllowInsecureKubeconfigs` | `false` | Alpha | 0.13 | |
| `ReclaimablePods` | `true` | Beta | 0.15 | |
| `MultiKueueAdaptersForCustomJobs` | `false` | Alpha | 0.14 | 0.14 |
| `MultiKueueAdaptersForCustomJobs` | `true` | Beta | 0.15 | |
| `PropagateBatchJobLabelsToWorkload` | `true` | Beta | 0.15 | |
| `FailureRecoveryPolicy` | `false` | Alpha | 0.15 | |
{{< feature-gates-table stage="alpha-beta" >}}

{{% alert title="Note" color="primary" %}}
The SanitizePodSets and MultiKueueAllowInsecureKubeconfigs features are available starting from versions 0.13.8 and 0.14.3.
Expand All @@ -330,14 +289,7 @@ The PropagateBatchJobLabelsToWorkload feature is available starting from version

### Feature gates for graduated or deprecated features

| Feature | Default | Stage | Since | Until |
| ------------------------------------- | ------- | ---------- | ----- | ----- |
| `ConfigurableResourceTransformations` | `false` | Alpha | 0.9 | 0.9 |
| `ConfigurableResourceTransformations` | `true` | Beta | 0.10 | 0.13 |
| `ConfigurableResourceTransformations` | `true` | GA | 0.14 | |
| `TASProfileMostFreeCapacity` | `false` | Deprecated | 0.11 | 0.13 |
| `TASProfileLeastFreeCapacity` | `false` | Deprecated | 0.11 | |
| `TASProfileMixed` | `false` | Deprecated | 0.11 | |
{{< feature-gates-table stage="ga-deprecated" >}}

## What's next

Expand Down
47 changes: 2 additions & 45 deletions site/content/zh-CN/docs/installation/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,54 +262,11 @@ spec:

### Alpha 和 Beta 级别特性的特性门控 {#feature-gates-for-alpha-and-beta-features}

| 功能 | 默认值 | 阶段 | 起始版本 | 截止版本 |
|-----------------------------------------------|---------|-------|------|------|
| `FlavorFungibility` | `true` | Beta | 0.5 | |
| `MultiKueue` | `false` | Alpha | 0.6 | 0.8 |
| `MultiKueue` | `true` | Beta | 0.9 | |
| `MultiKueueBatchJobWithManagedBy` | `false` | Alpha | 0.8 | 0.15 |
| `MultiKueueBatchJobWithManagedBy` | `true` | Beta | 0.15 | |
| `PartialAdmission` | `false` | Alpha | 0.4 | 0.4 |
| `PartialAdmission` | `true` | Beta | 0.5 | |
| `VisibilityOnDemand` | `false` | Alpha | 0.6 | 0.8 |
| `VisibilityOnDemand` | `true` | Beta | 0.9 | |
| `PrioritySortingWithinCohort` | `true` | Beta | 0.6 | |
| `LendingLimit` | `false` | Alpha | 0.6 | 0.8 |
| `LendingLimit` | `true` | Beta | 0.9 | |
| `TopologyAwareScheduling` | `false` | Alpha | 0.9 | 0.13 |
| `TopologyAwareScheduling` | `true` | Beta | 0.14 | |
| `LocalQueueDefaulting` | `false` | Alpha | 0.10 | 0.11 |
| `LocalQueueDefaulting` | `true` | Beta | 0.12 | |
| `LocalQueueMetrics` | `false` | Alpha | 0.10 | |
| `HierarchicalCohort` | `true` | Beta | 0.11 | |
| `ObjectRetentionPolicies` | `false` | Alpha | 0.12 | 0.12 |
| `ObjectRetentionPolicies` | `true` | Beta | 0.13 | |
| `TASFailedNodeReplacement` | `false` | Alpha | 0.12 | 0.13 |
| `TASFailedNodeReplacement` | `true` | Beta | 0.14 | |
| `AdmissionFairSharing` | `false` | Alpha | 0.12 | |
| `TASFailedNodeReplacementFailFast` | `false` | Alpha | 0.12 | 0.13 |
| `TASFailedNodeReplacementFailFast` | `true` | Beta | 0.14 | |
| `TASReplaceNodeOnPodTermination` | `false` | Alpha | 0.13 | 0.13 |
| `TASReplaceNodeOnPodTermination` | `true` | Beta | 0.14 | |
| `ElasticJobsViaWorkloadSlices` | `false` | Alpha | 0.13 | |
| `ManagedJobsNamespaceSelectorAlwaysRespected` | `false` | Alpha | 0.13 | |
| `FlavorFungibilityImplicitPreferenceDefault` | `false` | Alpha | 0.13 | 0.16 |
| `WorkloadRequestUseMergePatch` | `false` | Alpha | 0.14 | |
| `SanitizePodSets` | `true` | Beta | 0.13 | |
| `MultiKueueAllowInsecureKubeconfigs` | `false` | Alpha | 0.13 | |
{{< feature-gates-table stage="alpha-beta" >}}

### 已毕业或已弃用特性的特性门控 {#feature-gates-for-graduated-or-deprecated-features}

| 功能 | 默认值 | 阶段 | 起始版本 | 截止版本 |
|---------------------------------------|---------|------------|------|------|
| `ManagedJobsNamespaceSelector` | `true` | Beta | 0.10 | 0.13 |
| `ManagedJobsNamespaceSelector` | `true` | GA | 0.13 | |
| `ConfigurableResourceTransformations` | `false` | Alpha | 0.9 | 0.9 |
| `ConfigurableResourceTransformations` | `true` | Beta | 0.10 | 0.13 |
| `ConfigurableResourceTransformations` | `true` | GA | 0.14 | |
| `TASProfileMostFreeCapacity` | `false` | Deprecated | 0.11 | 0.13 |
| `TASProfileLeastFreeCapacity` | `false` | Deprecated | 0.11 | |
| `TASProfileMixed` | `false` | Deprecated | 0.11 | |
{{< feature-gates-table stage="ga-deprecated" >}}

## 接下来是什么 {#whats-next}

Expand Down
Loading