Skip to content

Commit 2891588

Browse files
gdsoumyaemirot
authored andcommitted
docs: added deep links doc (argoproj#11888)
* docs: added deep links doc Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com> * refactor: resolved review comments Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com> * refactor: moved cmp and deep links doc to operator manual Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com> * feat: add warning for templates Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com> * feat: add note for secret data fields being redacted Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com> Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com> Signed-off-by: emirot <emirot.nolan@gmail.com>
1 parent 82bc1b4 commit 2891588

9 files changed

+74
-10
lines changed

docs/user-guide/config-management-plugins.md docs/operator-manual/config-management-plugins.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ There are two ways to install a Config Management Plugin:
2626
2. Add the plugin as a sidecar to the repo-server Pod.
2727
This is a good option for a more complex plugin that would clutter the Argo CD ConfigMap. A copy of the repository is
2828
sent to the sidecar container as a tarball and processed individually per application, which makes it a good option
29-
for [concurrent processing of monorepos](../operator-manual/high_availability.md#enable-concurrent-processing).
29+
for [concurrent processing of monorepos](high_availability.md#enable-concurrent-processing).
3030

3131
### Option 1: Configure plugins via Argo CD configmap (deprecated)
3232

3333
The following changes are required to configure a new plugin:
3434

3535
1. Make sure required binaries are available in `argocd-repo-server` pod. The binaries can be added via volume mounts or
36-
using a custom image (see [custom_tools](../operator-manual/custom_tools.md) for examples of both).
36+
using a custom image (see [custom_tools](custom_tools.md) for examples of both).
3737
2. Register a new plugin in `argocd-cm` ConfigMap:
3838

3939
:::yaml
@@ -246,7 +246,7 @@ volumes:
246246
Plugin commands have access to
247247

248248
1. The system environment variables (of the repo-server container for argocd-cm plugins or of the sidecar for sidecar plugins)
249-
2. [Standard build environment variables](build-environment.md)
249+
2. [Standard build environment variables](../user-guide/build-environment.md)
250250
3. Variables in the Application spec (References to system and build variables will get interpolated in the variables' values):
251251

252252
```yaml

docs/operator-manual/custom_tools.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ other than what Argo CD bundles. Some reasons to do this might be:
77
* To upgrade/downgrade to a specific version of a tool due to bugs or bug fixes.
88
* To install additional dependencies to be used by kustomize's configmap/secret generators.
99
(e.g. curl, vault, gpg, AWS CLI)
10-
* To install a [config management plugin](../user-guide/config-management-plugins.md).
10+
* To install a [config management plugin](config-management-plugins.md).
1111

1212
As the Argo CD repo-server is the single service responsible for generating Kubernetes manifests, it
1313
can be customized to use alternative toolchain required by your environment.

docs/operator-manual/deep_links.md

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Deep Links
2+
3+
Deep links allow users to quickly redirect to third-party systems, such as Splunk, Datadog, etc. from the Argo CD
4+
user interface.
5+
6+
Argo CD administrator will be able to configure links to third-party systems by providing
7+
deep link templates configured in `argocd-cm`. The templates can be conditionally rendered and are able
8+
to reference different types of resources relating to where the links show up, this includes projects, applications,
9+
or individual resources (pods, services, etc.).
10+
11+
## Configuring Deep Links
12+
13+
The configuration for Deep Links is present in `argocd-cm` as `<location>.links` fields where
14+
`<location>` determines where it will be displayed. The possible values for `<location>` are :
15+
- `project` : all links under this field will show up in the project tab in the Argo CD UI
16+
- `application` : all links under this field will show up in the application summary tab
17+
- `resource` : all links under this field will show up in the resource (deployments, pods, services, etc.) summary tab
18+
19+
Each link in the list has five subfields :
20+
1. `title` : title/tag that will be displayed in the UI corresponding to that link
21+
2. `url` : the actual URL where the deep link will redirect to, this field can be templated to use data from the
22+
corresponing application, project or resource objects (depending on where it is located). This uses [text/template](pkg.go.dev/text/template) pkg for templating
23+
3. `description` (optional) : a description for what the deep link is about
24+
4. `icon.class` (optional) : a font-awesome icon class to be used when displaying the links in dropdown menus
25+
5. `if` (optional) : a conditional statement that results in either `true` or `false`, it also has access to the same
26+
data as the `url` field. If the condition resolves to `true` the deep link will be displayed - else it will be hidden. If
27+
the field is omitted, by default the deep links will be displayed. This uses [antonmedv/expr](https://github.com/antonmedv/expr/tree/master/docs) for evaluating conditions
28+
29+
!!!note
30+
For resources of kind Secret the data fields are redacted but other fields are accessible for templating the deep links.
31+
32+
!!!warning
33+
Make sure to validate the url templates and inputs to prevent data leaks or possible generation of any malicious links.
34+
35+
36+
An example `argocd-cm.yaml` file with deep links and their variations :
37+
38+
```yaml
39+
# sample project level links
40+
project.links: |
41+
- url: https://myaudit-system.com?project={{.metadata.name}}
42+
title: Audit
43+
description: system audit logs
44+
icon.class: "fa-book"
45+
# sample application level links
46+
application.links: |
47+
# pkg.go.dev/text/template is used for evaluating url templates
48+
- url: https://mycompany.splunk.com?search={{.spec.destination.namespace}}
49+
title: Splunk
50+
# conditionally show link e.g. for specific project
51+
# github.com/antonmedv/expr is used for evaluation of conditions
52+
- url: https://mycompany.splunk.com?search={{.spec.destination.namespace}}
53+
title: Splunk
54+
if: spec.project == "default"
55+
- url: https://{{.metadata.annotations.splunkhost}}?search={{.spec.destination.namespace}}
56+
title: Splunk
57+
if: metadata.annotations.splunkhost
58+
# sample resource level links
59+
resource.links: |
60+
- url: https://mycompany.splunk.com?search={{.metadata.namespace}}
61+
title: Splunk
62+
if: kind == "Pod" || kind == "Deployment"
63+
```

docs/operator-manual/upgrading/2.2-2.3.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ data:
3636
3737
## Removed Python from the base image
3838
39-
If you are using a [Config Management Plugin](../../user-guide/config-management-plugins.md) that relies on Python, you
39+
If you are using a [Config Management Plugin](../config-management-plugins.md) that relies on Python, you
4040
will need to build a custom image on the Argo CD base to install Python.
4141
4242
## Upgraded Kustomize Version

docs/operator-manual/upgrading/2.3-2.4.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ that uses the Service Account for auth), be sure to test before deploying the 2.
176176

177177
### Remove the shared volume from any sidecar plugins
178178

179-
As a security enhancement, [sidecar plugins](../../user-guide/config-management-plugins.md#option-2-configure-plugin-via-sidecar)
179+
As a security enhancement, [sidecar plugins](../config-management-plugins.md#option-2-configure-plugin-via-sidecar)
180180
no longer share the /tmp directory with the repo-server.
181181

182182
If you have one or more sidecar plugins enabled, replace the /tmp volume mount for each sidecar to use a volume specific

docs/user-guide/application_sources.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Argo CD supports several different ways in which Kubernetes manifests can be def
77
* [Kustomize](kustomize.md) applications
88
* [Helm](helm.md) charts
99
* A directory of YAML/JSON/Jsonnet manifests, including [Jsonnet](jsonnet.md).
10-
* Any [custom config management tool](config-management-plugins.md) configured as a config management plugin
10+
* Any [custom config management tool](../operator-manual/config-management-plugins.md) configured as a config management plugin
1111

1212
## Development
1313
Argo CD also supports uploading local manifests directly. Since this is an anti-pattern of the

docs/user-guide/build-environment.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Build Environment
22

3-
[Custom tools](config-management-plugins.md), [Helm](helm.md), [Jsonnet](jsonnet.md), and [Kustomize](kustomize.md) support the following build env vars:
3+
[Custom tools](../operator-manual/config-management-plugins.md), [Helm](helm.md), [Jsonnet](jsonnet.md), and [Kustomize](kustomize.md) support the following build env vars:
44

55
| Variable | Description |
66
| ----------------------------------- | ----------------------------------------------------------------------- |

docs/user-guide/kustomize.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ argocd app set <appName> --kustomize-version v3.5.4
8484

8585
## Build Environment
8686

87-
Kustomize apps have access to the [standard build environment](build-environment.md) which can be used in combination with a [config managment plugin](config-management-plugins.md) to alter the rendered manifests.
87+
Kustomize apps have access to the [standard build environment](build-environment.md) which can be used in combination with a [config managment plugin](../operator-manual/config-management-plugins.md) to alter the rendered manifests.
8888

8989
## Kustomizing Helm charts
9090

mkdocs.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ nav:
5050
- operator-manual/custom-styles.md
5151
- operator-manual/metrics.md
5252
- operator-manual/web_based_terminal.md
53+
- operator-manual/config-management-plugins.md
54+
- operator-manual/deep_links.md
5355
- Notification:
5456
- Overview: operator-manual/notifications/index.md
5557
- operator-manual/notifications/triggers.md
@@ -132,7 +134,6 @@ nav:
132134
- user-guide/import.md
133135
- user-guide/jsonnet.md
134136
- user-guide/directory.md
135-
- user-guide/config-management-plugins.md
136137
- user-guide/tool_detection.md
137138
- user-guide/projects.md
138139
- user-guide/private-repositories.md

0 commit comments

Comments
 (0)