Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
8 changes: 8 additions & 0 deletions .github/workflows/test-cni.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
integration-cni-tests:
permissions:
contents: read
id-token: write
runs-on: runs-on,runner=4cpu-linux-x64,run-id=${{ github.run_id }}
timeout-minutes: 60
strategy:
Expand All @@ -26,6 +27,13 @@ jobs:
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Retrieve Stage Registry Credentials from Vault
uses: rancher-eio/read-vault-secrets@main
with:
secrets: |
secret/data/github/repo/${{ github.repository }}/stage-registry/rancher/rke-extended-life/credentials endpoint | STAGE_REGISTRY_ENDPOINT ;
secret/data/github/repo/${{ github.repository }}/stage-registry/rancher/rke-extended-life/credentials username | STAGE_REGISTRY_USERNAME ;
secret/data/github/repo/${{ github.repository }}/stage-registry/rancher/rke-extended-life/credentials password | STAGE_REGISTRY_PASSWORD
- name: Run ${{ matrix.cni }} check
run: |
./scripts/build
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,27 @@ jobs:
integration-ci:
permissions:
contents: read
id-token: write
runs-on: runs-on,runner=4cpu-linux-x64,run-id=${{ github.run_id }}
timeout-minutes: 30
if: github.event_name == 'pull_request'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Retrieve Stage Registry Credentials from Vault
uses: rancher-eio/read-vault-secrets@main
with:
secrets: |
secret/data/github/repo/${{ github.repository }}/stage-registry/rancher/rke-extended-life/credentials endpoint | STAGE_REGISTRY_ENDPOINT ;
secret/data/github/repo/${{ github.repository }}/stage-registry/rancher/rke-extended-life/credentials username | STAGE_REGISTRY_USERNAME ;
secret/data/github/repo/${{ github.repository }}/stage-registry/rancher/rke-extended-life/credentials password | STAGE_REGISTRY_PASSWORD
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Run CI
run: |
./scripts/integration-ci

github-pre-release:
permissions:
contents: write
Expand Down
2 changes: 1 addition & 1 deletion codegen/codegen.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

const (
defaultDevURL = "https://releases.rancher.com/kontainer-driver-metadata/dev-v2.11/data.json"
defaultDevURL = "https://releases.rancher.com/kontainer-driver-metadata/dev-v2.11-rke-extended-life/data.json"
defaultReleaseURL = "https://releases.rancher.com/kontainer-driver-metadata/release-v2.11/data.json"
dataFile = "data/data.json"
)
Expand Down
4 changes: 2 additions & 2 deletions data/bindata.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data/data.json

Large diffs are not rendered by default.

37 changes: 37 additions & 0 deletions scripts/integration
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,17 @@ if [ "$default_version_found" == "false" ]; then
fi

for ver in "${!versions_to_test[@]}"; do

version_to_test=${versions_to_test["${ver}"]}
echo_with_time "Testing version ${version_to_test}"

MAJOR_VERSION=$(echo ${version_to_test} | cut -d. -f1 | sed 's/v//')
MINOR_VERSION=$(echo ${version_to_test} | cut -d. -f2)
if [ ${MAJOR_VERSION} -eq 1 ] && [ ${MINOR_VERSION} -lt 31 ]; then
echo_with_time "Skipping checks for k8s version ${version_to_test} (<1.31)"
continue
fi

if [ ${MINOR_VERSION} -ge 30 ] && [ "${NETWORK_PLUGIN}" == "weave" ]; then
echo "Skipping weave testing with ${version_to_test} since weave is not supported for version >=1.30.0"
continue
Expand Down Expand Up @@ -115,6 +122,11 @@ services:
kube-api:
extra_env:
- TEST_VAR=kube-api
private_registries:
- url: ${STAGE_REGISTRY_ENDPOINT}
user: ${STAGE_REGISTRY_USERNAME}
password: ${STAGE_REGISTRY_PASSWORD}
is_default: true
EOF

if [ "x${NETWORK_PLUGIN}" != "x" ]; then
Expand Down Expand Up @@ -229,7 +241,32 @@ for ver in "${!versions_to_test[@]}"; do
# Example $all_versions: "v1.16.15-rancher1-2 v1.17.12-rancher1-1 v1.18.9-rancher1-1 v1.19.2-rancher1-1"
upgrade_to_version=$(echo $all_versions | grep -oP '(?<='"${versions_to_test["${ver}"]}"' )[^ ]*')

if [ -z "${upgrade_to_version}" ]; then
echo_with_time "No newer version found for ${versions_to_test["${ver}"]} to upgrade to"
continue
fi

# Parse major/minor for current/original version
CUR_MAJOR=$(echo ${versions_to_test["${ver}"]} | cut -d. -f1 | sed 's/v//')
CUR_MINOR=$(echo ${versions_to_test["${ver}"]} | cut -d. -f2)

# Parse major/minor for upgrade_to_version
MAJOR_VERSION=$(echo ${upgrade_to_version} | cut -d. -f1 | sed 's/v//')
MINOR_VERSION=$(echo ${upgrade_to_version} | cut -d. -f2)

# Skip if upgrading from <1.31 to >=1.31
if [ ${CUR_MAJOR} -eq 1 ] && [ ${CUR_MINOR} -lt 31 ] && \
[ ${MAJOR_VERSION} -eq 1 ] && [ ${MINOR_VERSION} -ge 31 ]; then
echo "Skipping upgrade from ${versions_to_test["${ver}"]} (<1.31) to ${upgrade_to_version} (>=1.31)"
continue
fi

# Skip if target version <1.31
if [ ${MAJOR_VERSION} -eq 1 ] && [ ${MINOR_VERSION} -lt 31 ]; then
echo_with_time "Skipping upgrade checks for k8s version ${upgrade_to_version} (<1.31)"
continue
fi

if [ ${MINOR_VERSION} -ge 30 ] && [ "${NETWORK_PLUGIN}" == "weave" ]; then
echo "Skipping cluster upgrade testing to ${upgrade_to_version} with weave since weave is not supported for version >=1.30.0"
continue
Expand Down
Loading