-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test Fleet in Rancher on self-hosted runner #2804
base: main
Are you sure you want to change the base?
Commits on Sep 26, 2024
-
Fix Fleet upgrade script to install Fleet in Rancher
This is the basis for being able to test any given Fleet commit in Rancher, installing the latter through Helm.
Configuration menu - View commit details
-
Copy full SHA for 560e397 - Browse repository at this point
Copy the full SHA 560e397View commit details -
This simplifies Rancher installation, preventing a costly local build and simply making use of existing configuration options to override the Fleet version to install from a custom repository and branch. The Rancher Docker image to use is hard-coded for now.
Configuration menu - View commit details
-
Copy full SHA for 0917e69 - Browse repository at this point
Copy the full SHA 0917e69View commit details -
Run Fleet-in-Rancher test workflow on self-hosted runner
This is an attempt to use Rancher's org-wide hosted runners to test Fleet within Rancher, instead of dealing with GCP.
Configuration menu - View commit details
-
Copy full SHA for b74dff6 - Browse repository at this point
Copy the full SHA b74dff6View commit details -
This may help prevent unknown authority errors when installing the Ginkgo CLI.
Configuration menu - View commit details
-
Copy full SHA for 2f662aa - Browse repository at this point
Copy the full SHA 2f662aaView commit details -
Use bci/bci-base:15.6 base image
That image comes with CA certificates, curl and tar installed.
Configuration menu - View commit details
-
Copy full SHA for 420cb2a - Browse repository at this point
Copy the full SHA 420cb2aView commit details -
Images are already built when releasing Fleet charts against a test charts repository.
Configuration menu - View commit details
-
Copy full SHA for bc142d2 - Browse repository at this point
Copy the full SHA bc142d2View commit details -
This makes use of a dedicated step to install remaining dependencies.
Configuration menu - View commit details
-
Copy full SHA for accdb2c - Browse repository at this point
Copy the full SHA accdb2cView commit details -
Run Fleet-in-Rancher tests against Ubuntu
Do we really need a dedicated VM or self-hosted runner for this? Reusing the same setup as Fleet's multi-cluster tests to verify it.
Configuration menu - View commit details
-
Copy full SHA for 46d3e28 - Browse repository at this point
Copy the full SHA 46d3e28View commit details -
Installing Rancher should directly take care of installing our test Fleet version.
Configuration menu - View commit details
-
Copy full SHA for 7fe4bb0 - Browse repository at this point
Copy the full SHA 7fe4bb0View commit details -
Install kubectl and other dependencies into ~/.local/bin
This should fix permissions issues.
Configuration menu - View commit details
-
Copy full SHA for da736cc - Browse repository at this point
Copy the full SHA da736ccView commit details -
This prevents issues about package `helm` not being found in Ubuntu repositories.
Configuration menu - View commit details
-
Copy full SHA for db1f6e7 - Browse repository at this point
Copy the full SHA db1f6e7View commit details -
Add WIP script for testing Fleet in Rancher
This could be reused in CI, after a few improvements.
Configuration menu - View commit details
-
Copy full SHA for a738a25 - Browse repository at this point
Copy the full SHA a738a25View commit details -
Use non-containerized self-hosted runner
`rancher/fleet` is now approved to use such runners, with help from EIO.
Configuration menu - View commit details
-
Copy full SHA for d067cec - Browse repository at this point
Copy the full SHA d067cecView commit details -
Add rancher bin path to $PATH where needed
Registering downstream clusters with Rancher requires the `rancher` CLI.
Configuration menu - View commit details
-
Copy full SHA for afbbc4e - Browse repository at this point
Copy the full SHA afbbc4eView commit details -
Print shell commands when setting up Rancher
This should help troubleshoot failures with `Process completed with exit code 1`.
Configuration menu - View commit details
-
Copy full SHA for 063bfe8 - Browse repository at this point
Copy the full SHA 063bfe8View commit details -
Grant cluster-admin privilege to downstream cluster admin
This enables downstream cluster registration to succeed, as specified in the official Rancher docs [1]. [1]: https://ranchermanager.docs.rancher.com/v2.0-v2.4/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/import-existing-clusters#prerequisites
Configuration menu - View commit details
-
Copy full SHA for 076b6b4 - Browse repository at this point
Copy the full SHA 076b6b4View commit details -
Compute public IP instead of hard-coding it
This may eliminate errors with downstream cluster registration.
Configuration menu - View commit details
-
Copy full SHA for 5aa3527 - Browse repository at this point
Copy the full SHA 5aa3527View commit details -
Enable direct Fleet-in-Rancher workflow call
This eases troubleshooting and enables testing Fleet against existing Rancher releases.
Configuration menu - View commit details
-
Copy full SHA for de9a6d6 - Browse repository at this point
Copy the full SHA de9a6d6View commit details -
This is not needed when installing Rancher from Helm instead of building it.
Configuration menu - View commit details
-
Copy full SHA for 3531931 - Browse repository at this point
Copy the full SHA 3531931View commit details -
Replace cert-manager CRDs install parameter
Old parameter `installCRDs` is deprecated.
Configuration menu - View commit details
-
Copy full SHA for 092ef4b - Browse repository at this point
Copy the full SHA 092ef4bView commit details -
Require a non-empty command to import a cluster
The Rancher CLI may output an empty command for a bit, leading `register-downstream-clusters.sh` to fail. Instead of trying to reverse engineer why that might be, we simply run `rancher cluster import` repeatedly until the returned command is non-empty.
Configuration menu - View commit details
-
Copy full SHA for 2499d01 - Browse repository at this point
Copy the full SHA 2499d01View commit details -
Restore Tmate step for troubleshooting
This could help us understand why downstream cluster registration fails in CI although it works locally.
Configuration menu - View commit details
-
Copy full SHA for 11a4a1d - Browse repository at this point
Copy the full SHA 11a4a1dView commit details -
Fix downstream cluster registration
When installing Rancher through Helm: * the `CATTLE_SERVER_URL` needs to be set to the same value as `hostname` * TLS mode must be set to `system-store`, to prevent cert-related errors when running a Fleet agent in a downstream cluster
Configuration menu - View commit details
-
Copy full SHA for 6da4914 - Browse repository at this point
Copy the full SHA 6da4914View commit details -
Ensure API server IP is available before setting it
This waits for the upstream cluster to be ready, preventing an empty IP from being set.
Configuration menu - View commit details
-
Copy full SHA for 8883d22 - Browse repository at this point
Copy the full SHA 8883d22View commit details -
Environment variables are not necessary, as a dedicated Helm value exists.
Configuration menu - View commit details
-
Copy full SHA for 97ca39f - Browse repository at this point
Copy the full SHA 97ca39fView commit details -
Document testing Fleet in Rancher
This moves `test-in-rancher` to the `dev` scripts directory, and briefly explains how to use it.
Configuration menu - View commit details
-
Copy full SHA for 2bb8222 - Browse repository at this point
Copy the full SHA 2bb8222View commit details -
Restore consistency in job blocks layout
A newline follows the initial `-`, as in other workflows.
Configuration menu - View commit details
-
Copy full SHA for c0d5cb0 - Browse repository at this point
Copy the full SHA c0d5cb0View commit details -
Rename Fleet-in-Rancher test script
The script does not actually test anything, and is now named consistently with other scripts living in the `dev/` folder.
Configuration menu - View commit details
-
Copy full SHA for 0ee61e1 - Browse repository at this point
Copy the full SHA 0ee61e1View commit details -
Remove cluster setup from Fleet-in-Rancher dev script
The script would not manage a cluster's lifecycle beyond its creation anyway, and doing so would be harder to automate. It is therefore left out of the script's scope.
Configuration menu - View commit details
-
Copy full SHA for 8e9506f - Browse repository at this point
Copy the full SHA 8e9506fView commit details -
Create new workflow for testing Fleet in Rancher
This leaves the original workflow in place, upgrading Fleet in Rancher.
Configuration menu - View commit details
-
Copy full SHA for 0bc41a4 - Browse repository at this point
Copy the full SHA 0bc41a4View commit details -
That block is not necessary, as tests are run against clusters afterwards.
Configuration menu - View commit details
-
Copy full SHA for c2a0225 - Browse repository at this point
Copy the full SHA c2a0225View commit details -
Add acceptance tests to Fleet-in-Rancher test workflow
This ensures that Fleet examples are validated against Fleet in Rancher.
Configuration menu - View commit details
-
Copy full SHA for 7b82940 - Browse repository at this point
Copy the full SHA 7b82940View commit details -
That check is only relevant when using a custom charts branch.
Configuration menu - View commit details
-
Copy full SHA for 7c318a1 - Browse repository at this point
Copy the full SHA 7c318a1View commit details