Add explicit resource blocks for managed workloads#32
Conversation
Explicitly set the resource block on all managed workloads (default empty on all to avoid breaking changes). Also allow setting the resource values through the Values file for all managed workloads: - DB init job - Grafana deployment - Prometheus deployment - PGWatch deployment - The Metrics Database backend
There was a problem hiding this comment.
Overall, the PR looks good to me, thank you @adrianeliasson .
One small nitpick about the naming conventions, variables start with lowercase letters.
Other than that, if you want, you can add low values you mentioned in your comment as commented-out example suggestions for init jobs and initContainers. However, I'd rather not add active defaults or recommendations for the main workloads such as PostgreSQL, Prometheus, Grafana, or Pgwatch itself.
Resource requirements vary significantly depending on workload size, scrape interval, number of monitored DBs, retention settings, dashboards, etc. In my opinion, bad defaults are worse than no defaults. Because of that, I would suggest keeping the scope of this implementation focused on providing the functionality, while leaving actual resource sizing decisions to users.
Could you also add a short section to the README.md describing how to configure resource blocks for the built-in workloads, so users are aware of this functionality?
After your fixes, I think the PR is good to go. Thanks again for your work. 👏
| size: '10Gi' | ||
| storageClass: 'standard' | ||
| # -- Resource requests and limits for the Metrics Database init job. | ||
| DbInitJob: |
There was a problem hiding this comment.
| DbInitJob: | |
| dbInitJob: |
According to Helm Naming Conventions:
Variable names should begin with a lowercase letter, and words should be separated with camelcase:
|
Hi @adrianeliasson 👋 I'd be happy to include this in the next release once the PR is ready to merge. If you need anything, please don't hesitate to nudge :) |
Closes #30
Explicitly set the resource block on all managed workloads (default empty object on all workloads to avoid breaking changes). Also allow setting the resource values through the Values file for all managed workloads: