Skip to content

Commit

Permalink
Added env var page (argoproj-labs#864)
Browse files Browse the repository at this point in the history
Signed-off-by: Yi Cai <[email protected]>
  • Loading branch information
ciiay authored Mar 22, 2023
1 parent d34fa1f commit 78520b8
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 16 deletions.
16 changes: 0 additions & 16 deletions docs/usage/custom_roles.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,4 @@ spec:
value: custom-controller-role
- name: SERVER_CLUSTER_ROLE
value: custom-server-role
```
When an Argo CD instance is deleted, namespaces managed by that instance (via the `argocd.argoproj.io/managed-by` label ) will retain the label by default. Users can change this behavior by setting the environment variable `REMOVE_MANAGED_BY_LABEL_ON_ARGOCD_DELETION` to `true` in the Subscription.

```yaml
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: argocd-operator
namespace: argocd
spec:
config:
env:
- name: REMOVE_MANAGED_BY_LABEL_ON_ARGOCD_DELETION
value: "true"
```
39 changes: 39 additions & 0 deletions docs/usage/environment_variables.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Environment Variables

The following environment variables are available in `argocd-operator`:

| Environment Variable | Default Value | Description |
| --- | --- | --- |
| `CONTROLLER_CLUSTER_ROLE` | none | Administrators can configure a common cluster role for all the managed namespaces in role bindings for the Argo CD application controller with this environment variable. Note: If this environment variable contains custom roles, the Operator doesn't create the default admin role. Instead, it uses the existing custom role for all managed namespaces. |
| `SERVER_CLUSTER_ROLE` | none | Administrators can configure a common cluster role for all the managed namespaces in role bindings for the Argo CD server with this environment variable. Note: If this environment variable contains custom roles, the Operator doesn’t create the default admin role. Instead, it uses the existing custom role for all managed namespaces. |
| `REMOVE_MANAGED_BY_LABEL_ON_ARGOCD_DELETION` | false | When an Argo CD instance is deleted, namespaces managed by that instance (via the `argocd.argoproj.io/managed-by` label ) will retain the label by default. Users can change this behavior by setting the environment variable `REMOVE_MANAGED_BY_LABEL_ON_ARGOCD_DELETION` to `true` in the Subscription. |

Custom Environment Variables are supported in `applicationSet`, `controller`, `notifications`, `repo` and `server` components. For example:

```
...
kind: ArgoCD
metadata:
name: argocd
labels:
example: controller
spec:
controller:
resources: {}
env:
- name: FOO
value: bar
...
```

The following default value of images could be overridden by setting the environment variables:
| Environment Variable | Default Value |
| --- | --- |
| `ARGOCD_IMAGE` | [quay.io/argoproj/argocd](quay.io/argoproj/argocd) |
| `ARGOCD_REPOSERVER_IMAGE` | [quay.io/argoproj/argocd](quay.io/argoproj/argocd) |
| `ARGOCD_DEX_IMAGE` | [ghcr.io/dexidp/dex](ghcr.io/dexidp/dex) |
| `ARGOCD_KEYCLOAK_IMAGE` | [quay.io/keycloak/keycloak](quay.io/keycloak/keycloak) |
| `ARGOCD_REDIS_IMAGE` | redis |
| `ARGOCD_REDIS_HA_IMAGE` | redis |
| `ARGOCD_REDIS_HA_PROXY_IMAGE` | haproxy |
| `ARGOCD_GRAFANA_IMAGE` | grafana/grafana |

0 comments on commit 78520b8

Please sign in to comment.