The GitHub integration enables GitOps workflows, allowing you to store stack configurations in Git and maintain a full audit trail of infrastructure changes.
Overview
Connecting GitHub to Ankra enables:- Configuration Storage: Store Helm values and manifests in your repository
- Version Control: Track all infrastructure changes with Git history
- GitOps Workflows: Sync changes between Ankra and your repository
- Audit Trail: Full history of who changed what and when
- Collaboration: Use pull requests and code review for infrastructure changes
Connecting GitHub
Connect GitHub
Click Connect GitHub. You’ll be redirected to GitHub to authorize the Ankra GitHub App.
Authorize Access
Review the permissions requested:
- Read access to metadata
- Read and write access to repository contents
Select Repository
Choose an existing repository or create a new one. Ankra will create a
cluster/ folder in this repository to store your configuration.Repository Structure
When connected, Ankra creates the following structure in your repository:Files Explained
| Path | Description |
|---|---|
stacks/{name}/values/ | Helm values files for each add-on |
stacks/{name}/manifests/ | Raw Kubernetes manifests |
settings.yaml | Cluster-level configuration |
Sync Behavior
Ankra → GitHub
When you make changes in Ankra:- Changes are saved to the platform
- Configuration is exported to the connected repository
- A commit is created with the changes
- You can see the commit in GitHub history
GitHub → Ankra
When you make changes in GitHub:- Push changes to the configured branch
- Ankra detects the changes
- Configuration is imported and validated
- Changes are applied to your cluster
Using GitOps
Making Changes via Git
Pull Request Workflow
For production environments, use pull requests:- Create a feature branch
- Make configuration changes
- Open a pull request
- Review changes with your team
- Merge to trigger sync
Viewing Git History
In Ankra
Navigate to your cluster’s GitOps page to see:- Last sync timestamp
- Recent commits affecting this cluster
- Sync status and any errors
In GitHub
View the full commit history in your repository to see:- All configuration changes over time
- Who made each change
- Commit messages explaining changes
Managing Access
Repository Permissions
The Ankra GitHub App requests:| Permission | Purpose |
|---|---|
| Contents (read/write) | Read and write configuration files, branches, and commits |
| Metadata (read) | Access repository information |
| Pull requests (read/write) | Open the setup pull request when onboarding an application’s CI/CD pipeline |
| Workflows (read/write) | Commit the generated GitHub Actions workflow (.github/workflows/*) in the setup pull request |
| Administration (read/write) (optional) | Detect and, on request, fix the repository’s Actions workflow-token permissions so the first build can push to GHCR without a manual settings change |
Pull requests and Workflows are required for the application setup flow (Dockerfile, manifests, and CI/CD pipeline generation). GitHub treats
.github/workflows/* as protected, so committing a workflow file needs the dedicated Workflows permission in addition to Contents.Administration is optional. When granted, Ankra’s CI/CD tab can read whether the repository’s default
GITHUB_TOKEN is read-only and offer a one-click fix to set it to read/write — a common cause of write_package: denied on the first build. Without it, Ankra still detects the problem and links you to the exact GitHub settings to change manually. Approve it under Settings → Applications → Installed GitHub Apps → Ankra → Configure.Revoking Access
To disconnect GitHub:- Go to cluster Settings → Repository
- Click Disconnect
- Go to GitHub Settings → Applications → Installed GitHub Apps
- Find Ankra and click Configure, then Uninstall (or adjust which repositories it can access)
Troubleshooting
Sync Failures
If sync fails, check:- Repository Access: Ensure the Ankra app still has access to the repository
- Branch Exists: Verify the configured branch exists
- Valid YAML: Ensure all configuration files are valid YAML
- Conflicts: Resolve any merge conflicts in the repository
Permission Errors
If you see permission errors:- Go to GitHub Settings → Applications → Installed GitHub Apps
- Find Ankra and click Configure
- Ensure the repository is in the “Selected repositories” list
- If GitHub shows a review updated permissions prompt, approve it. New permissions added to the Ankra App (such as Pull requests or Workflows) are not granted to existing installations until an owner re-approves them.
HTTP 403 — Resource not accessible by integration means the installation token is missing a permission for the operation it attempted. Opening an application setup pull request requires Pull requests (read/write) and — because the pull request adds a .github/workflows file — Workflows (read/write). Confirm both are granted on the installation (not just declared on the App), then re-run setup.Out of Sync
If Ankra and GitHub are out of sync:- Navigate to the cluster’s GitOps page
- Click Force Sync to re-sync from the repository
- Review any conflicts and resolve them
Best Practices
CI/CD Integration
Integrate with CI/CD pipelines:GitHub Actions Example
Deployment Pipeline
Still have questions? Join our Slack community and we’ll help out.