Kubeconfig per invocation
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start by tracing how krane invokes kubectl and selects the kubeconfig context; the issue specifically discusses repeated kubectl get loads and per-invocation kubeconfig data. Confirm the behavior and performance impact, then define completion as each invocation using only its required cluster, context, and user without changing deployment behavior.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Idea
It's necessarily true that each invocation of our tool only needs one of the clusters/contexts/users in the kubeconfig. If we constructed a tempfile containing only the information we actually need we could eliminate the sharing of this dependency between invocations (which is aesthetically nice--we don't mutate it of course!), guarantee we could only be using the right context, and reduce the size of the file kubectl repeatedly loads (see below).
For performance?
tl;dr Unlikely to help Shopify, unsure if it would help others
Last year, I did a bit of performance work on this gem using a watch command I didn't end up merging. One thing I found out was that kubectl get itself was a major contributor to sync cycle slowness at the time. I also discovered that kubectl versions < 1.14 have a bug where the kubeconfig is loaded repeatedly, which reported has severe performance implications if the file is large and/or the cluster has large numbers of resources. The maintainers refused to backport the fix. The number of times it is reloaded apparently scales up with the number of resources being retrieved, which we can't do much about. However, reducing the file size also helps, according the the bug report, and we do have control over that.
I believe I confirmed that we were affected at the time, but it was a long time ago and fell off my mental radar until recently. Today, on a Shipit instance (because a comment on the bug report suggests it may only affect linux), I did a get pods targeting one of our most populated clusters, and it only loaded the kubeconfig 4 times. So no quick win for us after all. It might still help others though.
- Lingua principale
- Ruby
- Stelle
- 1.4k
- Fork
- 119
- Merge medio
- 1h 7m
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né 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 Shopify/krane
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
-
:sparkles: enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
-
:sparkles: enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
Tutte le issue di Shopify/krane
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
hanami/hanami-action#536 ·
-
[2026-11] Latest release (2026-11) still has expanded list entries that are no longer supportedAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Shopify/product-taxonomy#1054 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 13 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
docker/model-runner#1118 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
TarteelAI/quranic-universal-library#1111 ·
I maintainer di solito rispondono entro 1 giorno