Infrastructure as Code /
GitOps on Northflank
GitOps on Northflank allows you to manage infrastructure, update deployments, or automate complex tasks using a template file in a Git repository.
If run automatically when the template is updated is also enabled you can scale up deployments, promote builds to production, and manage almost anything else on Northflank simply by pushing a commit to a Git repository.
To begin using GitOps with a template, create a new template or edit an existing one.
Enable GitOps to begin configuring the integration with a Git repository. You can store multiple templates in a single repository, and you can either manage your templates from separate repositories, or include them in the same repository as the application you want to deploy and manage on Northflank.Northflank must have access to the repository to be able to create and update templates in it. If the repository is not accessible, navigate to Git integrations in your Northflank account and edit the installation for the Git account to enable access.
It is recommended, but not required, that you save templates with the .json
file extension, so your IDE knows how to handle the file.
Save a new template in a repository
You can create a template in the Northflank application and save it to a repository and branch of your choice. Select the repository and branch, and enter the path (relative to the repository root) you want to save the template to.
Click fetch to check the template does not already exist, and continue editing your template. When you save, Northflank will create the template file in your repository, and link it with the template in the Northflank application.
Use an existing template
You can use a template that already exists in a Git repository on Northflank. Select the repository and branch that contains the template you want to use in the GitOps section.
Enter the path to your template file (relative to the repository root, e.g. /my-template.json
or /templates/my-template.json
) and click fetch to retrieve the existing template.
Northflank will load the template into the editor, and the template in the repository will be linked with the template in the Northflank application.
Any changes you make to a template with GitOps enabled in the Northflank application will be pushed to your linked repository on the configured branch on save.
Likewise, any commit pushed to the linked branch in your repository will update the template in Northflank.
You can enable run automatically when the template is updated so that any changes to the template pushed to your repository are automatically implemented.
warning
You can remove the integration with your template by disabling GitOps from the template editor in the Northflank application.
This will leave the template in your repository, but changes pushed to the template in your repository will no longer update the template on Northflank. Similarly, changes made on Northflank will not be pushed to the template in your repository.
It is not recommended that you delete the template from the repository before disabling GitOps, as your template will also become inaccessible on Northflank.
Create a template
Add and edit a template on Northflank to create or update resources and their configurations.
Write a template
Learn how to structure a Northflank template, define workflows, create resources, and perform actions.
Run a template
Run templates manually or automatically.
Share a template
Share templates with your team or the public.