No way to remove or override nameservers, they can only come from discovery
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 65/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- helm, kubernetes, yaml
- Ambito
- devops
Direzione di ricerca
Read charts/talm/templates/_helpers.tpl:273 and compare how advertisedSubnets is configured in charts/generic/values.yaml and charts/cozystack/values.yaml. Trace where the discovered resolver value is used for both ResolverConfig and the legacy machine.network.nameservers schema. Done means a configured nameservers value replaces discovery in both presets, while an empty value continues to use discovery.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What is wrong?
Both presets take nameservers only from discovery, charts/talm/templates/_helpers.tpl:273:
{{- define "talm.discovered.default_resolvers" }}
{{- with (lookup "resolvers" "" "resolvers") }}
{{- toJson .spec.dnsServers }}
It goes into ResolverConfig on 1.12+ and into machine.network.nameservers on legacy schema. There is no nameservers key in charts/generic/values.yaml or charts/cozystack/values.yaml, so operator cant change it from values at all.
lookup "resolvers" returns effective dns of the node, and effective dns is exactly what previous talm apply wrote there, so every render puts the same nameservers back. Removing them from templates changes nothing.
Override in node body doesn't work too. Talos merges slices by concatenation unless the field has merge:"replace" tag (config/merge/merge.go:24), and nameservers doesn't have it, neither in ResolverConfig nor in v1alpha1. So entries can only be added, never removed. Same mechanics as #77.
In result whatever dns the node had on first apply is pinned in config forever. On dhcp node it bakes dhcp provided servers, or 1.1.1.1 and 8.8.8.8 that talos falls back to when nothing else is set.
Only workaround I found is $patch: delete in node body:
apiVersion: v1alpha1
kind: ResolverConfig
nameservers:
- address: 8.8.8.8
$patch: delete
and it has to stay in node file forever, because discovery will pick up whatever is effective on the next render.
Seen on talos 1.12.6.
How it should work?
nameservers value in both presets, same shape as advertisedSubnets already has: when set it replaces discovery, when empty discovery is used.
- Lingua principale
- Go
- Stelle
- 493
- Fork
- 23
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
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 cozystack/talm
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
TestCommittedTextFilesIgnoresUntrackedArtefacts commits into the real repo when GIT_DIR is setAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 70/100
-
area/apply area/commands area/upgrade kind/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Tutte le issue di cozystack/talm
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Correct local module testing instructions for Go sample contributorsForse già presa @slievrly l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
internal/core: cleanAttachmentName splits a rune at the 255-byte cap and stores invalid UTF-8Forse già presa @pacwestnobody l’ha presa oggi. Apertago good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
Podiom/Podiom#427 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
TestLaunchGolden spends about 98 seconds on fake-agent exit delays under -raceForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
factory:subtask
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
I maintainer di solito rispondono entro 1 giorno