Skip to content

Commit

Permalink
Merge pull request #615 from JarHMJ/feature/feature_gate
Browse files Browse the repository at this point in the history
[kwokctl] support all feature-gates
  • Loading branch information
k8s-ci-robot authored May 31, 2023
2 parents e32c9d7 + 38701ce commit 3d3e372
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 8 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -318,3 +318,12 @@ jobs:
shell: bash
run: |
./hack/e2e-test.sh kwokctl/kwokctl_auto_detect
- name: Test Mode StableFeatureGateAndAPI
if: ${{ matrix.os == 'ubuntu-latest' && matrix.kwokctl-runtime == 'binary' }}
shell: bash
env:
LAST_RELEASE_SIZE: 20
KWOK_MODE: StableFeatureGateAndAPI
run: |
./hack/e2e-test.sh kwokctl/kwokctl_${{ matrix.kwokctl-runtime }}
67 changes: 64 additions & 3 deletions pkg/kwokctl/k8s/feature_gates_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ var rawData = []FeatureSpec{
{"APISelfSubjectReview", Alpha, 26, 26},
{"APISelfSubjectReview", Beta, 27, -1},

// APIServerIdentity
{"APIServerIdentity", Alpha, 20, 25},
{"APIServerIdentity", Beta, 26, -1},

// APIServerTracing
{"APIServerTracing", Alpha, 22, 26},
{"APIServerTracing", Beta, 27, -1},

// Accelerators
{"Accelerators", Alpha, 6, 10},

Expand Down Expand Up @@ -224,6 +232,10 @@ var rawData = []FeatureSpec{
// ClusterTrustBundle
{"ClusterTrustBundle", Alpha, 27, -1},

// ComponentSLIs
{"ComponentSLIs", Alpha, 26, 26},
{"ComponentSLIs", Beta, 27, -1},

// ConfigurableFSGroupPolicy
{"ConfigurableFSGroupPolicy", Alpha, 18, 19},
{"ConfigurableFSGroupPolicy", Beta, 20, 22},
Expand All @@ -235,7 +247,11 @@ var rawData = []FeatureSpec{
// ContainerCheckpoint
{"ContainerCheckpoint", Alpha, 25, -1},

// ContextualLogging
{"ContextualLogging", Alpha, 25, -1},

// ControllerManagerLeaderMigration
{"ControllerManagerLeaderMigration", Alpha, 21, 21},
{"ControllerManagerLeaderMigration", Beta, 22, 23},
{"ControllerManagerLeaderMigration", GA, 24, 26},

Expand Down Expand Up @@ -351,6 +367,11 @@ var rawData = []FeatureSpec{
// DynamicVolumeProvisioning
{"DynamicVolumeProvisioning", Alpha, 6, 7},

// EfficientWatchResumption
{"EfficientWatchResumption", Alpha, 20, 20},
{"EfficientWatchResumption", Beta, 21, 23},
{"EfficientWatchResumption", GA, 24, -1},

// ElasticIndexedJob
{"ElasticIndexedJob", Beta, 27, -1},

Expand Down Expand Up @@ -481,7 +502,7 @@ var rawData = []FeatureSpec{
// IPv6DualStack
{"IPv6DualStack", Alpha, 16, 20},
{"IPv6DualStack", Beta, 21, 22},
{"IPv6DualStack", GA, 23, 24},
{"IPv6DualStack", GA, 23, 26},

// IdentifyPodOS
{"IdentifyPodOS", Alpha, 23, 23},
Expand Down Expand Up @@ -550,6 +571,10 @@ var rawData = []FeatureSpec{
{"JobTrackingWithFinalizers", Beta, 23, 25},
{"JobTrackingWithFinalizers", GA, 26, -1},

// KMSv2
{"KMSv2", Alpha, 25, 26},
{"KMSv2", Beta, 27, -1},

// KubeletConfigFile
{"KubeletConfigFile", Alpha, 8, 9},

Expand Down Expand Up @@ -609,6 +634,12 @@ var rawData = []FeatureSpec{
{"LogarithmicScaleDown", Alpha, 21, 21},
{"LogarithmicScaleDown", Beta, 22, -1},

// LoggingAlphaOptions
{"LoggingAlphaOptions", Alpha, 25, -1},

// LoggingBetaOptions
{"LoggingBetaOptions", Beta, 25, -1},

// MatchLabelKeysInPodTopologySpread
{"MatchLabelKeysInPodTopologySpread", Alpha, 25, 26},
{"MatchLabelKeysInPodTopologySpread", Beta, 27, -1},
Expand Down Expand Up @@ -795,6 +826,15 @@ var rawData = []FeatureSpec{
// RecoverVolumeExpansionFailure
{"RecoverVolumeExpansionFailure", Alpha, 23, -1},

// RemainingItemCount
{"RemainingItemCount", Alpha, 15, 15},
{"RemainingItemCount", Beta, 16, -1},

// RemoveSelfLink
{"RemoveSelfLink", Alpha, 16, 19},
{"RemoveSelfLink", Beta, 20, 23},
{"RemoveSelfLink", GA, 24, -1},

// RequestManagement
{"RequestManagement", Alpha, 15, 16},

Expand Down Expand Up @@ -855,6 +895,11 @@ var rawData = []FeatureSpec{
// SecurityContextDeny
{"SecurityContextDeny", Alpha, 27, -1},

// SelectorIndex
{"SelectorIndex", Alpha, 18, 18},
{"SelectorIndex", Beta, 19, 19},
{"SelectorIndex", GA, 20, 24},

// ServerSideApply
{"ServerSideApply", Alpha, 14, 15},
{"ServerSideApply", Beta, 16, 21},
Expand Down Expand Up @@ -948,6 +993,13 @@ var rawData = []FeatureSpec{
{"StorageObjectInUseProtection", Beta, 10, 10},
{"StorageObjectInUseProtection", GA, 11, 24},

// StorageVersionAPI
{"StorageVersionAPI", Alpha, 20, -1},

// StorageVersionHash
{"StorageVersionHash", Alpha, 14, 14},
{"StorageVersionHash", Beta, 15, -1},

// StreamingProxyRedirects
{"StreamingProxyRedirects", Beta, 6, 17},
{"StreamingProxyRedirects", Deprecated, 18, 23},
Expand Down Expand Up @@ -1023,6 +1075,7 @@ var rawData = []FeatureSpec{
{"UserNamespacesStatelessPodsSupport", Alpha, 25, -1},

// ValidateProxyRedirects
{"ValidateProxyRedirects", Alpha, 12, 13},
{"ValidateProxyRedirects", Beta, 14, 21},
{"ValidateProxyRedirects", Deprecated, 22, 23},

Expand Down Expand Up @@ -1059,11 +1112,19 @@ var rawData = []FeatureSpec{
{"WarningHeaders", Beta, 19, 21},
{"WarningHeaders", GA, 22, 23},

// WatchBookmark
{"WatchBookmark", Alpha, 15, 15},
{"WatchBookmark", Beta, 16, 16},
{"WatchBookmark", GA, 17, -1},

// WatchList
{"WatchList", Alpha, 27, -1},

// WinDSR
{"WinDSR", Alpha, 19, -1},
{"WinDSR", Alpha, 14, -1},

// WinOverlay
{"WinOverlay", Alpha, 19, 19},
{"WinOverlay", Alpha, 14, 19},
{"WinOverlay", Beta, 20, -1},

// WindowsEndpointSliceProxying
Expand Down
20 changes: 15 additions & 5 deletions pkg/kwokctl/k8s/feature_gates_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,22 @@ if [[ ! "${latest_release}" -gt "${minimum_release}" ]]; then
fi

function features() {
file_paths=(
"pkg/features/kube_features.go"
"staging/src/k8s.io/component-base/metrics/features/kube_features.go"
"staging/src/k8s.io/component-base/logs/api/v1/kube_features.go"
"staging/src/k8s.io/controller-manager/pkg/features/kube_features.go"
"staging/src/k8s.io/apiextensions-apiserver/pkg/features/kube_features.go"
"staging/src/k8s.io/apiserver/pkg/features/kube_features.go"
)
for i in $(seq "${minimum_release}" "${latest_release}"); do
curl -sSL "https://github.com/kubernetes/kubernetes/raw/release-1.${i}/pkg/features/kube_features.go" |
grep "{Default: " |
sed -e 's/\w\+\.//g' |
sed -e 's/[:,}]//g' |
awk "{print \$1, \$5, $i}"
for p in "${file_paths[@]}"; do
curl -sSL "https://github.com/kubernetes/kubernetes/raw/release-1.${i}/${p}" |
grep "{Default: " |
sed -e 's/\w\+\.//g' |
sed -e 's/[:,}]//g' |
awk "{print \$1, \$5, $i}"
done
done
}

Expand Down

0 comments on commit 3d3e372

Please sign in to comment.