-
Notifications
You must be signed in to change notification settings - Fork 13
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
[CC-26984] metric-export: add resource for prometheus integration #200
Conversation
@aa-joshi @marksoper considering that there is no actual configuration for enabling prometheus what you do think of having it as an additional field on the cluster resource? It could be something like:
If we were planning to add configuration options to this at some point in the near future, it seems like keeping it as its own resource would be desirable but even in that case we could just have that resource just represent the configuration and keep the enabled / disabled flag on cluster. For example,
|
I guess another consideration is whether we'd expose some of the outputs as part of the resource. I see that the api response has the following data:
|
We have existing metric export integration which has their own resources: Hence we would like to keep it consistent with other metric export integrations. I will create a seperate backlog item to track integrations against the cluster resource. |
Thanks for suggestion! I have made required changes to keep track of |
For future consideration, I think should always re-evaluate the best way to expose the api for any new resources. Existing resource patterns is of course valuable input into this decision but not the only consideration. In this case, since we want to expose the additional outputs, I agree that it should be a new resource. |
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.
Hey, thanks for taking this on. I left some feedback for you.
Went over the changes in a pair programming session (learnt a lot about terraform lifecycle today!). This LGTM. |
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.
This is a looking a lot cleaner. Thanks for your work here. I added some followup comments and some that I missed earlier.
internal/provider/metric_export_prometheus_config_resource_test.go
Outdated
Show resolved
Hide resolved
internal/provider/metric_export_prometheus_config_resource_test.go
Outdated
Show resolved
Hide resolved
internal/provider/metric_export_prometheus_config_resource_test.go
Outdated
Show resolved
Hide resolved
internal/provider/metric_export_prometheus_config_resource_test.go
Outdated
Show resolved
Hide resolved
48fae71
to
28cde10
Compare
@fantapop Can you please give it one final look? |
@fantapop we have made the requested changes |
internal/provider/metric_export_prometheus_config_resource_test.go
Outdated
Show resolved
Hide resolved
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've added some additional small nits to the review. Please take a look at these before merging. Also, please rebase off the latest main branch. Thanks for everyone's work on this!
This change introduces resource MetricExportPrometheusConfig which manages prometheus metric export integration in gcp and aws cloud providers.
* declare a seperate timeout for metric export enable/disable/status refresh * Remove debug logs * Rename retryFunc -> deletePromMetricExport
This change introduces resource MetricExportPrometheusConfig which manages prometheus metric export integration in gcp and aws cloud providers.
Commit checklist
make generate
)