GitOps
This document describes how Flipt can be used with GitOps workflows
Overview
GitOps is a way to do Continuous Delivery, it works by using Git as a single source of truth for declarative infrastructure and applications. With Git at the center of your delivery pipelines, developers can make pull requests to accelerate and simplify application deployments.
Flipt is uniquely suited to work with GitOps workflows because of our declarative backends and ability to be configured completely via YAML, or JSON.
We believe that feature flags are a form of configuration and should be treated as such. This means that feature flags should be able to be stored in the same repository as the code that uses them. This allows developers to make changes to both the code and the feature flags in the same pull request. This also allows developers to use the same GitOps tooling to deploy both their code and their feature flags to production.
Flipt Cloud
Want a managed Flipt service that is GitOps native? Check out Flipt Cloud. Your feature flag data is version controlled in your Git repositories and you can manage your flags via the Flipt UI.
Git Backend
Flipt’s declarative storage backends allow it to run without a database at all. Flipt can be configured to load its feature flag data in the following ways:
- From a file on the local filesystem
- From a remote git repository
- From an OCI compliant container image registry
- From any of the 3 major cloud computing object storage services (AWS, Google Cloud, and Azure)
Our git support enables you to evaluate feature flags across different branches and tags. This allows developers to test feature flags in a staging environment before merging them into production, or leverage preview environments to test feature flags in isolation.
Read our Get Going with GitOps guide to learn how to get started with GitOps and Flipt.
CI/CD Integration
Our GitHub Action allows you to easily integrate Flipt into your CI/CD pipelines. This allows you to install Flipt into your CI pipeline and run tests against your feature flags before deploying your code to production.
You can either import your feature flag data from your repository into Flipt using our Import Command or run Flipt over your repository directly using our Local Storage backend.
This allows you to import your feature flag data into Flipt before running your tests.
Validation
Flipt’s Validate Command allows you to validate your feature flag data against a schema. This allows you to ensure that your feature flag data is valid before deploying it to production. This is especially useful when using Flipt with GitOps workflows because it allows you to catch errors in your configuration in the CI stage.
You can also add your own custom validation rules to the schema to ensure that your feature flag data is valid for your specific use case.