4.1 KiB
4.1 KiB
This doc walks through general steps to update pkg dependencies of this project.
- Write the following to go.mod
module github.com/rancher/hosted-providers-e2e
go 1.22
require (
github.com/onsi/ginkgo/v2 latest
github.com/onsi/gomega latest
github.com/epinio/epinio latest
github.com/rancher/shepherd fb9a4f1 // rancher/shepherd HEAD commit
github.com/stretchr/testify latest
k8s.io/api v0.29.3
k8s.io/apimachinery v0.29.3
)
replace (
k8s.io/api => k8s.io/api v0.29.3
k8s.io/client-go => github.com/rancher/client-go v1.29.3-rancher1
)
go mod tidy- This will resolve all the versions and dependencies, and generate thego.sumfile.go mod vendor- This will generate vendor files; these are ignored by .gitignore.
Updating the dependecies
There are 4 different kind of packages we are concerned about:
-
Non-kubernetes, non-Rancher pkg:
onsi/ginkgo,onsi/gomega, etc.- These pkgs can be updated as usual by either using
latestor a specific version.
- These pkgs can be updated as usual by either using
-
Non-kubernetes, Rancher pkg: `rancher/shepherd.
rancher/shepherdis always updated by using commit HEAD and then resolving usinggo mod download.github.com/rancher/shepherdhas many branches, currently we are using themainbranch.
-
Kubernetes, non-Rancher pkg: k8s.io/api, k8s.io/apimachinery.
- Kubernetes related packages are bumped to support a newer k8s version and must always be in sync to avoid unnecessary conflicts.
- Ref: k8s.io/api/tags, k8s.io/apimachinary/tags
-
Kubernetes, Rancher pkg: rancher/client-go.
rancher/client-gomust always be in sync with Kubernetes related pkgs since it is always released in sync with the Kubernetes pkgs and tags are named aptly too, for ak8s.io/api:v0.29.3, there will be arancher/client-go:v1.29.3.- Ref: rancher/client-go/tagsThis doc walks through general steps to update pkg dependencies of this project.
-
Write the following to go.mod
module github.com/rancher/hosted-providers-e2e
go 1.22
require (
github.com/onsi/ginkgo/v2 latest
github.com/onsi/gomega latest
github.com/epinio/epinio latest
github.com/rancher/shepherd 3690b7e // shepherd main HEAD commit
github.com/stretchr/testify latest
k8s.io/api v0.29.3
k8s.io/apimachinery v0.29.3
)
replace (
k8s.io/api => k8s.io/api v0.29.3
k8s.io/client-go => github.com/rancher/client-go v1.29.3-rancher1
)
go mod tidy- This will resolve all the versions and dependencies, and generate thego.sumfile.go mod vendor- This will generate vendor files; these are ignored by .gitignore.
Updating the dependecies
There are 4 different kind of packages we are concerned about:
- Non-kubernetes, non-Rancher pkg:
onsi/ginkgo,onsi/gomega, etc.- These pkgs can be updated as usual by either using
latestor a specific version.
- These pkgs can be updated as usual by either using
- Non-kubernetes, Rancher pkg: `rancher/shepherd.
rancher/shepherdis always updated by using commit HEAD and then resolving usinggo mod download.github.com/rancher/shepherdhas many branches, currently we are using themainbranch.rancher/shepherdis the main automation framework we use. It relies onrancher/rancherto decide when to upgrade to a newer k8s pkg.
- Kubernetes, non-Rancher pkg: k8s.io/api, k8s.io/apimachinery.
- Kubernetes related packages are bumped to support a newer k8s version and must always be in sync to avoid unnecessary conflicts.
- Ref: k8s.io/api/tags, k8s.io/apimachinary/tags
- Kubernetes, Rancher pkg: rancher/client-go.
rancher/client-gomust always be in sync with Kubernetes related pkgs since it is always released in sync with the Kubernetes pkgs and tags are named aptly too, for ak8s.io/api:v0.29.3, there will be arancher/client-go:v1.29.3-rancher1.- Ref: rancher/client-go/tags