Tell the resolver the machines, not the names the mesh merely serves
The map the control plane hands a resolution holds both: the machines, and every name the mesh was told to route to whichever machine serves it. A container's hosts wants all of it, so a routed name resolves to the proxy. A resolver's zones want only the machines: told the mesh's suffix is its own it answers authoritatively for everything under it and forwards none of it, so a routed name with the suffix appended — drive.example.test.internal — is a name nobody will ever ask for, standing beside the machines and looking as real. Found composing the resolver's first assignment on a live machine, before pushing it. hq issue 111.
This commit is contained in:
@@ -114,6 +114,14 @@ type Rendering struct {
|
||||
// because which machines exist is a fact about the mesh.
|
||||
Names map[string]string
|
||||
|
||||
// Machines is only the machines, by the same internal name — the subset of Names that is a
|
||||
// node of this mesh rather than a name it was told to serve. Both matter and they are not the
|
||||
// same set: a container's hosts wants every name, so a routed name resolves to the proxy that
|
||||
// serves it, while a resolver told the mesh's suffix is authoritative for it answers from what
|
||||
// it is given and forwards nothing — so a routed name written there is a name nobody asks for,
|
||||
// standing beside the machines and looking as real as they do.
|
||||
Machines map[string]string
|
||||
|
||||
Settings SettingsBy
|
||||
Generators map[string]Generator
|
||||
// Grants are the credentials this node must create, for the provisions it offers. Passed in
|
||||
@@ -604,7 +612,7 @@ func (r Resolution) compose(with Rendering, owner map[string]string) ([]map[stri
|
||||
// plane's; making a name resolve is the module's software. Emitted as ordinary files under
|
||||
// this module's name, so they are applied, reported and removed exactly as anything else
|
||||
// it declares.
|
||||
given, err := FactsInto(m, r, with.Names, with.Suffix)
|
||||
given, err := FactsInto(m, r, with.Names, with.Machines, with.Suffix)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user