Skip to content

Commit e80a713

Browse files
authored
feat: discover current k8s versions using DescribeClusterVersions api (#2143)
1 parent 347e192 commit e80a713

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/ci-manual.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ on:
3232
type: string
3333
k8s_versions:
3434
description: 'Kubernetes Versions (comma-separated, e.g., 1.29,1.30)'
35-
default: "1.24,1.25,1.26,1.27,1.28,1.29,1.30,1.31"
3635
required: false
3736
type: string
3837
build_arguments:

.github/workflows/ci.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ on:
2323
type: string
2424
k8s_versions:
2525
description: 'Kubernetes Versions (comma-separated, e.g., 1.29,1.30)'
26-
default: "1.24,1.25,1.26,1.27,1.28,1.29,1.30,1.31"
2726
required: false
2827
type: string
2928
build_arguments:
@@ -45,8 +44,12 @@ jobs:
4544
- id: variables
4645
run: |
4746
echo 'ci_step_name_prefix=CI:' >> $GITHUB_OUTPUT
48-
echo "kubernetes_versions=$(jq -Rn --arg input '${{ inputs.k8s_versions }}' '($input | split(","))' | jq -c .)" >> $GITHUB_OUTPUT
4947
echo "os_distros=$(jq -Rn --arg input '${{ inputs.os_distros }}' '($input | split(","))' | jq -c .)" >> $GITHUB_OUTPUT
48+
if [ -z "${{ inputs.k8s_versions }}" ]; then
49+
echo "kubernetes_versions=$(aws eks describe-cluster-versions | jq -c '.clusterVersions | map(.clusterVersion)')" >> $GITHUB_OUTPUT
50+
else
51+
echo "kubernetes_versions=$(jq -Rn --arg input '${{ inputs.k8s_versions }}' '($input | split(","))' | jq -c .)" >> $GITHUB_OUTPUT
52+
fi
5053
kubernetes-versions:
5154
runs-on: ubuntu-latest
5255
name: ${{ matrix.k8s_version }} / ${{ matrix.os_distro }}

0 commit comments

Comments
 (0)