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: added deep links doc #11888

Merged
merged 7 commits into from
Jan 10, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

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

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

The following changes are required to configure a new plugin:

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

:::yaml
Expand Down Expand Up @@ -246,7 +246,7 @@ volumes:
Plugin commands have access to

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

```yaml
Expand Down
2 changes: 1 addition & 1 deletion docs/operator-manual/custom_tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ other than what Argo CD bundles. Some reasons to do this might be:
* To upgrade/downgrade to a specific version of a tool due to bugs or bug fixes.
* To install additional dependencies to be used by kustomize's configmap/secret generators.
(e.g. curl, vault, gpg, AWS CLI)
* To install a [config management plugin](../user-guide/config-management-plugins.md).
* To install a [config management plugin](config-management-plugins.md).

As the Argo CD repo-server is the single service responsible for generating Kubernetes manifests, it
can be customized to use alternative toolchain required by your environment.
Expand Down
57 changes: 57 additions & 0 deletions docs/operator-manual/deep_links.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Deep Links

Deep links allow users to quickly redirect to third-party systems, such as Splunk, Datadog, etc. from the Argo CD
user interface.

Argo CD administrator will be able to configure links to third-party systems by providing
deep link templates configured in `argocd-cm`. The templates can be conditionally rendered and are able
to reference different types of resources relating to where the links show up, this includes projects, applications,
or individual resources (pods, services, etc.).

## Configuring Deep Links

The configuration for Deep Links is present in `argocd-cm` as `<location>.links` fields where
`<location>` determines where it will be displayed. The possible values for `<location>` are :
- `project` : all links under this field will show up in the project tab in the Argo CD UI
- `application` : all links under this field will show up in the application summary tab
- `resource` : all links under this field will show up in the resource (deployments, pods, services, etc.) summary tab

Each link in the list has five subfields :
1. `title` : title/tag that will be displayed in the UI corresponding to that link
2. `url` : the actual URL where the deep link will redirect to, this field can be templated to use data from the
corresponing application, project or resource objects (depending on where it is located). This uses [text/template](pkg.go.dev/text/template) pkg for templating
3. `description` (optional) : a description for what the deep link is about
4. `icon.class` (optional) : a font-awesome icon class to be used when displaying the links in dropdown menus
5. `if` (optional) : a conditional statement that results in either `true` or `false`, it also has access to the same
data as the `url` field. If the condition resolves to `true` the deep link will be displayed - else it will be hidden. If
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


An example `argocd-cm.yaml` file with deep links and their variations :

```yaml
# sample project level links
project.links: |
- url: https://myaudit-system.com?project={{.metadata.name}}
title: Audit
description: system audit logs
icon.class: "fa-book"
# sample application level links
application.links: |
# pkg.go.dev/text/template is used for evaluating url templates
- url: https://mycompany.splunk.com?search={{.spec.destination.namespace}}
title: Splunk
# conditionally show link e.g. for specific project
# github.com/antonmedv/expr is used for evaluation of conditions
- url: https://mycompany.splunk.com?search={{.spec.destination.namespace}}
gdsoumya marked this conversation as resolved.
Show resolved Hide resolved
title: Splunk
if: spec.project == "default"
- url: https://{{.metadata.annotations.splunkhost}}?search={{.spec.destination.namespace}}
title: Splunk
if: metadata.annotations.splunkhost
# sample resource level links
resource.links: |
- url: https://mycompany.splunk.com?search={{.metadata.namespace}}
crenshaw-dev marked this conversation as resolved.
Show resolved Hide resolved
title: Splunk
if: kind == "Pod" || kind == "Deployment"
```
2 changes: 1 addition & 1 deletion docs/operator-manual/upgrading/2.2-2.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ data:

## Removed Python from the base image

If you are using a [Config Management Plugin](../../user-guide/config-management-plugins.md) that relies on Python, you
If you are using a [Config Management Plugin](../config-management-plugins.md) that relies on Python, you
will need to build a custom image on the Argo CD base to install Python.

## Upgraded Kustomize Version
Expand Down
2 changes: 1 addition & 1 deletion docs/operator-manual/upgrading/2.3-2.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ that uses the Service Account for auth), be sure to test before deploying the 2.

### Remove the shared volume from any sidecar plugins

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

If you have one or more sidecar plugins enabled, replace the /tmp volume mount for each sidecar to use a volume specific
Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/application_sources.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Argo CD supports several different ways in which Kubernetes manifests can be def
* [Kustomize](kustomize.md) applications
* [Helm](helm.md) charts
* A directory of YAML/JSON/Jsonnet manifests, including [Jsonnet](jsonnet.md).
* Any [custom config management tool](config-management-plugins.md) configured as a config management plugin
* Any [custom config management tool](../operator-manual/config-management-plugins.md) configured as a config management plugin

## Development
Argo CD also supports uploading local manifests directly. Since this is an anti-pattern of the
Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/build-environment.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Build Environment

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

| Variable | Description |
| ----------------------------------- | ----------------------------------------------------------------------- |
Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/kustomize.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ argocd app set <appName> --kustomize-version v3.5.4

## Build Environment

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.
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.

## Kustomizing Helm charts

Expand Down
3 changes: 2 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ nav:
- operator-manual/custom-styles.md
- operator-manual/metrics.md
- operator-manual/web_based_terminal.md
- operator-manual/config-management-plugins.md
- operator-manual/deep_links.md
- Notification:
- Overview: operator-manual/notifications/index.md
- operator-manual/notifications/triggers.md
Expand Down Expand Up @@ -132,7 +134,6 @@ nav:
- user-guide/import.md
- user-guide/jsonnet.md
- user-guide/directory.md
- user-guide/config-management-plugins.md
- user-guide/tool_detection.md
- user-guide/projects.md
- user-guide/private-repositories.md
Expand Down