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

Configuration CRD does not allow default_cpu_limit to be blank using Helm #2588

Open
EraYaN opened this issue Mar 20, 2024 · 0 comments
Open

Comments

@EraYaN
Copy link

EraYaN commented Mar 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? v1.11.0
  • Where do you run it - cloud or metal? Kubernetes or OpenShift? Azure AKS
  • Are you running Postgres Operator in production? yes
  • Type of issue? Bug report or Question (depends)

So in the helm chart values we specifiy

configPostgresPodResources:
  default_cpu_limit: null
  # CPU request value for the postgres containers
  default_cpu_request: "1"
  # memory limits for the postgres containers
  default_memory_limit: null
  # memory request value for the postgres containers
  default_memory_request: 1Gi

to unset the values from the defaults

helm template postgres-operator-charts/postgres-operator --version 1.11.0 --values config/postgres-operator/values.yml renders these out correctly:

postgres_pod_resources:
    default_cpu_request: "1"
    default_memory_request: 1Gi
    min_cpu_limit: 250m
    min_memory_limit: 250Mi

The sad thing is when applied with terraform the actual resource in the cluster is

postgres_pod_resources:
    default_cpu_limit: "1"
    default_cpu_request: "1"
    default_memory_limit: 500Mi
    default_memory_request: 1Gi
    min_cpu_limit: 250m
    min_memory_limit: 250Mi

So when a server is now deployed even without the limit, it seems the request is just copied.

resources:
      limits:
        memory: 16Gi
      requests:
        cpu: "2"
        memory: 4Gi

Is there anyway we can either make the default empty or make the configuration CRD respect the empties? Or did I miss some configuration item?

@EraYaN EraYaN changed the title Configuration CRD does not allow default_cpu_limit to be blank. Configuration CRD does not allow default_cpu_limit to be blank using Helm Mar 20, 2024
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

No branches or pull requests

1 participant