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

# Helm Registries

> Connect HTTP and OCI Helm registries to Ankra for chart deployment.

Ankra integrates with external Helm chart registries, allowing you to deploy charts from any HTTP or OCI-compatible repository. This integration enables your team to use both public charts and private internal charts through the Ankra platform.

***

## Supported Registry Types

<CardGroup cols={2}>
  <Card title="HTTP Registries" icon="globe">
    Traditional Helm repositories that serve an `index.yaml` file over HTTP/HTTPS.
  </Card>

  <Card title="OCI Registries" icon="box">
    Container registries that support Helm charts stored as OCI artifacts.
  </Card>
</CardGroup>

***

## HTTP Registry Integration

HTTP registries are traditional Helm repositories that serve charts via HTTP. They use an `index.yaml` file to list available charts and versions.

### How It Works

1. **Index Sync**: Ankra fetches the `index.yaml` from your registry URL
2. **ETag Optimization**: Uses HTTP headers to skip syncs when the index hasn't changed
3. **Chart Download**: New chart versions are downloaded and cached
4. **Metadata Extraction**: README, values.yaml, and JSON schema are extracted for the UI

### Supported Providers

| Provider          | URL Format                                               | Notes                        |
| ----------------- | -------------------------------------------------------- | ---------------------------- |
| ChartMuseum       | `https://charts.example.com`                             | Self-hosted chart repository |
| Harbor            | `https://harbor.example.com/chartrepo/PROJECT`           | Requires chartrepo path      |
| Nexus             | `https://nexus.example.com/repository/helm-hosted/`      | Hosted repository type       |
| JFrog Artifactory | `https://artifactory.example.com/artifactory/helm-local` | Local or virtual repo        |
| AWS S3            | `https://bucket.s3.amazonaws.com/charts`                 | With static website hosting  |

### Adding an HTTP Registry

<Steps>
  <Step title="Navigate to Repositories">
    Go to **Charts** → **Repositories** and click **Add**.
  </Step>

  <Step title="Enter Registry URL">
    Enter your registry URL, e.g., `https://charts.example.com`
  </Step>

  <Step title="Select Credential">
    If authentication is required, select a credential from the dropdown.
  </Step>

  <Step title="Save">
    Click **Add** to connect the registry.
  </Step>
</Steps>

***

## OCI Registry Integration

OCI registries store Helm charts as container images using the OCI specification. This is the modern approach supported by Helm 3.8+.

### How It Works

1. **Manifest Fetch**: Ankra reads the OCI manifest to discover chart tags
2. **Layer Download**: Chart layers are downloaded from the registry
3. **Artifact Extraction**: The Helm chart is extracted from OCI layers
4. **Version Tracking**: Each tag is tracked as a chart version

### Supported Providers

| Provider                  | URL Format                                   | Authentication        |
| ------------------------- | -------------------------------------------- | --------------------- |
| GitHub Container Registry | `oci://ghcr.io/ORG/charts`                   | Personal Access Token |
| Google Artifact Registry  | `oci://REGION-docker.pkg.dev/PROJECT/REPO`   | Service Account JSON  |
| Amazon ECR                | `oci://ACCOUNT.dkr.ecr.REGION.amazonaws.com` | AWS credentials       |
| Azure Container Registry  | `oci://REGISTRY.azurecr.io/charts`           | Service Principal     |
| Docker Hub                | `oci://registry-1.docker.io/ORG`             | Access Token          |
| Harbor                    | `oci://harbor.example.com/PROJECT`           | Username/Password     |

### Adding an OCI Registry

<Steps>
  <Step title="Navigate to Repositories">
    Go to **Charts** → **Repositories** and click **Add**.
  </Step>

  <Step title="Enter OCI Registry URL">
    Enter your registry URL with the `oci://` prefix, e.g., `oci://ghcr.io/your-org/charts`
  </Step>

  <Step title="Select Credential">
    If authentication is required, select a credential from the dropdown.
  </Step>

  <Step title="Save">
    Click **Add** to connect the registry.
  </Step>
</Steps>

<Note>
  OCI URLs must start with `oci://`. Ankra automatically detects the registry type based on the URL prefix.
</Note>

***

## Sync Configuration

### Default Sync Interval

Registries sync automatically every **2 minutes** by default.

### Custom Sync Intervals

You can configure sync intervals per registry:

* **Minimum**: 10 seconds
* **Maximum**: 24 hours (86400 seconds)
* **Disabled**: Set to 0 to disable automatic sync

### Sync Behavior

<Steps>
  <Step title="Check for Updates">
    Ankra checks if the registry index has changed using ETag or Last-Modified headers.
  </Step>

  <Step title="Detect New Versions">
    New chart versions are identified by comparing against previously synced versions.
  </Step>

  <Step title="Download Charts">
    New versions are downloaded and stored. Metadata is extracted for browsing.
  </Step>

  <Step title="Retry on Failure">
    Failed downloads are automatically retried with exponential backoff.
  </Step>
</Steps>

***

## Authentication

Most registries require authentication. See [Credentials Integration](/platform/credentials) for setting up:

* Username/password authentication
* Token-based authentication
* Service account credentials

***

## Troubleshooting

### HTTP Registry Issues

| Issue            | Cause               | Solution                                     |
| ---------------- | ------------------- | -------------------------------------------- |
| 404 Not Found    | Wrong URL path      | Verify the URL points to the repository root |
| 401 Unauthorized | Missing credentials | Add registry credential                      |
| Timeout          | Network/firewall    | Check connectivity to the registry           |
| Empty chart list | Invalid index.yaml  | Verify the registry is properly configured   |

### OCI Registry Issues

| Issue             | Cause                   | Solution                              |
| ----------------- | ----------------------- | ------------------------------------- |
| Invalid reference | Missing `oci://` prefix | Add `oci://` to the URL               |
| Manifest unknown  | Chart doesn't exist     | Check the repository path             |
| Unauthorized      | Token expired           | Refresh or recreate credentials       |
| Tag not found     | Version doesn't exist   | Verify chart versions in the registry |

***

## API Integration

Use the Ankra API to manage registries programmatically:

```bash theme={null}
# List registries
curl -H "Authorization: Bearer $TOKEN" \
  https://platform.ankra.app/api/v1/registries

# Add HTTP registry
curl -X POST -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "my-charts", "url": "https://charts.example.com", "kind": "http_registry"}' \
  https://platform.ankra.app/api/v1/registries

# Add OCI registry
curl -X POST -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "ghcr-charts", "url": "oci://ghcr.io/org/charts", "kind": "oci_registry"}' \
  https://platform.ankra.app/api/v1/registries
```

See the [API Reference](/api-reference/introduction) for complete documentation.
