[Feature] Set RevisionHistoryLimit on the generated Robin Deployment to bound retained ReplicaSets
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 75/100
Direzione di ricerca
L’issue indica la funzione buildDesiredRobinDeployment in internal/controller/redkey_robin.go. Inizia esaminando la costruzione di DeploymentSpec in quel punto. Aggiungi un campo RevisionHistoryLimit impostato a 2, utilizzando una costante con nome. Aggiorna la funzione robinDeploymentNeedsUpdate affinché confronti questo campo per rilevare le discrepanze. Esegui i test unitari esistenti per verificare che venga applicato il valore predefinito e che la riconciliazione rimanga idempotente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
The operator builds the Robin Deployment in buildDesiredRobinDeployment (internal/controller/redkey_robin.go) without setting RevisionHistoryLimit, so Kubernetes applies its default of 10. Each rollout of the Robin Deployment (e.g. a spec.robin.image bump, args or template change) leaves an old, scaled-to-zero ReplicaSet behind, and up to 10 of them accumulate per cluster. For a singleton controller-style Deployment that changes rarely, keeping 10 historical ReplicaSets is unnecessary clutter in etcd and in kubectl get rs.
Proposed solution
Set RevisionHistoryLimit explicitly on the Robin Deployment spec to a small value (2), which still allows an immediate rollback to the previous revision without accumulating a long tail of empty ReplicaSets.
- Default:
RevisionHistoryLimit: 2. - Keep it overridable via
spec.robin.templateif/when that path exposes it (consistent with other defaults).
ProgressDeadlineSeconds was considered and intentionally left out of scope: the default (600s) is fine for a fast-starting single-replica Deployment, and lowering it adds little value. It can be revisited separately if rollout-stall alerting is ever needed.
Acceptance criteria
- The generated Robin Deployment sets
RevisionHistoryLimit: 2. - A user-supplied value via
spec.robin.template(if exposed) overrides the default. - Drift detection (
robinDeploymentNeedsUpdate) accounts forRevisionHistoryLimitso reconciliation stays idempotent (no patch loop). - Unit test asserts the default value is present on the generated Deployment.
Implementation notes
- Add the field in
buildDesiredRobinDeploymentwhere theDeploymentSpecis constructed (internal/controller/redkey_robin.go), alongsideReplicas/Selector/Template. - Use a named constant (e.g.
robinRevisionHistoryLimit int32 = 2) for clarity. - Include the field in the set compared by
robinDeploymentNeedsUpdateso an existing Deployment with the k8s default (10) is reconciled down to 2.
Related
- Same function as the probes (B) and securityContext/resources (C) features — coordinate edits to
buildDesiredRobinDeploymentto avoid conflicts.
- Lingua principale
- Go
- Stelle
- 29
- Fork
- 2
- Merge medio
- 13h 32m
- PR unite (30g)
- 16
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di InditexTech/redkey-operator
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
InditexTech/redkey-operator#124 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] Operator memory usage scales with cluster size instead of with the number of Redkeys (OOMKilled on startup)Forse già presa @albertompe l’ha presa 10 giorni fa. Apertabug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
InditexTech/redkey-operator#122 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 22/100
InditexTech/redkey-operator#120 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 54/100
InditexTech/redkey-operator#111 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
InditexTech/redkey-operator#86 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di InditexTech/redkey-operator
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
coder/openstorage#807 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
coder/coder-logstream-kube#255 · 1 commento ·
-
[FEATURE]: 录入 AIDEV Agent Package v1 接入参考文档Forse già presa Una pull request collegata a questa issue è aperta o già unita. Apertakind/features
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
TencentBlueKing/bk-nodemgr#3991 ·
I maintainer di solito rispondono entro 1 giorno