Allow user specify exact resources requests and limits

Đang mở
#2,959 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
go, kubernetes, postgresql
Lĩnh vực
databases, infrastructure

Hướng nghiên cứu

Issue này đề cập đến các StatefulSets do operator quản lý và các manifest PostgreSQL, nhưng không chỉ ra tệp nào trong repository hoặc các test. Hãy bắt đầu bằng việc truy vết nơi operator xây dựng các yêu cầu và giới hạn tài nguyên, sau đó xác minh hành vi khi bỏ qua giới hạn CPU, khi các yêu cầu không đầy đủ và khi có một block resources trống. Công việc được xem là hoàn tất khi các tài nguyên do người dùng chỉ định được giữ nguyên mà không có default không mong muốn, và các test bao phủ các ví dụ.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

  • 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
Ngôn ngữ chính
Go
Star
5.3k
Fork
1.1k
Merge trung bình
3 ngày 17 giờ
Pull request đã merge (30 ngày)
11

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của zalando/postgres-operator

Tất cả issue của zalando/postgres-operator

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.