RemoveOrphanedConfigMaps doesn't verify object UID
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 62/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- go, kubernetes
- Ambito
- infrastructure
Direzione di ricerca
Start at the finalize.RemoveOrphanedConfigMaps call in internal/controller/operator/factory/vmalert/vmalert.go around line 188, then read that helper to see how owner references are compared during ConfigMap cleanup. The fix is to require the live owner's UID, not just API version/kind/name, before deleting; add or extend tests covering a same-name foreign or stale ConfigMap. Run the package's Go tests to confirm orphan cleanup still removes true orphans.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
P2: This cleanup trusts only the owner reference's API version, kind, and name, not its UID. A stale or foreign ConfigMap with a same-name VMAlert owner reference can therefore be deleted; require the current owner's UID before enabling deletion here.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At internal/controller/operator/factory/vmalert/vmalert.go, line 188:
<comment>This cleanup trusts only the owner reference's API version, kind, and name, not its UID. A stale or foreign ConfigMap with a same-name VMAlert owner reference can therefore be deleted; require the current owner's UID before enabling deletion here.</comment>
<file context>
@@ -182,7 +182,13 @@ func CreateOrUpdate(ctx context.Context, cr *vmv1beta1.VMAlert, rclient client.C
+ if err := reconcile.Deployment(ctx, rclient, newDeploy, prevDeploy, &owner, nil); err != nil {
+ return err
+ }
+ if err := finalize.RemoveOrphanedConfigMaps(ctx, rclient, cr, sets.New(cmNames...), true); err != nil {
+ return fmt.Errorf("cannot remove rule configmaps: %w", err)
+ }
</file context>
Originally posted by @cubic-dev-ai[bot] in https://github.com/VictoriaMetrics/operator/pull/2844#discussion_r4642778933
- Lingua principale
- Go
- Stelle
- 603
- Fork
- 242
- Merge medio
- 1g 14h
- PR unite (30g)
- 57
Preparare l'ambiente
- 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 VictoriaMetrics/operator
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
VictoriaMetrics/operator#2854 ·
I maintainer di solito rispondono entro 1 giorno
-
VLAgent `spec.k8sCollector.includePodLabels: false` has no effectForse già presa @Haleygo l’ha presa 25 giorni fa. Apertabug waiting for release
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
VictoriaMetrics/operator#2772 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Bug: VMRule `spec.groups[].tenant` should accept an integer, not only a stringForse già presa @megative l’ha presa 40 giorni fa. Apertaenhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
VictoriaMetrics/operator#2608 · 5 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
VMAlert datasource bearer token isn't documentedForse di nuovo libera @Haleygo l’ha presa 35 giorni fa e non c’è nessuna pull request aperta. Apertadocs
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
VictoriaMetrics/operator#2365 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
vmuser: add support for src_headers_match_all and src_query_args_match_all new config options.Apertaenhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
VictoriaMetrics/operator#2838 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di VictoriaMetrics/operator
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
slavakurilyak/awesome-ai-agents#1026 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
GetBatchResponseById panics for items without a body (204/302) and for unknown idsForse già presa @0z5a l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
JuliusBrussee/caveman#1567 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100