45 lines
1.7 KiB
Markdown
45 lines
1.7 KiB
Markdown
# Ansible Role: ArgoCD
|
|
|
|
This role installs and configures ArgoCD in a Kubernetes cluster.
|
|
|
|
## Role Variables
|
|
|
|
Available variables are listed below, along with default values (see `defaults/main.yml`):
|
|
|
|
| Variable | Default | Description |
|
|
|---|---|---|
|
|
| `argocd_version` | `stable` | The version of ArgoCD to install. |
|
|
| `argocd_namespace` | `argocd` | The namespace where ArgoCD will be installed. |
|
|
| `argocd_repo` | `https://raw.githubusercontent.com/argoproj/argo-cd/refs/tags/{{ argocd_version }}/manifests/ha/install.yaml` | The URL to the ArgoCD installation manifests. |
|
|
| `argocd_git_repository` | `https://github.com/argocd/argocd` | The Git repository URL for ArgoCD to use. |
|
|
| `argocd_git_username` | `user` | The username for the Git repository. |
|
|
| `argocd_git_pat` | `token` | The personal access token for the Git repository. |
|
|
|
|
## Tasks
|
|
|
|
The following tasks are performed by this role:
|
|
|
|
- **Install ArgoCD**: Creates the ArgoCD namespace and applies the installation manifests.
|
|
- **Apply ArgoCD Ingress**: Applies an Ingress resource for the ArgoCD server. **Note:** The template file `ingress.yml.j2` is missing from the role.
|
|
- **Apply ArgoCD CM**: Applies a ConfigMap with command parameters for ArgoCD.
|
|
- **Apply ArgoCD repository**: Creates a Secret with Git repository credentials.
|
|
- **Apply ArgoCD Root Application**: Creates a root Application resource for ArgoCD.
|
|
|
|
## Handlers
|
|
|
|
There are no handlers in this role.
|
|
|
|
## Usage
|
|
|
|
Here is an example of how to use this role in a playbook:
|
|
|
|
```yaml
|
|
- hosts: kubernetes
|
|
roles:
|
|
- role: kubernetes_argocd
|
|
vars:
|
|
argocd_git_repository: "https://github.com/my-org/my-repo.git"
|
|
argocd_git_username: "my-user"
|
|
argocd_git_pat: "my-token"
|
|
```
|