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

Apply the default Grafana Version to the CR spec #1446

Closed
theSuess opened this issue Mar 11, 2024 · 3 comments
Closed

Apply the default Grafana Version to the CR spec #1446

theSuess opened this issue Mar 11, 2024 · 3 comments
Labels
enhancement New feature or request triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@theSuess
Copy link
Member

Currently, the default Grafana version, is transparently used to create the instance if no custom image is specified.

When we update the default version in the operator, this will lead to unexpected Grafana upgrades.

To remedy this, we should add a field to control the version used by the operator. For example:

apiVersion: grafana.integreatly.org/v1beta1
kind: Grafana
metadata:
  name: grafana
  labels:
    dashboards: "grafana"
spec:
  version: '10.4'

The version would correspond to the container image tag.

If this field is not set in the applied spec, the operator should set it for the user. By explicitly applying the default version, the version is locked and will not be unexpectedly upgraded due to the operator changing the default version

@theSuess theSuess added enhancement New feature or request needs triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Mar 11, 2024
@theSuess
Copy link
Member Author

Another option would be to add a field to specify the image used and set this if empty.

One example of another operator doing this is the MinIO operator: https://github.com/minio/operator/blob/798825dd0a9071875e89f0af321dc671a4e995f8/api/tenant_update.go#L52

@pb82
Copy link
Collaborator

pb82 commented Mar 12, 2024

@theSuess I wonder, why set the version in the spec and not the status?

@theSuess
Copy link
Member Author

Setting the version in the spec allows us to pin the version in the resource, that way operator updates will not result in an unplanned upgrade of Grafana

@theSuess theSuess added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Mar 19, 2024
@theSuess theSuess closed this as completed May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

2 participants