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

do not add CR serviceAnnotations into grafanaAlert service #1064

Closed

Conversation

paulczar
Copy link
Contributor

fixes #1050

Signed-off-by: Paul Czarkowski <username.taken@gmail.com>
@paulczar paulczar changed the title do not merge CR serviceAnnotations into grafanaAlert service do not add CR serviceAnnotations into grafanaAlert service May 22, 2023
@NissesSenap
Copy link
Collaborator

@celestialorb do you have any thoughts on this PR?

@celestialorb
Copy link
Contributor

@celestialorb do you have any thoughts on this PR?

@NissesSenap I'm fine with this, though depending on how you view this this could potentially be a breaking change. Someone might be relying on the fact that the Spec.Service.Annotations field is applied to both the Grafana service as well as the alert service; though I highly doubt it.

I think the ideal solution is that there would be a separate field for applying annotations to the alert service, but removing the application of annotations from the alert service is a fine first step if we're okay with it and don't consider it to be a breaking change.

@celestialorb
Copy link
Contributor

@NissesSenap I reviewed the CR definition for the Grafana type and I think this change is fine and not breaking. The service field of it reads to me as only applying to the Grafana service (and not alert service) so I would view this as a bugfix and not a breaking change. 👍

Copy link
Collaborator

@NissesSenap NissesSenap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we only send in a nil value, so in practice it's not possible to set any specific AlertServiceAnnotation https://github.com/grafana-operator/grafana-operator/blob/f41668f73c4aa54129472a3aab5dfb50f7db6979/controllers/model/grafanaAlertService.go#L37

It's better that we remove the function and remove the usage of it all together.

@NissesSenap
Copy link
Collaborator

@celestialorb and @paulczar I think we should be able to remove this function all together, unless I'm thinking wrong.
Do you agree?
Added a comment above.

When the PR gets updated, I'm happy to merge it.

@celestialorb
Copy link
Contributor

@NissesSenap Yeah, I'd say there's not really a reason to be adding annotations to the alert service for now. Only case I can think of is maybe for a service mesh or other operator that acts off of annotations. I think until someone raises a use case for having them removing the annotations (and thus the function call and definition) is valid.

@celestialorb
Copy link
Contributor

Created #1065 to address this. Feel free to close it if this PR is updated with the requested changes.

@paulczar
Copy link
Contributor Author

@NissesSenap @celestialorb thanks for taking care of this!! I was travelling so it was a happy surprise to get back and find it being resolved.

I had left the function in case someone wanted the scaffolding in place to set separate annotations for grafana-alert, but happy to see it gone and merged in #1065.

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

3 participants