Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add JS vars documentation #63

Merged
merged 2 commits into from
Nov 19, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 | - |
leoluz marked this conversation as resolved.
Show resolved Hide resolved

### Enabling the EphemeralAccess extension in Argo CD

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