I found them very helpful but there are just up to version 0.12.0. How can I upgrade to 0.13 and after that?
We're a little behind on the version migration guides :slightly_frowning_face:
The release notes should have all of the major user-facing changes we made in a release, so it should be possible to read them and understand what major features were added/changed, and what broke. As always, it's important to run operator-sdk print-deps to see what project dependencies have been changed.
If you feel so inclined, we would welcome a PR! :slightly_smiling_face:
I understand everyone is busy but it's not easy to upgrade. The migration guide for other versions included the require modules and replace directives. Don't we need that type of information to upgrade to newer versions?
As I mentioned, operator-sdk print-deps will tell you what to use in your go.mod files. The output of that for v0.13.0 is:
go 1.13
require (
github.com/operator-framework/operator-sdk v0.13.0
sigs.k8s.io/controller-runtime v0.4.0
)
// Pinned to kubernetes-1.16.2
replace (
k8s.io/api => k8s.io/api v0.0.0-20191016110408-35e52d86657a
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.0.0-20191016113550-5357c4baaf65
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20191004115801-a2eda9f80ab8
k8s.io/apiserver => k8s.io/apiserver v0.0.0-20191016112112-5190913f932d
k8s.io/cli-runtime => k8s.io/cli-runtime v0.0.0-20191016114015-74ad18325ed5
k8s.io/client-go => k8s.io/client-go v0.0.0-20191016111102-bec269661e48
k8s.io/cloud-provider => k8s.io/cloud-provider v0.0.0-20191016115326-20453efc2458
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.0.0-20191016115129-c07a134afb42
k8s.io/code-generator => k8s.io/code-generator v0.0.0-20191004115455-8e001e5d1894
k8s.io/component-base => k8s.io/component-base v0.0.0-20191016111319-039242c015a9
k8s.io/cri-api => k8s.io/cri-api v0.0.0-20190828162817-608eb1dad4ac
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.0.0-20191016115521-756ffa5af0bd
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.0.0-20191016112429-9587704a8ad4
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.0.0-20191016114939-2b2b218dc1df
k8s.io/kube-proxy => k8s.io/kube-proxy v0.0.0-20191016114407-2e83b6f20229
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.0.0-20191016114748-65049c67a58b
k8s.io/kubectl => k8s.io/kubectl v0.0.0-20191016120415-2ed914427d51
k8s.io/kubelet => k8s.io/kubelet v0.0.0-20191016114556-7841ed97f1b2
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.0.0-20191016115753-cf0698c3a16b
k8s.io/metrics => k8s.io/metrics v0.0.0-20191016113814-3b1a734dba6e
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.0.0-20191016112829-06bb3c9d77c9
)
There's just one breaking change in the CHANGELOG:
Another notable change is the deprecation of operator-sdk generate openapi. That command generates Go OpenAPI code and CRDs and CR examples. In a future release that command will be removed. To fill the CRD/CR generation gap, we added operator-sdk generate crds.
Lastly, be aware that there are potentially other breaking changes due to the controller-runtime and Kubernetes version bumps to v0.4.0 and v1.16.2, respectively. There may be breaking changes to Go client code due to both of those changes.
After upgrading, as always it is important to re-run go mod tidy and the code generation to ensure you get the latest and greatest improvements there:
go mod tidy to update the project modulesoperator-sdk generate k8s to update generated Go code (e.g. deep copy files)operator-sdk generate crds to regenerate CRDsI know this isn't comprehensive, but that should cover about 90% of the migration. We apologize again for being behind on this! We realize we're a few releases behind now, and we'll make it a priority to get these updated (and keep them that way).
We're currently working on upgrading the samples in the operator-sdk-samples repo, so we should be able to update the migration guide as we make those changes.
@joelanford Thanks for the information. It really helps.