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

redpanda: simplify setting redpanda resources #375

Merged
merged 2 commits into from
Jan 13, 2025

Conversation

chrisseto
Copy link
Contributor

@chrisseto chrisseto commented Jan 8, 2025

Based on:

8ddd726 redpanda: refactor resource flag computations

This commit has no user facing changes. It refactors the various functions that
affect and define the redpanda container's resources and the resource related
CLI flags (--smp, --memory, --reserve-memory, and --overprovisioned)
into methods on the RedpandaResource struct.

35492dc redpanda: simplify setting redpanda resources

Prior to this commit it was not possible to "mix and match" the resource
requests and limits of the redpanda container. The redpanda chart also required
users to grok a new model of resources unique to the chart which made the chart
less user friendly.

This commit introduces a more user friendly and backwards compatible way of
directly controlling the requests and limits of the redpanda container. Rather
than directly exposing the --smp, --memory, --reserve-memory, and
--overprovisioned flags to the end user, this method will infer them from the
provided values with updated best practices.

redpanda-data/helm-charts#1494
K8S-325
K8S-434

@chrisseto chrisseto changed the title Chris/p/redpanda direct resources redpanda: simplify setting redpanda resources Jan 8, 2025
@chrisseto
Copy link
Contributor Author

This is a mirror/rebase of redpanda-data/helm-charts#1622 as the operator is now the host of the charts.

This commit has no user facing changes. It refactors the various functions that
affect and define the redpanda container's resources and the resource related
CLI flags (`--smp`, `--memory`, `--reserve-memory`, and `--overprovisioned`)
into methods on the `RedpandaResource` struct.
@chrisseto chrisseto force-pushed the chris/p/redpanda-direct-resources branch from 35492dc to 1e8fa75 Compare January 9, 2025 19:09
@RafalKorepta
Copy link
Contributor

This branch needs to be rebased
https://buildkite.com/redpanda/redpanda-operator/builds/3976#01944c78-afc4-48cf-a03d-122c009e940c/211-343

task: [ci:lint] git diff --exit-code
--
  | diff --git a/charts/redpanda/README.md b/charts/redpanda/README.md
  | index 1e7ba4d0..bc5c6d4c 100644
  | --- a/charts/redpanda/README.md
  | +++ b/charts/redpanda/README.md
  | @@ -996,7 +996,7 @@ To create `Guaranteed` Pods for Redpanda brokers, provide both requests and limi
  |  
  | ### [statefulset.sideCars.controllers.image.tag](https://artifacthub.io/packages/helm/redpanda-data/redpanda?modal=values&path=statefulset.sideCars.controllers.image.tag)
  |  
  | -**Default:** `"v2.3.3-24.3.1"`
  | +**Default:** `"v2.3.5-24.3.2"`
  |  
  | ### [statefulset.sideCars.controllers.metricsAddress](https://artifacthub.io/packages/helm/redpanda-data/redpanda?modal=values&path=statefulset.sideCars.controllers.metricsAddress)
  |  
  | task: Failed to run task "ci:lint": exit status 1

@chrisseto chrisseto force-pushed the chris/p/redpanda-direct-resources branch 2 times, most recently from 71b16f4 to c827f43 Compare January 13, 2025 15:27
Prior to this commit it was not possible to "mix and match" the resource
requests and limits of the redpanda container. The redpanda chart also required
users to grok a new model of resources unique to the chart which made the chart
less user friendly.

This commit introduces a more user friendly and backwards compatible way of
directly controlling the requests and limits of the redpanda container. Rather
than directly exposing the `--smp`, `--memory`, `--reserve-memory`, and
`--overprovisioned` flags to the end user, this method will infer them from the
provided values with updated best practices.

redpanda-data/helm-charts#1494
K8S-325
K8S-434
@chrisseto chrisseto force-pushed the chris/p/redpanda-direct-resources branch from c827f43 to d50748f Compare January 13, 2025 15:34
@chrisseto chrisseto enabled auto-merge (rebase) January 13, 2025 15:35
@chrisseto chrisseto merged commit 787bd25 into main Jan 13, 2025
6 of 8 checks passed
@RafalKorepta RafalKorepta deleted the chris/p/redpanda-direct-resources branch January 13, 2025 16:14
RafalKorepta added a commit that referenced this pull request Jan 13, 2025
RafalKorepta added a commit that referenced this pull request Jan 13, 2025
After #375 PR the
Redpanda CRD missed new limits and requests inside resources type.
RafalKorepta added a commit that referenced this pull request Jan 13, 2025
After #375 PR the
Redpanda CRD missed new limits and requests inside resources type.
RafalKorepta added a commit that referenced this pull request Jan 13, 2025
After #375 PR the
Redpanda CRD missed new limits and requests inside resources type.
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.

2 participants