openshift / openshift/oadp-operator
BUG get image logic
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 92
- Forks
- 93
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 43
Description
Description
OADP code is changed when sent to production, for example
https://github.com/openshift/oadp-operator/blob/fe0444c847f79a8a12d03f3d67208c552af12457/config/manager/manager.yaml#L39-L56
values are changed to production images.
But, these values are not changed
https://github.com/openshift/oadp-operator/blob/fe0444c847f79a8a12d03f3d67208c552af12457/pkg/common/common.go#L60-L69
Which means, in a production environment, all fallback from below functions, are wrong.
https://github.com/openshift/oadp-operator/blob/fe0444c847f79a8a12d03f3d67208c552af12457/controllers/velero.go#L514-L522
How to reproduce
Install OADP operator from marketplace and change the value of one these environment variables to an empty string (or remove the environment variable). Create DPA that will use one of these images, without using unsupportedOverrides. OADP will try to use a non production image instead of a production one.
Related work for DPA when API version updates
Instead of having unsupportedOverrides field in DPA, could not we use these environment variables to change images used? Instead of a field in DPA, would need to change value in operator CSV.
Contributor guide
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 by comparing the production image values in config/manager/manager.yaml with the fallback values in pkg/common/common.go. Trace the fallback paths in controllers/velero.go and pkg/credentials/credentials.go, then reproduce by removing an image environment variable and creating a DPA without unsupportedOverrides. Done means production deployments select production images when those variables are empty or absent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100