Allow user specify exact resources requests and limits

オープン
#2,959 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
go, kubernetes, postgresql

調査の方向性

この issue では、operator が管理する StatefulSets と PostgreSQL マニフェストについて言及されていますが、リポジトリのファイルやテストは指定されていません。まず、operator がリソースの requests と limits を構築する箇所を追跡し、次に CPU limits を省略した場合、requests が部分的な場合、空の resources ブロックの場合の動作を確認してください。ユーザーが指定したリソースが意図しないデフォルトなしで保持され、テストが例をカバーしていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

  • 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
主要言語
Go
スター
5.3k
フォーク
1.1k
平均マージ
3日 17時間
マージ済み PR(30日)
11

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

zalando/postgres-operator のほかの issue

zalando/postgres-operator の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。