Skip to content

Add explicit resource blocks for managed workloads#32

Open
adrianeliasson wants to merge 1 commit into
cybertec-postgresql:mainfrom
adrianeliasson:feature/add-explicit-resource-block-for-managed-workloads
Open

Add explicit resource blocks for managed workloads#32
adrianeliasson wants to merge 1 commit into
cybertec-postgresql:mainfrom
adrianeliasson:feature/add-explicit-resource-block-for-managed-workloads

Conversation

@adrianeliasson
Copy link
Copy Markdown

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:

  • DB init job
  • Grafana deployment
  • Prometheus deployment
  • PGWatch deployment
  • The Metrics Database backend

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
Copy link
Copy Markdown
Collaborator

@serdardalgic serdardalgic left a comment

Choose a reason for hiding this comment

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

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. 👏

Comment thread helm/pgwatch/values.yaml
size: '10Gi'
storageClass: 'standard'
# -- Resource requests and limits for the Metrics Database init job.
DbInitJob:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
DbInitJob:
dbInitJob:

According to Helm Naming Conventions:

Variable names should begin with a lowercase letter, and words should be separated with camelcase:

@serdardalgic
Copy link
Copy Markdown
Collaborator

Hi @adrianeliasson 👋
In addition to those minor changes, could you also add a single line in CHANGELOG.md describing the change you made?

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 :)

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.

Add configurable resource requests and limits for built-in workloads

2 participants