Controller image is not being recognised for released package
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 22
- Forks
- 8
- Avg merge
- 14h 18m
- Merged PRs (30d)
- 12
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?
1. Follow the release process `docs/RELEASE_PROCESS.md`, but **do not** add the controller image version as instructed in step 4.
2. 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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with docs/RELEASE_PROCESS.md and the linked Crossplane internal/controller/pkg/revision/deployment.go location. Reproduce the release while omitting the controller image version, then compare the provider and providerrevision image values shown in the issue. Done means the released package deploys its controller using the provider package version without requiring spec.controller.image.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- backend, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100