Skip to content

fix: call the real Agmarknet with its token login again - #100

Open
KrutikaPhirangi wants to merge 3 commits into
developmentfrom
fix/agmarknet-token-auth
Open

KrutikaPhirangi wants to merge 3 commits into
developmentfrom
fix/agmarknet-token-auth

Conversation

@KrutikaPhirangi

Copy link
Copy Markdown
Contributor

What

Mandi prices call the real Agmarknet again. agmarknet goes back to authScheme: tokenQuery in both the single-adapter and multi-adapter provider configs, replacing the authScheme: none the in-cluster benchmark mock needed.

  • The token URL is substituted as __AGMARKNET_TOKEN_URL__ from the provider Secret's agmarknetTokenUrl, like the Vistaar token URL. It is a deployment fact, so it is not in the chart.
  • The login is read from AGMARKNET_ACCESS_NAME and AGMARKNET_PASSWORD in the provider tier's environment (provider-upstream).
  • adapter-service is bumped to 0.8.0, with a changelog entry.

Why

Dev should answer mandi prices from the real upstream, not the benchmark's static nginx. With authScheme: none, the adapter sends no token and the real API rejects every call.

Breaking

A release must supply the substitution (adapterKeys.extraSubstitutions in single mode, keys.existingSecret.extraSubstitutions in multi), or the init container stops on the unfilled placeholder:

adapterKeys:
  extraSubstitutions:
    __AGMARKNET_TOKEN_URL__: provider/agmarknetTokenUrl

The registry's agmarknet upstream must also point at the real API, not mock-upstream.

Testing

helm lint passes with all three CI values files. The single-adapter render shows tokenQuery and the init container substitutes __AGMARKNET_TOKEN_URL__ from /keys/provider/agmarknetTokenUrl. Not run on a cluster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant