Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Prometheus integration in Watcher controller #40
base: main
Are you sure you want to change the base?
Prometheus integration in Watcher controller #40
Changes from all commits
3742e2b
aecb03d
5bb5ffd
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we proably shoudl be waiting in watcher_deploy and watcher_deploy_cleanup too
again like we do for kuttle
https://github.com/openstack-k8s-operators/nova-operator/blob/main/Makefile#L400-L417
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, I'm adding a wait for watcher CR after creating it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
required filed should not have a default.
if they have a default the are optional.
operator lint is meant to catch this but i don't actual see a lint rule in place for this edgecase.
https://github.com/gibizer/operator-lint/tree/main/linters/crd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question about the default value ... is there some significance to "metric-storage-prometheus-config" I couldn't find any more references in this repo with grep.
it doesn't "sound" like a secret ;) so just curious
[EDIT]: I couldn't reply to this so adding an edit instead. it seems the convention is to use some variation of
-config-
in the name for the secrets, especially since we're using them for more than just secret but also to carry the configThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That name was proposed by the CloudOps team as the default secret name that will be created by the telemetry-operator with the required info.
I'm doing it optional, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes so any secret the contains configuration used by a service has -config in it
that actually came form the fact that originally they started as config maps and then we moved most config into secrets because they could or will contain passwords or URLs
so the convention of adding "config" to the name stuck when it became a secret
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it might do this already but this should result in the inputready condition being false i think
we could also do something like
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
by the way i noteest that for the transport URL we are doing
ctrl.Result{RequeueAfter: time.Duration(10) * time.Second}, nil
that a latent bug that we should fix separate.
we should not be doing any requeueing manually.
that one fo the anti-patterns that we need to review for and address in our existing code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll use the regular inputready condition with a custom message for prometheus secret error, is that fine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep thats perfect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
by the way we need to create a finalise on the PrometheusSecret and remove it in our delete code path.
I'm not sure if we should do it before or after we ensure it has the correct content but I'm thinking before we call ensureSecret.
if we do it here then it might have been delete after we validated it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! I didn't think on that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i dont fully recall how it works so I can't comment on the details but yes we should be watching changes to secrets that we have references too.