Allow user specify exact resources requests and limits

Aperta
#2,959 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
go, kubernetes, postgresql

Direzione di ricerca

L’issue nomina StatefulSets gestiti dall’operator e manifest PostgreSQL, ma non indica file del repository o test. Inizia tracciando dove l’operator costruisce le richieste e i limiti delle risorse, quindi verifica il comportamento quando i limiti della CPU sono omessi, quando le richieste sono parziali e quando è presente un blocco resources vuoto. Il lavoro è completo quando le risorse specificate dall’utente vengono preservate senza defaults indesiderati e i test coprono gli esempi.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

  • Which image of the operator are you using? e.g. ghcr.io/zalando/postgres-operator:v1.14.0
  • Where do you run it - cloud or metal? Kubernetes or OpenShift? DO K8s
  • Are you running Postgres Operator in production? yes
  • Type of issue? feature request

Proposed behavior:

Operator always sets resources.limits and resources.requests.
We specifically do not want to set CPU limits to avoid CPUThrottling but can't. Only solution is to set resources.cpu.limits to value much higher than request. It works but makes default graphical representation in most monitoring tools unpleasant.

Proposed behavior:

Vanilla StatefulSet behavior is different - it just do not set limits if they are not set. I propose to do same - do not make any assumptions and allow user to decide which resources to requests and which limits to set! User knows better.

Examples:

  1. Part of sample STS manifest (I hope it is not required to give full manifests?):
        resources:
          requests:
            cpu: 199m
            memory: 555Mi

Resources in cluster:

    Requests:
      cpu:        199m
      memory:     555Mi
  1. Part of sample postgresql manifest:
  resources:
    requests:
      memory: 555Mi

Resources in cluster:

    Limits:
      cpu:     1
      memory:  555Mi
    Requests:
      cpu:      100m
      memory:   555Mi
  1. Part of sample postgresql manifest:
  resources:
    requests:
      cpu: "2"
      memory: 555Mi

Resources in cluster:

    Limits:
      cpu:     2
      memory:  555Mi
    Requests:
      cpu:      2
      memory:   555Mi
  1. Part of sample postgresql manifest:
  resources: {}

Resources in cluster:

    Limits:
      cpu:     1
      memory:  500Mi
    Requests:
      cpu:      100m
      memory:   100Mi
Lingua principale
Go
Stelle
5.3k
Fork
1.1k
Merge medio
3g 17h
PR unite (30g)
11

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di zalando/postgres-operator

Tutte le issue di zalando/postgres-operator

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.