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

Default cpu limits #2804

Open
ecniiv opened this issue Nov 20, 2024 · 2 comments
Open

Default cpu limits #2804

ecniiv opened this issue Nov 20, 2024 · 2 comments
Labels

Comments

@ecniiv
Copy link

ecniiv commented Nov 20, 2024

Please, answer some short questions which should help us to understand your problem / question better?

  • Which image of the operator are you using? ghcr.io/zalando/postgres-operator:v1.13.0
  • Where do you run it - cloud or metal? Kubernetes or OpenShift? Bare Metal K8s
  • Are you running Postgres Operator in production? no
  • Type of issue? bug report/question

HI, i saw this PR: #2524 that should resolve the default cpu limit problems, but using the v1.13.0 postgres operator image I still can't let the cpu limits empty, the operator will update the statefulset:

time="2024-11-20T16:09:08Z" level=info msg="statefulset test/test is not in the desired state and needs to be updated" cluster-name=test/test pkg=cluster worker=7
time="2024-11-20T16:09:08Z" level=debug msg="+              cpu: 1," cluster-name=test/test pkg=cluster worker=7

In the PR #2524 I see the doc updated for default_cpu_limit parameters:

Empty string or `0` disables the default.

but the doc here seems not updated, and if I try:

  resources:
    requests:
      cpu: 100m
      memory: 100Mi
    limits:
      cpu: ""
      memory: 250Mi

I'm getting The postgresql "test" is invalid: spec.resources.limits.cpu: Invalid value: "": spec.resources.limits.cpu in body should match '^(\d+m|\d+(\.\d{1,3})?)$'

Maybe I'm missing something.
Thx

@FxKu
Copy link
Member

FxKu commented Nov 22, 2024

What happens when you specify limits without cpu?
Anyway, the schema validation has been updated in #2735. It's just not part of a release, yet.

@FxKu FxKu added the question label Nov 22, 2024
@ecniiv
Copy link
Author

ecniiv commented Nov 22, 2024

When I specify limits without settings cpu, the statefulset is created with limits.cpu: 1,
In the operator configuration, I have set all the default/min cpu limit to null;

default_cpu_limit: null
min_cpu_limit: null

Don't understand why the operator set the limits.cpu to 1 in the statefulset

Ok, I see, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants