Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding tests for grafana version #1480

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

NissesSenap
Copy link
Collaborator

We need to handle deployment fields for version. We also need to handle what happens if we set both of the values at the same time? Or should we just block that all together?

@theSuess
Copy link
Member

theSuess commented Apr 3, 2024

I'd ignore the spec.version field if the container image has ben overwritten. I've envisioned the version field as an easy-to-use alternative specifying a deployment override. If the user knows what they're doing, they can override the image with a custom one.

The status field should report the correct version in any case

@theSuess
Copy link
Member

theSuess commented Apr 3, 2024

The tests here fail as the getGrafanaImage never takes the deployment override into account. The deployment override takes place last and is merged with the deployment built by the operator.

err := v1beta1.Merge(deployment, cr.Spec.Deployment)

We can also add tests for this, but those testcases would only show bugs in the upstream merge function.

@NissesSenap NissesSenap marked this pull request as draft April 17, 2024 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants