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: Document how to use persistent storage for repo server #1465

Merged
merged 4 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 7 additions & 0 deletions docs/reference/argocd.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Name | Default | Description
[**Prometheus**](#prometheus-options) | [Object] | Prometheus configuration options.
[**RBAC**](#rbac-options) | [Object] | RBAC configuration options.
[**Redis**](#redis-options) | [Object] | Redis configuration options.
[**Repo**](#repo-options) | [Object] | Repo Server configuration options.
[**ResourceHealthChecks**](#resource-customizations) | [Empty] | Customizes resource health check behavior.
[**ResourceIgnoreDifferences**](#resource-customizations) | [Empty] | Customizes resource ignore difference behavior.
[**ResourceActions**](#resource-customizations) | [Empty] | Customizes resource action behavior.
Expand Down Expand Up @@ -847,6 +848,12 @@ LogFormat | text | The log format to be used by the ArgoCD Repo Server. Valid op
ExecTimeout | 180 | Execution timeout in seconds for rendering tools (e.g. Helm, Kustomize)
Env | [Empty] | Environment to set for the repository server workloads
Replicas | [Empty] | The number of replicas for the ArgoCD Repo Server. Must be greater than or equal to 0.
Volumes | [Empty] | Configure addition volumes for the repo server deployment. This field is optional.
VolumeMounts | [Empty] | Configure addition volume mounts for the repo server deployment. This field is optional.
InitContainers | [Empty] | List of init containers for the repo server deployment. This field is optional.
SidecarContainers | [Empty] | List of sidecar containers for the repo server deployment. This field is optional.
Enabled | true | Flag to enable repo server during ArgoCD installation.
Remote | [Empty] | Specifies the remote URL of the repo server container. By default, it points to a local instance managed by the operator. This field is optional.

### Pass Command Arguments To Repo Server

Expand Down
2 changes: 1 addition & 1 deletion docs/usage/ha.md → docs/usage/ha/redis.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# High Availability
# High Availability for Redis

The Argo CD operator supports high availability through the mechanism described in the Argo CD [documentation][argocd_ha].

Expand Down
53 changes: 53 additions & 0 deletions docs/usage/ha/repo-server.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# High Availability for Repo Server

The Argo CD operator supports scaling up the repo server to ensure high availability. This can be achieved using the mechanism described in the Argo CD [documentation][argocd_repo_scaling].

### Persistent Volumes for Repo Server Storage

> `argocd-repo-server` clones the repository into `/tmp` (or the path specified in the `TMPDIR` env variable). The Pod might run out of disk space if it has too many repositories or if the repositories have a lot of files. To avoid this problem mount a persistent volume.

To mount a Persistent Volume to the Repo Server, add the volume details in the `volumes` and `volumeMounts` fields under `.spec.repo` in the `ArgoCD` custom resource (CR).

!!! important
The Argo CD operator does not create persistent volumes automatically. It is the user's responsibility to create and manage the required Persistent Volume (PV) and Persistent Volume Claim (PVC) resources. Make sure to provision these resources according to your storage needs and environment.

**Examples:**

1) Mount the persistent volume to the default repository storage location, i.e. `/tmp`.
```yaml
apiVersion: argoproj.io/v1beta1
kind: ArgoCD
metadata:
name: argocd-sample
spec:
repo:
svghadi marked this conversation as resolved.
Show resolved Hide resolved
volumes:
- name: repo-storage
persistentVolumeClaim:
claimName: <persistent-volume-claim>
volumeMounts:
- mountPath: /tmp
name: repo-storage
```

2) Mount the persistent volume to a custom repository storage location, e.g. `/manifests`.
```yaml
apiVersion: argoproj.io/v1beta1
kind: ArgoCD
metadata:
name: argocd-sample
spec:
repo:
volumes:
- name: repo-storage
persistentVolumeClaim:
claimName: <persistent-volume-claim>
volumeMounts:
- mountPath: /manifests
name: repo-storage
env:
- name: TMPDIR
value: "/manifests"
```

[argocd_repo_scaling]:https://argo-cd.readthedocs.io/en/stable/operator-manual/high_availability/#scaling-up
4 changes: 3 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ nav:
- Deploy Resources to Different Namespaces: usage/deploy-to-different-namespaces.md
- Export: usage/export.md
- ExtraConfig: usage/extra-config.md
- High Availability: usage/ha.md
- High Availability:
- Redis: usage/ha/redis.md
- Repo Server: usage/ha/repo-server.md
- Ingress: usage/ingress.md
- Insights: usage/insights.md
- Dex: usage/dex.md
Expand Down