An open API service indexing awesome lists of open source software.

https://github.com/codefresh-io/argocd-agent


https://github.com/codefresh-io/argocd-agent

Last synced: 3 months ago
JSON representation

Awesome Lists containing this project

README

          

# ArgoCD agent for codefresh gitops dashboard

[![codecov](https://codecov.io/gh/codefresh-io/argocd-agent/branch/master/graph/badge.svg?token=UHEXPBWN60)](https://codecov.io/gh/codefresh-io/argocd-agent)

[![Codefresh build status]( https://g.codefresh.io/api/badges/pipeline/codefresh-inc/argo%2Fargocd-agent?type=cf-1&key=eyJhbGciOiJIUzI1NiJ9.NTY3MmQ4ZGViNjcyNGI2ZTM1OWFkZjYy.AN2wExsAsq7FseTbVxxWls8muNx_bBUnQWQVS8IgDTI)]( https://g.codefresh.io/pipelines/edit/new/builds?id=5f21305719d46c880abeeeb5&pipeline=argocd-agent&projects=argo&projectId=5f16b786f25d80a086a56bcb)

[![Go Report Card](https://goreportcard.com/badge/github.com/codefresh-io/argocd-agent)](https://goreportcard.com/report/github.com/codefresh-io/argocd-agent)

Codefresh providing [dashboard](https://codefresh.io/docs/docs/ci-cd-guides/gitops-deployments/) for watching on all activities that happens on argocd side. Codefresh argocd agent important part for check all argocd CRD use watch api and notify codefresh about all changes.

Like:
* Application created/removed/updated
* Project created/removed/updated
* Your manifest repo information base on context that you provide to us during installation

In addition this agent do automatic application sync between argocd and codefresh

## Prerequisites

Make sure that you have

* a [Codefresh account](https://codefresh.io/docs/docs/getting-started/create-a-codefresh-account/) with enabled gitops feature
* a [Codefresh API token](https://codefresh.io/docs/docs/integrations/codefresh-api/#authentication-instructions) that will be used as a secret in the agent
* a [Codefresh CLI](https://codefresh-io.github.io/cli/) that will be used for install agent
* a [ArgoCD Server](https://argoproj.github.io/argo-cd/cli_installation/)

ArgoCD agent has following resource requirements
```
resources:
requests:
memory: "256Mi"
cpu: "0.4"
limits:
memory: "512Mi"
cpu: "0.8"
```

## Installation

```sh
codefresh install gitops argocd-agent
```

## Uninstall

```sh
codefresh uninstall gitops argocd-agent
```

## Upgrade

Codefresh will show you indicator inside your [gitops integration](https://g.codefresh.io/account-admin/account-conf/integration/gitops) when you need upgrade your agent

```sh
codefresh upgrade gitops argocd-agent
```

## How to use the ArgoCD agent

## How it works ( Diagram )

## Local execution

### Environment variables

* ARGO_HOST - Argocd host (like https://34.71.103.174/)
* ARGO_USERNAME - Argocd username ( Need provide if ARGO_TOKEN empty )
* ARGO_PASSWORD - Argocd password ( Need provide if ARGO_TOKEN empty )
* ARGO_TOKEN - Argocd user token
* CODEFRESH_TOKEN - [Codefresh user token](https://codefresh.io/docs/docs/integrations/codefresh-api/#authentication-instructions)
* CODEFRESH_INTEGRATION - Codefresh gitops integration name
* CODEFRESH_HOST - Codefresh host ( prodution https://g.codefresh.io)
* CODEFRESH_SUFFIX - Suffix for agent application's resources. Can be used for installing multiple agents in one namespace
* GIT_PASSWORD - Git token

## Run tests
`go test -cover ./...`