flux-local is a python library and set of tools for managing a flux gitops repository, with validation steps to help improve quality of commits, PRs, and general local testing.
Project description
flux-local is a set of tools and libraries for managing a local flux gitops repository focused on validation steps to help improve quality of commits, PRs, and general local testing.
This library uses command line tools like kustomize and helm to replicate the behavior of flux to gather objects in the cluster. It only looks at the local git repo, and not a live cluster. However, this is fine since the local repository has enough information and the definition is simple. Secrets are ignored as the content is not needed to validate the cluster is creating valid objects.
This library at first glance is little more than shell scripts running commands, but is easier to test, maintain, and evolve.
See documentation for full quickstart and API reference. See the github project.
flux-local CLI
The CLI is written in python and packaged as part of the flux-local
python library, which can be installed using pip:
$ pip3 install flux-local
You can use the flux-local
cli to build all objects in a cluster, similar to how you
use kustomize build
, which is used underneath. Here is an example to build all flux
Kustomization
objects within a git repository, which will then build all resources within those:
$ flux-local build clusters/prod/
You can also specify the root to build all clusters.
Additionally, you can inflate HelmRelease
objects inside each Kustomization
by adding
the --enable-helm
command line flag:
$ flux-local build clusters/prod/ --enable-helm
You may also use flux-local
to verify your local changes to helm charts have the desired
effect on resources within the HelmRelease
:
$ flux-local diff clusters/prod/ --enable-helm
Library
The flux_local
library documentation for details
on the python APIs provided.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file flux-local-0.1.0.tar.gz
.
File metadata
- Download URL: flux-local-0.1.0.tar.gz
- Upload date:
- Size: 19.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1772b93a780bf10f9541aa936c8bcc77ca37064d54e7fd730987957c26fd182 |
|
MD5 | b8e98dbe7ff503c8af8d446516172b58 |
|
BLAKE2b-256 | 53700f40214dce0f7a966d430c6e3d94d8b1e130ad58dc841e79b0728724309e |
File details
Details for the file flux_local-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: flux_local-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a5aa56fc2887dd8e28a185d3375ecc136e68de2e7cc501bcd35b3beee01d4e4 |
|
MD5 | 740f831d06526e519bec458ccf40e376 |
|
BLAKE2b-256 | db30a29787a4263362108313d0de2f3a5252d72c96c7522d43b8f606b6c9ee49 |