fix(interledger-app): added PTI env variables for protea#411
Conversation
Automated chart versioning after merge of PR #411. This PR updates Chart.yaml versions, packages updated charts into docs/interledger, and regenerates the Helm index. Co-authored-by: bosbaber <1615407+bosbaber@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds PTI (FIANT) configuration to the interledger-app/frontend Helm chart so the Protea frontend can be configured via ConfigMap-driven environment variables.
Changes:
- Introduces
config.ptivalues (client_id,sdk_url,forms_url) in the frontend chart defaults. - Exposes PTI settings via new ConfigMap keys:
PTI_CLIENT_ID,PTI_SDK_URL,PTI_FORMS_URL. - Adds helm-unittest assertions to validate PTI keys appear in the rendered ConfigMap.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| charts/interledger-app/frontend/values.yaml | Adds config.pti defaults and maps them into the server ConfigMap content map. |
| charts/interledger-app/frontend/tests/deployment_configmap_test.yaml | Adds helm-unittest cases asserting PTI ConfigMap keys are rendered. |
| # PTI widget script URL override; defaults to staging endpoint. | ||
| sdk_url: "https://sdk.staging.fiant.io/latest/index.js" | ||
| # PTI widget forms host URL override; defaults to staging endpoint. |
There was a problem hiding this comment.
The comments for sdk_url / forms_url say these are "URL override; defaults to staging endpoint", but the values here are actually setting the chart defaults to the staging URLs. Consider rewording to avoid implying a different default (e.g., describe them as the default staging endpoints and that they can be overridden via values).
| # PTI widget script URL override; defaults to staging endpoint. | |
| sdk_url: "https://sdk.staging.fiant.io/latest/index.js" | |
| # PTI widget forms host URL override; defaults to staging endpoint. | |
| # Default PTI widget script URL (staging endpoint); can be overridden via values. | |
| sdk_url: "https://sdk.staging.fiant.io/latest/index.js" | |
| # Default PTI widget forms host URL (staging endpoint); can be overridden via values. |
| sdk_url: "https://sdk.staging.fiant.io/latest/index.js" | ||
| asserts: | ||
| - equal: | ||
| path: data.PTI_SDK_URL | ||
| value: "https://sdk.staging.fiant.io/latest/index.js" | ||
| - it: 'should contain PTI_FORMS_URL in data' | ||
| set: | ||
| config: | ||
| pti: | ||
| forms_url: "https://forms.staging.fiant.io" | ||
| asserts: | ||
| - equal: | ||
| path: data.PTI_FORMS_URL | ||
| value: "https://forms.staging.fiant.io" |
There was a problem hiding this comment.
The new helm-unittest cases for PTI_SDK_URL and PTI_FORMS_URL set the values to the same URLs already defined as defaults in values.yaml, so the tests won't catch a broken/ignored override path. Use non-default values in set: (and assert those) to ensure overriding via config.pti.* is actually wired correctly.
| sdk_url: "https://sdk.staging.fiant.io/latest/index.js" | |
| asserts: | |
| - equal: | |
| path: data.PTI_SDK_URL | |
| value: "https://sdk.staging.fiant.io/latest/index.js" | |
| - it: 'should contain PTI_FORMS_URL in data' | |
| set: | |
| config: | |
| pti: | |
| forms_url: "https://forms.staging.fiant.io" | |
| asserts: | |
| - equal: | |
| path: data.PTI_FORMS_URL | |
| value: "https://forms.staging.fiant.io" | |
| sdk_url: "https://sdk.custom.example/latest/index.js" | |
| asserts: | |
| - equal: | |
| path: data.PTI_SDK_URL | |
| value: "https://sdk.custom.example/latest/index.js" | |
| - it: 'should contain PTI_FORMS_URL in data' | |
| set: | |
| config: | |
| pti: | |
| forms_url: "https://forms.custom.example" | |
| asserts: | |
| - equal: | |
| path: data.PTI_FORMS_URL | |
| value: "https://forms.custom.example" |
No description provided.