Zum Hauptinhalt springen

ConfigureLegacyAdapterTenantId

Namespace: Meshmakers.Octo.Sdk.Common.Adapters

Binds the legacy Adapter:TenantId configuration key onto AdapterOptions.DedicatedTenantId for one deprecation release (AB#4924, increment 3).

public sealed class ConfigureLegacyAdapterTenantId : IPostConfigureOptions<AdapterOptions>

Inheritance Object → ConfigureLegacyAdapterTenantId
Implements IPostConfigureOptions<AdapterOptions>

Remarks:

🔴 Without this, renaming the property would have silently un-configured the entire adapter fleet.OCTO_ADAPTER__TENANTID is set by eight Helm charts (octo-mesh-adapter, octo-loxone-adapter, octo-plug-simulation, octo-weclapp-adapter, octo-modbus-plug, octo-modbus-socket, octo-finapi-adapter, octo-eda-adapter). The options binder ignores a key with no matching property without complaint, so every one of those adapters would have fallen back to the "meshTest" default and connected on the wrong tenant route — a failure that reports nothing at startup and only surfaces as a 403 on the hub, or worse, as a successful connection to a tenant that happens to exist.

The new key OCTO_ADAPTER__DEDICATEDTENANTID wins when both are set. Remove this type once every chart in the estate has been moved to the new key; the warning below is what tells you which ones have not.

Constructors​

ConfigureLegacyAdapterTenantId(IConfiguration, ILogger<ConfigureLegacyAdapterTenantId>)​

Creates a new instance of ConfigureLegacyAdapterTenantId.

public ConfigureLegacyAdapterTenantId(IConfiguration configuration, ILogger<ConfigureLegacyAdapterTenantId> logger)

Parameters​

configuration IConfiguration

logger ILogger<ConfigureLegacyAdapterTenantId>

Methods​

PostConfigure(String, AdapterOptions)​

public void PostConfigure(string name, AdapterOptions options)

Parameters​

name String

options AdapterOptions