Repository navigation
feat(adapter-service): single and multi deployment modes on role network (#55, #66) - #87
kelvinprabhu wants to merge 10 commits into
Conversation
…ork (#55, #66) Role network now reads networkAdapterDeploymentMode (single | multi, default single). In single it runs the consumer, network and provider tiers as four modules of one adapter (/<action>, /publish, /_internal/network/, /_internal/provider/) on port 9201; in multi it is the network tier alone and provider and consumer run one release each. provider and consumer ignore the value; any other value fails the render. - No new role and no new namespace: both modes release network-adapter into namespace network-adapter, so switching modes upgrades it in place. - Single mode: config/network-adapter-config.yaml, routing generated at render time from config/routing-*.yaml with tier hops on localhost:<targetPort>/_internal/<tier>, one identity per tier from networkAdapterLayer.keys, and render guards (private keys, http.port vs targetPort, ingress path shape). - startupProbe, renamed liveness/readiness probe keys, PDB, topology spread and graceful shutdown settings; unused helpers removed. - examples/network-adapter.yaml (single) and examples/network.yaml (multi); CI values for both. - openbao-secrets: consumer-adapter-keys, provider-adapter-keys and provider-upstream also mirror into network-adapter for single mode. - docs/adr: ADR-0001 records the decision; ADR template and index. BREAKING: a role network release without networkAdapterDeploymentMode: multi becomes single on upgrade (the render fails until networkAdapterLayer.keys are set). The probes.* values keys are renamed. See charts/adapter-service/CHANGELOG.md (0.6.0).
…templates (#55, #66) - networkAdapterDeploymentMode is set only in values.yaml; examples and CI values no longer set it (multi installs pass --set ...=multi). ci/lint-values.yaml renders role provider. - Drop topologySpreadConstraints, terminationGracePeriodSeconds, preStopSleepSeconds and goMemLimit, and the scaling/PDB extras in the single-mode example and CI values. - Rename isNetworkAdapterLayer to singleMode; each template computes it once. - Chart description is one line; NOTES single-mode text cut down. - Restore the helpers removed earlier in _helpers.tpl.
…ults (#55, #66) - adapter-service.deploymentMode is the only mode helper: the configured mode for role network, multi for provider and consumer. singleMode is removed. - networkAdapterLayer becomes networkTierKeys, defaulting to the Secret names openbao-secrets creates; the example and CI values no longer list them. - Helpers renamed without "layer": tierSecret, checkTierKeys, singleRouting. - ci/lint-values.yaml restored as on development; it renders single mode.
, #66) tierSecret, checkTierKeys and singleRouting become networkTierSecret, networkCheckTierKeys and networkSingleRouting.
- charts/adapter-service/SETUP.md: guidelines, then single and multi steps (Secrets, install, check), the openbao-secrets changes multi needs, switching, and a symptom table. Steps verified on k3d. - charts/adapter-service/README.md rewritten short: roles, modes, the three values the render really requires, the identity Secret, key rotation; install steps live in SETUP.md. - quick-start/README.md: "Two modes" rewritten as guidelines; single-mode log checks; publish example on 9201 (multi: 9200). - CHANGELOG and ADR-0001 follow #87 and #88: networkTierKeys with default Secret names, lint-values back to role network, the single template is an exact copy of the tier modules.
…es (#55, #66) In single mode the chart adds networkTierKeys.upstreamSecret (default provider-upstream) to envFrom itself, so examples/network.yaml serves both modes and switching is only: --set networkAdapterDeploymentMode=single|multi - templates/deployment.yaml: append the upstream Secret to envFrom in single mode. - values.yaml: networkTierKeys.upstreamSecret. - examples/network-adapter.yaml removed; its single render is identical to examples/network.yaml with the default mode. Refs: #55, #66, OpenAgriNet/network-adapter#55, OpenAgriNet/engineering-tracker#171
|
@manjudr a naming mismatch on What: the provider's upstream credentials Secret has two names.
So a standalone provider release from the example waits on a Secret that never appears (pod stuck in Why: history, not design.
In this PR: single mode loads Options:
Which do you prefer? |
|
|
||
| # Single mode only: one key Secret per tier (six keys each, as under keys.existingSecret), | ||
| # named as openbao-secrets creates them. routing.config and handler.* are unused. | ||
| networkTierKeys: |
There was a problem hiding this comment.
rename
networkTierKeys: to adaptorKeys
| # Single mode only: one key Secret per tier (six keys each, as under keys.existingSecret), | ||
| # named as openbao-secrets creates them. routing.config and handler.* are unused. | ||
| networkTierKeys: | ||
| consumer: consumer-adapter-keys |
There was a problem hiding this comment.
consumer to consumer-adaptor consistent naming across .. even for network and provider
| @@ -1,11 +1,13 @@ | |||
| # =========================================================================== | |||
| # network role -- the network layer of the Beckn network. | |||
| # network role. networkAdapterDeploymentMode decides: single (default) runs all | |||
| # three tiers; multi runs the network tier alone. | |||
| # | |||
There was a problem hiding this comment.
can we make the role as network-adaptor consistence across all | check any breakage and tell how many files that may need to change
There was a problem hiding this comment.
its not only here have change for consumer and provider as well
There was a problem hiding this comment.
mode switch change as suggested across all
| # A multi network release must set multi. provider and consumer ignore it. | ||
| networkAdapterDeploymentMode: single |
There was a problem hiding this comment.
make it as only DeploymentMode:
and change the mode naming single to single-adaptor || multi-adaptor
| modules: | ||
| # consumer: unsigned app calls at / (the catch-all mount, on purpose: see ADR-0001); | ||
| # discover to /_internal/network, transactions to /_internal/provider. | ||
| - name: consumer |
There was a problem hiding this comment.
make as consumer adaptor
There was a problem hiding this comment.
make a two sub folders named /multi-adaptor and single adaptor and keep the code there
…folders (#55, #66) Addresses review 5627183696: - Roles are consumer-adapter, network-adapter and provider-adapter. The old names consumer, network and provider are still accepted and render the same. - networkAdapterDeploymentMode becomes deploymentMode: single-adapter (default) | multi-adapter. - networkTierKeys becomes adapterKeys, keyed consumer-adapter, network-adapter, provider-adapter (plus upstreamSecret, extraSubstitutions). - Single config modules: consumer-adapter, network-adapter, oanProvider, oanProviderPublish (the names the multi configs already use). - Configs move to config/single-adapter/ and config/multi-adapter/. - Examples and CI values use the new role names. Multi, standalone consumer/provider and otel CI renders are unchanged; single differs only in module names and comment text. Refs: #55, #66, OpenAgriNet/network-adapter#55, OpenAgriNet/engineering-tracker#171
…#55, #66) Follows the #87 and #88 review fixes: - Roles consumer-adapter / network-adapter / provider-adapter (old names still work), deploymentMode single-adapter | multi-adapter, adapterKeys. - Chart configs under config/single-adapter/ and config/multi-adapter/; quick-start templates under config/adapters/single-adapter/ and multi-adapter/. - Module names consumer-adapter, network-adapter, oanProvider, oanProviderPublish. - quick-start: make up / make up-core, MODE=multi for multi. Refs: #55, #66, OpenAgriNet/network-adapter#55, OpenAgriNet/engineering-tracker#171
…66) The previous commit (edf15db) pushed only the moves into config/single-adapter/ and config/multi-adapter/. This adds the template, values, example and CI changes it describes, so the chart renders again. Refs: #55, #66, OpenAgriNet/network-adapter#55, OpenAgriNet/engineering-tracker#171
|
Review 5627183696 addressed in edf15db + cacb5c9 (docs in #89, 2a82193).
Checks:
Refs #55 #66 · OpenAgriNet/network-adapter#55 · OpenAgriNet/engineering-tracker#171 |
…#66) Addresses review 5627785485: examples/consumer.yaml, network.yaml and provider.yaml become consumer-adapter.yaml, network-adapter.yaml and provider-adapter.yaml, matching the role names. Example headers and values.yaml comments follow. Refs: #55, #66, OpenAgriNet/network-adapter#55, OpenAgriNet/engineering-tracker#171
#66) - SETUP.md, README and the 0.6.0 CHANGELOG use examples/consumer-adapter.yaml, network-adapter.yaml and provider-adapter.yaml (#87). - quick-start README: routing files live in config/adapters/multi-adapter/ and single-adapter/ (#88). Refs: #55, #66, OpenAgriNet/network-adapter#55, OpenAgriNet/engineering-tracker#171
kelvinprabhu
left a comment
There was a problem hiding this comment.
@manjudr made changes as per the demo review comments and verified
…nt fixes (#55, #66) From the code review: - Single-adapter ingress refuses any snippet, rewrite or regex annotation (e.g. configuration-snippet, server-snippet, another controller's rewrite-target), not only nginx use-regex and rewrite-target; any of them can route a request onto /_internal or /publish. - network-adapter-config.yaml: the Vistaar token URL comment names adapterKeys.extraSubstitutions (was the old networkAdapterLayer key). - values.yaml: otel.serviceName comment says only the uncalled otelServiceName helper reads it. Refs: #55, #66, OpenAgriNet/network-adapter#55, OpenAgriNet/engineering-tracker#171
Closes #55 · Refs #66, OpenAgriNet/network-adapter#55 · Parent: OpenAgriNet/engineering-tracker#171
Objective
Run the network adapter as one release by default, without a new role or namespace.
Solution
networkAdapterDeploymentMode(singledefault |multi), read only by rolenetwork.--set networkAdapterDeploymentMode=multi.networkTierKeys, defaulting to the openbao-secrets Secret names.Split from #75: docker compose in #88, docs and setup guide in #89 (merge with or after this PR).