IBlueprintVariableProvider
Namespace: Meshmakers.Octo.Runtime.Contracts.Blueprints
Resolves the set of variables visible to a blueprint when it is applied to a tenant.
Variables are referenced from seed-data attribute values and rtWellKnownName
via the ${name} placeholder syntax, and from the manifest's requires:
block to gate whether a blueprint applies at all.
public interface IBlueprintVariableProvider
Remarks:
The default OctoMesh provider surfaces the following keys per tenant:
octo.version — current OctoMesh release; sourced from
OctoBlueprintVariablesOptions.OctoVersion (typically set by the helm
chart via the OCTO_BLUEPRINTS__OCTOVERSION environment variable).
octo.environment — deployment environment (dev, test,
staging, production); sourced from
OctoBlueprintVariablesOptions.Environment.
octo.environmentMode — same value mapped to the matching
System/EnvironmentModes CK-enum value name (Development,
Testing, Staging, Production) so blueprints can seed a
System/TenantModeConfiguration entity from a single
value: "${octo.environmentMode}" placeholder. Unknown environments
fall back to Development with a warning log so the blueprint apply
still succeeds and operators see the misconfiguration in service logs.
octo.tenantId — the tenant currently being initialised.
octo.systemTenantId — the tenant id treated as system tenant;
sourced from OctoBlueprintVariablesOptions.SystemTenantId.
octo.isSystemTenant — "true" when
tenantId == octo.systemTenantId, otherwise "false".
Services may replace the default registration with a richer implementation if they need to surface service-specific facts (chart names, feature flags, …).
Methods
GetVariablesAsync(String, CancellationToken)
Returns the variable map for the given tenant. Implementations should treat the
call as inexpensive — IBlueprintService resolves variables once per
apply and reuses the result for both requires: evaluation and seed-data
interpolation.
Task<IReadOnlyDictionary<string, string>> GetVariablesAsync(string tenantId, CancellationToken cancellationToken)
Parameters
tenantId String
Target tenant identifier.
cancellationToken CancellationToken
Cancellation token.
Returns
Task<IReadOnlyDictionary<String, String>>
An immutable map of variable name to resolved value.