Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 5 additions & 3 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ concurrency:
cancel-in-progress: true

env:
VCLUSTER_VERSION: v0.25.0
VCLUSTER_VERSION: v0.26.0
VCLUSTER_SUFFIX: vcluster
VCLUSTER_NAME: vcluster
VCLUSTER_NAMESPACE: vcluster
VCLUSTER_BACKGROUND_PROXY_IMAGE: ghcr.io/loft-sh/vcluster-pro:0.26.0

jobs:
e2e-tests:
Expand All @@ -39,8 +40,8 @@ jobs:
- name: Set up kind k8s cluster
uses: engineerd/setup-kind@v0.5.0
with:
version: "v0.20.0"
image: kindest/node:v1.28.0@sha256:b7a4cad12c197af3ba43202d3efe03246b3f0793f162afb40a33c923952d5b31
version: "v0.26.0"
image: kindest/node:v1.32.0@sha256:c48c62eac5da28cdadcf560d1d8616cfa6783b58f0d94cf63ad1bf49600cb027

- name: Testing kind cluster set-up
run: |
Expand Down Expand Up @@ -106,6 +107,7 @@ jobs:
continue-on-error: true
run: |
set -x
docker pull ${{ env.VCLUSTER_BACKGROUND_PROXY_IMAGE }}

VCLUSTER_SUFFIX=${{ env.VCLUSTER_SUFFIX }} VCLUSTER_NAME=${{ env.VCLUSTER_NAME }} VCLUSTER_NAMESPACE=${{ env.VCLUSTER_NAMESPACE }} go test -v -ginkgo.v -ginkgo.fail-fast

Expand Down
59 changes: 0 additions & 59 deletions .github/workflows/upgrade.yaml

This file was deleted.

32 changes: 22 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,33 @@ It is important to state that you retain copyright for your contributions, but a

## Upgrading vCluster Dependency

We have an automated CI workflow to update the vCluster dependency and vCluster CLI versions in E2E tests. Here's how to use it:
We have a script to update the vCluster dependency and vCluster CLI versions in E2E tests. Here's how to use it:

1. Navigate to the "Actions" tab in the repository
2. Find and select the "Update vCluster dep" workflow
3. Click "Run workflow"
4. Enter the target vCluster version (e.g., `v0.25.0`) as the input parameter
5. Run the workflow

The CI job will automatically:
- Update the necessary dependencies
- Generate a Pull Request in this repository with the changes
1. Clone the repository
2. `export VCLUSTER_VERSION="v0.26.0"`
3. Run `go run ./hack/bump-vcluster-dep.go "v0.26.0"` (replace "v0.26.0" with targeted vCluster version)
4. Add and commit changes to the new branch
5. Open a Pull Request

### After the PR is created:
- Verify that all E2E tests pass on the PR
- Some cases may require additional manual changes (if tests fail, check the logs)
- Once all tests pass, the PR is ready to be reviewed and merged
- merge the PR

### Update examples
Run following commands in each: `examples/bootstrap-with-deployment`, `examples/crd-sync`, `examples/hooks`:
1. `go get github.com/loft-sh/vcluster@${VCLUSTER_VERSION}`
2. Get the last commit SHA on main branch (one from the PR you just merged)
3. Run `go get github.com/loft-sh/vcluster-sdk@{COMMIT_SHA}`
4. Run `go mod tidy`
5. Ensure that example compiles by building a docker image: `docker build . -t my-repo/my-plugin:0.0.1`
6. If it fails to compile, you need to adjust the `*.go` files in the examples to the in the syncer interfaces in the vCluster targeted version
7. Once all of them compile, commit changes and open a PR
8. Merge PR

### Create vcluster-sdk release
1. In Github, click on "Create release", pick a tag and release branch, autogenerate release notes.
2. Release pipeline will build vcluster-sdk image and examples image

This process helps keep our vCluster dependencies up-to-date while ensuring compatibility through the e2e test suite.
28 changes: 19 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/ghodss/yaml v1.0.0
github.com/hashicorp/go-plugin v1.6.0
github.com/loft-sh/log v0.0.0-20240219160058-26d83ffb46ac
github.com/loft-sh/vcluster v0.25.0
github.com/loft-sh/vcluster v0.26.0
github.com/onsi/ginkgo/v2 v2.21.0
github.com/onsi/gomega v1.35.1
github.com/pkg/errors v0.9.1
Expand All @@ -27,6 +27,7 @@ require (
github.com/AlecAivazis/survey/v2 v2.3.7 // indirect
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
github.com/MakeNowJust/heredoc v1.0.0 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/NYTimes/gziphandler v1.1.1 // indirect
github.com/ProtonMail/go-crypto v1.0.0 // indirect
github.com/Sytten/logrus-zap-hook v0.1.0 // indirect
Expand Down Expand Up @@ -60,16 +61,18 @@ require (
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/chai2010/gettext-go v1.0.2 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/cloudflare/circl v1.6.1 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.16.3 // indirect
github.com/coreos/go-semver v0.3.1 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/denisbrodbeck/machineid v1.0.1 // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/docker/cli v27.5.0+incompatible // indirect
github.com/docker/distribution v2.8.3+incompatible // indirect
github.com/docker/docker v27.5.0+incompatible // indirect
github.com/docker/docker-credential-helpers v0.8.2 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/dprotaso/go-yit v0.0.0-20191028211022-135eb7262960 // indirect
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
github.com/evanphx/json-patch v5.8.1+incompatible // indirect
Expand Down Expand Up @@ -120,11 +123,12 @@ require (
github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
github.com/loft-sh/admin-apis v0.0.0-20240203010124-3600c1c582a8 // indirect
github.com/loft-sh/agentapi/v4 v4.0.0-alpha.6.0.20240614131646-3359da6a4818 // indirect
github.com/lithammer/dedent v1.1.0 // indirect
github.com/loft-sh/admin-apis v0.0.0-20250429193833-4e0a455c33dd // indirect
github.com/loft-sh/agentapi/v4 v4.3.0-alpha.39 // indirect
github.com/loft-sh/analytics-client v0.0.0-20240219162240-2f4c64b2494e // indirect
github.com/loft-sh/api/v4 v4.0.0-alpha.6.0.20240614134907-f9ecc1668e9e // indirect
github.com/loft-sh/apiserver v0.0.0-20240607231110-634aeeab2b36 // indirect
github.com/loft-sh/api/v4 v4.3.0-alpha.32 // indirect
github.com/loft-sh/apiserver v0.0.0-20250206205835-422f1d472459 // indirect
github.com/loft-sh/utils v0.0.29 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
Expand All @@ -139,6 +143,7 @@ require (
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/nxadm/tail v1.4.11 // indirect
Expand All @@ -148,7 +153,7 @@ require (
github.com/opencontainers/image-spec v1.1.0 // indirect
github.com/otiai10/copy v1.11.0 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/prometheus/client_golang v1.20.4 // indirect
github.com/prometheus/client_golang v1.20.5 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.60.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
Expand Down Expand Up @@ -185,15 +190,15 @@ require (
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/crypto v0.36.0 // indirect
golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6 // indirect
golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 // indirect
golang.org/x/mod v0.22.0 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/oauth2 v0.28.0 // indirect
golang.org/x/sync v0.12.0 // indirect
golang.org/x/sys v0.31.0 // indirect
golang.org/x/term v0.30.0 // indirect
golang.org/x/text v0.23.0 // indirect
golang.org/x/time v0.7.0 // indirect
golang.org/x/time v0.9.0 // indirect
golang.org/x/tools v0.29.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240930140551-af27646dc61f // indirect
Expand All @@ -206,14 +211,19 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.32.1 // indirect
k8s.io/cli-runtime v0.32.1 // indirect
k8s.io/cluster-bootstrap v0.32.1 // indirect
k8s.io/component-base v0.32.1 // indirect
k8s.io/component-helpers v0.32.1 // indirect
k8s.io/cri-api v0.32.1 // indirect
k8s.io/cri-client v0.32.1 // indirect
k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9 // indirect
k8s.io/kms v0.32.1 // indirect
k8s.io/kube-aggregator v0.32.1 // indirect
k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect
k8s.io/kube-proxy v0.32.1 // indirect
k8s.io/kubectl v0.32.1 // indirect
k8s.io/kubelet v0.32.1 // indirect
k8s.io/kubernetes v1.32.1 // indirect
k8s.io/metrics v0.32.1 // indirect
k8s.io/pod-security-admission v0.32.1 // indirect
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect
Expand Down
Loading