Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Use /livez/ for the API liveness probe and a cheaper readiness probe

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

@caiconkhicon がすでに取り組んでいます。

2026年10月9日 から。

  • #1698 @caiconkhicon による — オープン

評価

難易度
3/5
見積もり時間
半日
初心者へのやさしさ
62/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go, kubernetes
領域
devops

調査の方向性

The default probes are defined in controllers/deployment.go: the liveness httpGet and the readiness exec of /usr/bin/readyz.py, both pointing at api/v3/status/. Start there and change the liveness path to api/v3/livez/ with the existing timings, then decide the readiness timings or endpoint with a maintainer. Done means the defaults match the issue and the Pulp CR overrides still apply.

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

説明

Feature Triage-Needed

Is your feature request related to a problem? Please describe.

The default API probes call /status/. This is the same in 2.0.0 and on main, in controllers/deployment.go:

  • Liveness: httpGet to <API_ROOT>api/v3/status/, every 20s, timeout 10s, failureThreshold: 10.
  • Readiness: exec /usr/bin/readyz.py <API_ROOT>api/v3/status/, every 10s, timeout 10s, failureThreshold: 1.

/status/ is not a light check. It runs some database queries, and with object storage it runs SUM(size) over all artifacts (pulp/pulpcore#8196). Because the probes call it on every API pod all the time, this causes two problems:

  1. Database load. The load grows with the number of API replicas and the number of artifacts.
  2. Restarts that do not help. When the database is slow, /status/ takes more than 10s, and the liveness probe restarts API pods that are healthy. A restart does not make the database faster, and requests in progress fail.

Describe the solution you'd like

  • Liveness: use <API_ROOT>api/v3/livez/. Since pulp/pulpcore#7721, /livez/ does not use the database, so it checks only that the API process answers. This is the correct check for a liveness probe.
  • Readiness: keep the database and Redis check, but make it cheaper. For example, call /status/ less often, with a longer timeout and failureThreshold above 1. Or add a light endpoint in pulpcore that checks only the database and Redis connections.

Describe alternatives you've considered

We override the probes in the Pulp CR (spec.api.livenessProbe, spec.api.readinessProbe):

  • Liveness: httpGet <API_ROOT>api/v3/livez/, with the default timings.
  • Readiness: the default readyz.py command, every 60s, timeout 30s, failureThreshold: 3.

This works for us, but every user of the defaults has the same problem.

Additional context

  • /status/ cost in pulpcore: pulp/pulpcore#8196
  • Similar aggregate in the telemetry task: pulp/pulpcore#7475
  • /livez/ without the database: pulp/pulpcore#7721
主要言語
Go
スター
88
フォーク
69
平均マージ
3日 3時間
マージ済み PR(30日)
1

環境構築

はじめの一歩

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

pulp/pulp-operator のほかの issue

pulp/pulp-operator の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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