-
Notifications
You must be signed in to change notification settings - Fork 5
Description
What happened?
When creating a release of provider-ceph, and omitting spec.controller.image from package/crossplane.yaml. The provider should be deployed with a controller of the same version as the provider package itself.
However, the controller version is not being read from the provider revision. This results in Crossplane attempting to find the controller image at spec.controller.image, (here is where this check appears to occur in the Crossplane codebase https://github.com/crossplane/crossplane/blob/af303b4fe2f04f824656f01a30b5c4cd10b0add8/internal/controller/pkg/revision/deployment.go#L73). This results in the below error, as the image is intentionally undefined:
Warning SyncPackage 4m13s (x51 over 49m) packages/providerrevision.pkg.crossplane.io cannot run post establish hook for package: cannot apply provider package deployment: cannot create object: Deployment.apps "provider-ceph-04c9ab7fb3f9" is invalid: spec.template.spec.containers[0].image: Required value
Expected behaviour is that the version would be taken from provider and providerrevision objects which can be seen below:
kubectl get providers
NAME INSTALLED HEALTHY PACKAGE AGE
linode-provider-ceph True False xpkg.upbound.io/linode/provider-ceph:v0.0.2 89s
kubectl get providerrevisions
NAME HEALTHY REVISION IMAGE STATE DEP-FOUND DEP-INSTALLED AGE
linode-provider-ceph-09f95af9b466 False 1 xpkg.upbound.io/linode/provider-ceph:v0.0.2 Active 2m37s
How can we reproduce it?
- Follow the release process
docs/RELEASE_PROCESS.md, but do not add the controller image version as instructed in step 4. - Deploy the new release, the deployment will fail to start.
What environment did it happen in?
Crossplane version: v1.12.1
Kind version: v0.15.0
Kubernetes version: v1.25.2
OS: Ubuntu 20.04 LTS
Kernel: 5.4.0