forked from rancher/rancher
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'rancher:main' into patch-1
- Loading branch information
Showing
2,951 changed files
with
216,480 additions
and
184,057 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
name: Flaky Tests | ||
about: File a report of a flaky test from drone or automation runs | ||
title: "[flaky-test]" | ||
labels: kind/flaky-test | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Flaky Test** | ||
|
||
``` | ||
<!--File what test failed in automation. | ||
Make sure to assign the appropriate engineering team.--> | ||
``` | ||
|
||
**Release Branch** | ||
|
||
source branch of PR: `release/vXXX` | ||
<!-- List which source branch in rancher/rancher that the PR was --> | ||
|
||
**Drone Build (if applicable)** | ||
|
||
pipeline stage URL: | ||
<!-- Link to the specific pipeline stage/step that the drone build failed if applicable--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: "Install yq" | ||
description: "Install yq from source" | ||
inputs: | ||
version: | ||
description: "yq version" | ||
default: v4.44.3 | ||
arch: | ||
description: "host arch" | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: install yq | ||
shell: bash | ||
run: curl -fsL https://github.com/mikefarah/yq/releases/download/${{ inputs.version }}/yq_linux_${{ inputs.arch }}.tar.gz | tar xz && mv yq_linux_${{ inputs.arch }} /usr/bin/yq | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: "Download K3S images" | ||
description: "Download k3s images txt file and save airgap images" | ||
inputs: | ||
k3s_version: | ||
description: "k3s version" | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Download images txt file | ||
shell: bash | ||
run: curl -sLf https://github.com/rancher/k3s/releases/download/${{ inputs.k3s_version }}/k3s-images.txt -o /tmp/k3s-images.txt | ||
- name: Create k3s images file | ||
shell: bash | ||
run: | | ||
images=$(grep -e 'docker.io/rancher/mirrored-pause' -e 'docker.io/rancher/mirrored-coredns-coredns' /tmp/k3s-images.txt) | ||
xargs -n1 docker pull <<< "${images}" | ||
docker save -o ./k3s-airgap-images.tar ${images} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
name: "Setup Dependencies Variables" | ||
description: "Setup Dependencies Variables from other files" | ||
outputs: | ||
CATTLE_KDM_BRANCH: | ||
description: "CATTLE_KDM_BRANCH from package/Dockerfile" | ||
value: ${{ steps.vars.outputs.CATTLE_KDM_BRANCH }} | ||
CATTLE_K3S_VERSION: | ||
description: "CATTLE_K3S_VERSION from package/Dockerfile" | ||
value: ${{ steps.vars.outputs.CATTLE_K3S_VERSION }} | ||
CATTLE_HELM_VERSION: | ||
description: "CATTLE_HELM_VERSION from package/Dockerfile" | ||
value: ${{ steps.vars.outputs.CATTLE_HELM_VERSION }} | ||
HELM_VERSION: | ||
description: "HELM_VERSION from package/Dockerfile" | ||
value: ${{ steps.vars.outputs.HELM_VERSION }} | ||
GO_VERSION: | ||
description: "GO_VERSION from package/Dockerfile" | ||
value: ${{ steps.vars.outputs.GO_VERSION }} | ||
HELM_UNITTEST_VERSION: | ||
description: "HELM_UNITTEST_VERSION from Dockerfile.dapper" | ||
value: ${{ steps.vars.outputs.HELM_UNITTEST_VERSION }} | ||
RKE_VERSION: | ||
description: "RKE_VERSION from go.mod" | ||
value: ${{ steps.vars.outputs.RKE_VERSION }} | ||
CATTLE_RANCHER_WEBHOOK_VERSION: | ||
description: "CATTLE_RANCHER_WEBHOOK_VERSION from scripts/export-config" | ||
value: ${{ steps.vars.outputs.CATTLE_RANCHER_WEBHOOK_VERSION }} | ||
CATTLE_CSP_ADAPTER_MIN_VERSION: | ||
description: "CATTLE_CSP_ADAPTER_MIN_VERSION from scripts/export-config" | ||
value: ${{ steps.vars.outputs.CATTLE_CSP_ADAPTER_MIN_VERSION }} | ||
CATTLE_FLEET_VERSION: | ||
description: "CATTLE_FLEET_VERSION from scripts/export-config" | ||
value: ${{ steps.vars.outputs.CATTLE_FLEET_VERSION }} | ||
runs: | ||
using: "composite" | ||
steps: | ||
- id: vars | ||
shell: bash | ||
run: | | ||
source scripts/export-config | ||
CATTLE_KDM_BRANCH=$(grep -m1 'ARG CATTLE_KDM_BRANCH=' package/Dockerfile | cut -d '=' -f2) | ||
CATTLE_K3S_VERSION=$(grep -m1 'ENV CATTLE_K3S_VERSION' package/Dockerfile | awk '{print $3}') | ||
HELM_VERSION=$(grep -m1 'ENV HELM_VERSION' package/Dockerfile | awk '{print $3}') | ||
CATTLE_HELM_VERSION=$(grep -m1 'ENV CATTLE_HELM_VERSION' package/Dockerfile | awk '{print $3}') | ||
GO_VERSION=$(grep -m1 'golang:' package/Dockerfile | cut -d ':' -f2 | cut -d ' ' -f1) | ||
HELM_UNITTEST_VERSION=$(grep -m1 'ENV HELM_UNITTEST_VERSION' Dockerfile.dapper | awk '{print $3}') | ||
RKE_VERSION=$(grep -m1 'github.com/rancher/rke' go.mod | awk '{print $2}') | ||
if [[ -z "$RKE_VERSION" ]]; then | ||
RKE_VERSION=$(grep -m1 'github.com/rancher/rke' go.mod | awk '{print $4}') | ||
fi | ||
RKE_VERSION=$RKE_VERSION | ||
CATTLE_RANCHER_WEBHOOK_VERSION=$CATTLE_RANCHER_WEBHOOK_VERSION | ||
CATTLE_CSP_ADAPTER_MIN_VERSION=$CATTLE_CSP_ADAPTER_MIN_VERSION | ||
CATTLE_FLEET_VERSION=$CATTLE_FLEET_VERSION | ||
if [[ -z "$CATTLE_KDM_BRANCH" ]]; then | ||
echo "CATTLE_KDM_BRANCH not found" | ||
exit 1 | ||
fi | ||
if [[ -z "$CATTLE_K3S_VERSION" ]]; then | ||
echo "CATTLE_K3S_VERSION not found" | ||
exit 1 | ||
fi | ||
if [[ -z "$HELM_VERSION" ]]; then | ||
echo "HELM_VERSION not found" | ||
exit 1 | ||
fi | ||
if [[ -z "$CATTLE_HELM_VERSION" ]]; then | ||
echo "CATTLE_HELM_VERSION not found" | ||
exit 1 | ||
fi | ||
if [[ -z "$GO_VERSION" ]]; then | ||
echo "GO_VERSION not found" | ||
exit 1 | ||
fi | ||
if [[ -z "$HELM_UNITTEST_VERSION" ]]; then | ||
echo "HELM_UNITTEST_VERSION not found" | ||
exit 1 | ||
fi | ||
if [[ -z "$RKE_VERSION" ]]; then | ||
echo "RKE_VERSION not found" | ||
exit 1 | ||
fi | ||
if [[ -z "$CATTLE_RANCHER_WEBHOOK_VERSION" ]]; then | ||
echo "CATTLE_RANCHER_WEBHOOK_VERSION not found" | ||
exit 1 | ||
fi | ||
if [[ -z "$CATTLE_CSP_ADAPTER_MIN_VERSION" ]]; then | ||
echo "CATTLE_CSP_ADAPTER_MIN_VERSION not found" | ||
exit 1 | ||
fi | ||
if [[ -z "$CATTLE_FLEET_VERSION" ]]; then | ||
echo "CATTLE_FLEET_VERSION not found" | ||
exit 1 | ||
fi | ||
echo "CATTLE_KDM_BRANCH=$CATTLE_KDM_BRANCH" >> $GITHUB_OUTPUT | ||
echo "CATTLE_K3S_VERSION=$CATTLE_K3S_VERSION" >> $GITHUB_OUTPUT | ||
echo "HELM_VERSION=$HELM_VERSION" >> $GITHUB_OUTPUT | ||
echo "CATTLE_HELM_VERSION=$CATTLE_HELM_VERSION" >> $GITHUB_OUTPUT | ||
echo "GO_VERSION=$GO_VERSION" >> $GITHUB_OUTPUT | ||
echo "HELM_UNITTEST_VERSION=$HELM_UNITTEST_VERSION" >> $GITHUB_OUTPUT | ||
echo "RKE_VERSION=$RKE_VERSION" >> $GITHUB_OUTPUT | ||
echo "CATTLE_RANCHER_WEBHOOK_VERSION=$CATTLE_RANCHER_WEBHOOK_VERSION" >> $GITHUB_OUTPUT | ||
echo "CATTLE_CSP_ADAPTER_MIN_VERSION=$CATTLE_CSP_ADAPTER_MIN_VERSION" >> $GITHUB_OUTPUT | ||
echo "CATTLE_FLEET_VERSION=$CATTLE_FLEET_VERSION" >> $GITHUB_OUTPUT | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: "Setup TAG and HEAD_TAG env variables" | ||
description: "Setup TAG and HEAD_TAG env variables" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- shell: bash | ||
run: | | ||
ref_name="${{ github.ref_name }}" | ||
TAG="${{ github.sha }}" | ||
prefix="release/" | ||
if [[ "$ref_name" == "main" ]]; then | ||
TAG=v2.10-${{ github.sha }}-head | ||
echo "HEAD_TAG=head" >> "$GITHUB_ENV" | ||
elif [[ "$ref_name" == release/v* ]]; then | ||
TAG=${ref_name#$prefix}-${{ github.sha }}-head | ||
HEAD_TAG=${ref_name#$prefix}-head | ||
echo "HEAD_TAG=$HEAD_TAG" >> "$GITHUB_ENV" | ||
fi | ||
if [[ "${{ github.ref }}" == refs/tags/* ]]; then | ||
TAG="$ref_name" | ||
fi | ||
echo "TAG=$TAG" >> "$GITHUB_ENV" | ||
echo "GIT_TAG=$TAG" >> "$GITHUB_ENV" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"extends": [ | ||
"github>rancher/renovate-config#release" | ||
], | ||
"baseBranches": [ | ||
"release/v2.9" | ||
], | ||
"prHourlyLimit": 2, | ||
"prConcurrentLimit": 4, | ||
"prCreation": "status-success" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
_extends: .github-private |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
set -ue | ||
|
||
go generate ./... | ||
|
||
if [ -n "$(git status --porcelain)" ]; then | ||
echo "Generated files have either been changed manually or were not updated." | ||
echo | ||
echo "The following generated files did differ after regeneration:" | ||
git status --porcelain | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/sh | ||
set -ue | ||
|
||
for DIRECTORY in . ./pkg/apis ./pkg/client; do | ||
cd "$DIRECTORY" | ||
go mod tidy | ||
go mod verify | ||
cd "$OLDPWD" | ||
done | ||
|
||
if [ -n "$(git status --porcelain)" ]; then | ||
echo "go.mod is not up to date. Please 'run go mod tidy' and commit the changes." | ||
echo | ||
echo "The following go files did differ after tidying them:" | ||
git status --porcelain | ||
exit 1 | ||
fi | ||
|
||
# Check diff between ./go.mod and ./pkg/apis/go.mod | ||
badmodule="false" | ||
while read -r module tag; do | ||
# Get tag from module in ./go.mod | ||
roottag=$(sed '1,/^require/d' go.mod | grep "${module} " | awk '{ print $2 }') | ||
echo "${module}:" | ||
echo "${tag} (./pkg/apis/go.mod)" | ||
echo "${roottag} (./go.mod)" | ||
# Compare with tag from module in ./pkg/apis/go.mod | ||
if [ "${tag}" != "${roottag}" ]; then | ||
echo "${module} is different ('${tag}' vs '${roottag}')" | ||
badmodule="true" | ||
fi | ||
done << EOF | ||
$(sed '1,/require/d' pkg/apis/go.mod | head -n -1 | grep -v indirect | grep rancher | awk '{ print $1,$2 }') | ||
EOF | ||
|
||
if [ "${badmodule}" = "true" ]; then | ||
echo "Diff found between ./go.mod and ./pkg/apis/go.mod" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Controller Integration Tests | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: | ||
- 'release/*' | ||
|
||
env: | ||
GOARCH: amd64 | ||
CGO_ENABLED: 0 | ||
SETUP_GO_VERSION: '1.22.*' | ||
|
||
jobs: | ||
run-tests: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ env.SETUP_GO_VERSION }} | ||
- | ||
name: Run Integration Tests | ||
env: | ||
ENVTEST_K8S_VERSION: "1.30" | ||
run: ./tests/controllers/run_controller_tests.sh |
Oops, something went wrong.