Skip to content

Commit

Permalink
docs: Add JS vars documentation (#63)
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
  • Loading branch information
leoluz authored Nov 19, 2024
1 parent 2deaefb commit b95520c
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@ spec:
value: https://github.com/argoproj-labs/argocd-ephemeral-access/releases/download/v0.1.0/extension.tar.gz
- name: EXTENSION_CHECKSUM_URL
value: https://github.com/argoproj-labs/argocd-ephemeral-access/releases/download/v0.1.0/extension_checksums.txt
- name: EXTENSION_JS_VARS
value: |
{
"EPHEMERAL_ACCESS_LABEL_KEY": "some-label/is-production",
"EPHEMERAL_ACCESS_LABEL_VALUE": "true",
"EPHEMERAL_ACCESS_MAIN_BANNER": "All production changes require an associated change request. Click the REQUEST ACCESS button above to automatically create a change request associated with your user",
"EPHEMERAL_ACCESS_MAIN_BANNER_ADDITIONAL_INFO_LINK": "https://link-to-some-documentation.com",
"EPHEMERAL_ACCESS_DEFAULT_ROLE": "devops"
}
volumeMounts:
- name: extensions
mountPath: /tmp/extensions/
Expand All @@ -101,6 +110,22 @@ spec:
emptyDir: {}
```
> [!NOTE]
> The `EXTENSION_JS_VARS` is an special variable. It contains the UI
> extension configurations. If provided, the
> `argocd-extension-installer` will automatically create the js file
> to expose the provided values to the UI extension. The following
> table describes the js variables accepted by the EphemeralAccess UI
> extension:

| Name | Description | Required | Default |
| --------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -------- | ------- |
| `EPHEMERAL_ACCESS_DEFAULT_ROLE` | Defines the RoleName to be associated with users once the AccessRequest is created | Yes | - |
| `EPHEMERAL_ACCESS_LABEL_KEY` | If provided, it will only enable the UI extension if the Argo CD Application has this label key | No | - |
| `EPHEMERAL_ACCESS_LABEL_VALUE` | If provided, it will only enable the UI extension if the Argo CD Application has this label value | No | - |
| `EPHEMERAL_ACCESS_MAIN_BANNER` | A text with the brief description to instruct users about how the extension works | No | - |
| `EPHEMERAL_ACCESS_MAIN_BANNER_ADDITIONAL_INFO_LINK` | An additional link to provide users with more detailed documentation | No | - |

### Enabling the EphemeralAccess extension in Argo CD

Argo CD needs to have the proxy extension feature enabled for the
Expand Down

0 comments on commit b95520c

Please sign in to comment.