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

# ArgoCD

> Connect ArgoCD instances for GitOps deployments

Connect your ArgoCD instances to manage GitOps deployments through ShiftLabs.

## How to Add an ArgoCD Instance

<Steps>
  <Step title="Open Integrations">
    Go to **Settings → Integrations → ArgoCD** tab.
  </Step>

  <Step title="Click Add ArgoCD">
    Click the **Add ArgoCD** button.
  </Step>

  <Step title="Enter Connection Details">
    * **Name** (required): Display name for this instance
    * **Host** (required): ArgoCD server URL (e.g., `https://argocd.example.com`)
    * **Token** (required): ArgoCD API token for authentication
    * **Verify SSL**: Enable to validate SSL certificates
    * **Set as Default**: Make this the default ArgoCD instance
  </Step>

  <Step title="Save">
    Click **Create**. Use the health check to verify connectivity.
  </Step>
</Steps>

## How to Edit an ArgoCD Instance

1. Click the edit icon on the instance row
2. Modify the settings
3. Click **Save**

<Tip>
  Leave the token field empty when editing to keep the existing token.
</Tip>

## How to Check Health

Click the **Check** button on any instance to verify connectivity. A successful check confirms ShiftLabs can communicate with ArgoCD.

## How to Delete an ArgoCD Instance

1. Click the delete icon on the instance row
2. Confirm the deletion

<Warning>
  Deleting an ArgoCD instance removes the connection. Existing ArgoCD applications are not affected.
</Warning>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Health check shows Unhealthy">
    1. Verify the host URL is correct (include `https://`)
    2. Check if the API token is valid and not expired
    3. Ensure ArgoCD is running and accessible from ShiftLabs
    4. If using self-signed certificates, disable SSL verification
  </Accordion>

  <Accordion title="Authentication failed">
    Generate a new API token in ArgoCD:

    1. Log in to ArgoCD UI
    2. Go to Settings → Accounts
    3. Generate a new token
    4. Update the integration with the new token
  </Accordion>
</AccordionGroup>

## FAQ

<AccordionGroup>
  <Accordion title="Can I connect multiple ArgoCD instances?">
    Yes. Add as many instances as needed and mark one as default.
  </Accordion>

  <Accordion title="What permissions does the token need?">
    The token should have permissions to list/view applications, projects, and clusters in ArgoCD.
  </Accordion>
</AccordionGroup>
