Feature 57 (config and provisioning): release mesh-controller, the reviewed release branch merged with main, on top of main
This commit is contained in:
@@ -77,6 +77,9 @@ type sendable struct {
|
||||
// unplaced is every contribution its holder's template could not render, naming its module and
|
||||
// why (novox/hq ADR 0255): left out of this declaration, for push and plan to say, never on the wire.
|
||||
unplaced []string
|
||||
// handedOnly is each file left out because only the provisioner's client fills it and the module is not handed
|
||||
// here (a provider's consumers file, ADR 0373).
|
||||
handedOnly []string
|
||||
// Builds is the build of each module this declaration carries — module to the commit its build
|
||||
// was made from — recorded with the send and never on the wire (novox/hq issue 259, ADR 0221).
|
||||
// Composed only on the send path; nil records that it is not known.
|
||||
@@ -84,6 +87,16 @@ type sendable struct {
|
||||
// Bindings is where each consumer of a provision that keeps its data is bound in this declaration
|
||||
// (novox/hq ADR 0232), recorded with the send and never on the wire. Composed only on the send path.
|
||||
Bindings []inventory.Binding
|
||||
// Filled is the path of every file this declaration hands to the provisioner, and Provisioner the account the
|
||||
// client that fills them runs as (novox/hq ADR 0349 §4, §5, design 57 P6): on the wire as `filled_files` and
|
||||
// `provisioner_account`, both absent when nothing is handed, so every other declaration is byte for byte what
|
||||
// it was. plans is each handed module's plan, kept with the send for the assignments mirror; never on the wire.
|
||||
Filled []string
|
||||
Provisioner string
|
||||
plans map[string]catalogue.Plan
|
||||
// requiredBy is, for each handed module only pulled in by another, the module that requires it (issue 765): kept
|
||||
// beside its plan, so the assignments mirror gives the plan a value of its own. Never on the wire.
|
||||
requiredBy map[string]string
|
||||
}
|
||||
|
||||
// adoptionEnvelope is what an adopted node is told about its mode. Taken is every module taken on
|
||||
@@ -113,6 +126,10 @@ func (s sendable) Body() ([]byte, error) {
|
||||
if s.Generation > 0 {
|
||||
envelope["generation"] = s.Generation
|
||||
}
|
||||
if len(s.Filled) > 0 {
|
||||
envelope["filled_files"] = s.Filled
|
||||
envelope["provisioner_account"] = s.Provisioner
|
||||
}
|
||||
// An empty declaration is deliberate here — the node owns nothing the mesh put there
|
||||
// (novox/hq issue 127) — and the host refuses an empty body unless it is told the emptiness
|
||||
// is meant, so a truncated or mis-composed body is never mistaken for "own nothing".
|
||||
|
||||
Reference in New Issue
Block a user