> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ewake.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Argo CD

> Connect Argo CD to give ewake read-only visibility into your GitOps delivery — application sync status, health, and deployed revision — to correlate incidents with deployments.

<Info>
  **What you'll get:** ewake can read your Argo CD applications — their sync status, health, and the revision each one has deployed — so it can tell whether a recent rollout lines up with an incident and surface applications that are out of sync or degraded. Access is **read-only**.
</Info>

***

## Prerequisites

* An Argo CD instance reachable from ewake — the API server URL, e.g. `https://argocd.yourcompany.com`
* Admin access to create a **local account** and bind it to a read-only role

<Note>
  ewake authenticates with an Argo CD **API token** scoped to a read-only account. It only ever reads — it never syncs, rolls back, or edits any application or Argo CD configuration.
</Note>

***

## Configuration

<Steps>
  <Step title="Create a read-only local account">
    In your Argo CD `argocd-cm` ConfigMap, add a local account with the `apiKey` capability:

    ```yaml theme={null}
    # argocd-cm ConfigMap
    data:
      accounts.ewake: apiKey
    ```

    Then bind it to Argo CD's built-in **read-only** role in the `argocd-rbac-cm` ConfigMap:

    ```yaml theme={null}
    # argocd-rbac-cm ConfigMap
    data:
      policy.csv: |
        g, ewake, role:readonly
    ```

    <Warning>
      Use the built-in `role:readonly` (or a policy limited to `get`). Don't grant `sync`, `create`, `update`, `delete`, or `override` — read-only access is what keeps ewake unable to change your deployments.
    </Warning>
  </Step>

  <Step title="Generate an API token">
    Generate a token for the account:

    ```bash theme={null}
    argocd account generate-token --account ewake
    ```

    Copy the token now — you'll paste it into ewake in the next step.
  </Step>

  <Step title="Get your Argo CD server URL">
    Use the base URL of your Argo CD API server, e.g. `https://argocd.yourcompany.com` — the same host you use for the Argo CD UI or `argocd login`.
  </Step>

  <Step title="Open the Argo CD integration in ewake">
    In your ewake dashboard, go to **Integrations** → **Infrastructure** → **Argo CD** → click **Connect with token**.
  </Step>

  <Step title="Enter your credentials">
    | Field          | Value                                                                      |
    | -------------- | -------------------------------------------------------------------------- |
    | **Server URL** | Base URL of your Argo CD API server, e.g. `https://argocd.yourcompany.com` |
    | **API token**  | The read-only token generated in Step 2                                    |
  </Step>

  <Step title="Test and save">
    Click **Test connection** to verify the connection, then click **Save**.

    <Check>
      Argo CD is connected. Ewake can now read your application delivery state during investigations.
    </Check>
  </Step>
</Steps>

***

<Note>
  Ewake uses **read-only** Argo CD API calls. It never syncs, rolls back, or modifies any application or Argo CD configuration.
</Note>
