diff --git a/.github/workflows/init-release.yaml b/.github/workflows/init-release.yaml index 6881dc379aaa4..39a3808b4a56e 100644 --- a/.github/workflows/init-release.yaml +++ b/.github/workflows/init-release.yaml @@ -56,6 +56,13 @@ jobs: make manifests-local VERSION=${{ inputs.TARGET_VERSION }} git diff + - name: Generate version compatibility table + run: | + git stash + bash hack/update-supported-versions.sh + git add -u . + git stash pop + - name: Create pull request uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5.0.2 with: diff --git a/docs/operator-manual/installation.md b/docs/operator-manual/installation.md index e32c9474c42ee..11c6fcdb22bd5 100644 --- a/docs/operator-manual/installation.md +++ b/docs/operator-manual/installation.md @@ -99,3 +99,9 @@ For example if the latest minor version of ArgoCD are 2.4.3 and 2.3.5 while sup * Argo CD 2.3.5 on Kubernetes 1.24 * Argo CD 2.3.5 on Kubernetes 1.23 * Argo CD 2.3.5 on Kubernetes 1.22 + +## Tested versions + +The following table shows the versions of Kubernetes that are tested with each version of Argo CD. + +{!docs/operator-manual/tested-kubernetes-versions.md!} diff --git a/docs/operator-manual/tested-kubernetes-versions.md b/docs/operator-manual/tested-kubernetes-versions.md new file mode 100644 index 0000000000000..897620296a515 --- /dev/null +++ b/docs/operator-manual/tested-kubernetes-versions.md @@ -0,0 +1,6 @@ +| Argo CD version | Kubernetes versions | +|-----------------|---------------------| +| 2.7 | v1.26, v1.25, v1.24, v1.23 | +| 2.6 | v1.24, v1.23, v1.22 | +| 2.5 | v1.24, v1.23, v1.22 | + diff --git a/hack/update-supported-versions.sh b/hack/update-supported-versions.sh new file mode 100644 index 0000000000000..f4f10aa31a007 --- /dev/null +++ b/hack/update-supported-versions.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +out="| Argo CD version | Kubernetes versions |\n" +out+="|-----------------|---------------------|\n" + +argocd_minor_version=$(git rev-parse --abbrev-ref HEAD | sed 's/release-//') +argocd_major_version_num=$(echo "$argocd_minor_version" | sed -E 's/\.[0-9]+//') +argocd_minor_version_num=$(echo "$argocd_minor_version" | sed -E 's/[0-9]+\.//') + +for n in 0 1 2; do + minor_version_num=$((argocd_minor_version_num - n)) + minor_version="${argocd_major_version_num}.${minor_version_num}" + git checkout "release-$minor_version" > /dev/null || exit 1 + line=$(yq '.jobs["test-e2e"].strategy.matrix["k3s-version"][]' .github/workflows/ci-build.yaml | \ + jq --arg minor_version "$minor_version" --raw-input --slurp --raw-output \ + 'split("\n")[:-1] | map(sub("\\.[0-9]+$"; "")) | join(", ") | "| \($minor_version) | \(.) |"') + out+="$line\n" +done + +git checkout "release-$argocd_minor_version" + + +printf "$out" > docs/operator-manual/tested-kubernetes-versions.md