Skip to main content

Manage multiple apps across one or more k8s clusters.

Project description

Gitops

PyPI version versions Test Lint

Manage multiple apps across one or more k8s clusters.

Overview

Keeping track of numerous of single-tenanted application deployments can quickly become a handful. Enter Gitops!

The tool has two halves:

  • Gitops Server - an instance of this gets deployed to each of your kubernetes clusters, listening on changes made to your gitops cluster repo. The server's responsibility is to update the deployments on the cluster it lives on to match the app specifications in the repo.
  • Gitops CLI - this is a tool that you can use to interact comfortably with your cluster repo. It allows listing all deployed applications, what images they're presently running on, and which clusters they live on. It also provides numerous operations that can be applied to one or more apps at a time, such as bumping to a newer version of an image, or running a particular command across your app cohort.

You can install the CLI tool with: pip install gitops

Currently Kubernetes/Helm is the only supported cluster interface. All app deployments are performed as applications of Helm charts.

So what's a "cluster repo"?

This is a git repository that you set up, where you list out all of your applications and how you want them deployed. It looks like this:

.
+- apps
   +- app_0
      +- deployment.yml
      +- secrets.yml
   +- app_1
      +- deployment.yml
      +- secrets.yml
+- jobs

Installation

Secrets should be placed in secrets.env. The example file secrets.example.env has the environment variables you will need to supply.

Add export GITOPS_APPS_DIRECTORY=~/<cluster-apps-folder> to invoke gitops from any directory.

Ensure that gitops has edit access to the namespace it is deploying to. An example RoleBinding is:

apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: gitops-role-binding
  namespace: workforce
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: edit
subjects:
- kind: ServiceAccount
  name: default
  namespace: gitops

Contribution

We're using releaseplease, to publish a new version do the following:

  1. Checkout a feature branch and make the changes
    1. Make sure to follow instructions for writing commits by releaseplease
      1. fix: which represents bug fixes, and correlates to a SemVer patch.
      2. feat: which represents a new feature, and correlates to a SemVer minor.
      3. feat!:, or fix!:, refactor!:, etc., which represent a breaking change (indicated by the !) and will result in a SemVer major.
  2. Push changes and get the PR approved
  3. Once it is merged; an additional PR containing the release changes needs to be merged to create a release.

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

gitops-0.12.1.tar.gz (81.5 kB view details)

Uploaded Source

Built Distribution

gitops-0.12.1-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

File details

Details for the file gitops-0.12.1.tar.gz.

File metadata

  • Download URL: gitops-0.12.1.tar.gz
  • Upload date:
  • Size: 81.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for gitops-0.12.1.tar.gz
Algorithm Hash digest
SHA256 4decefeab83dd9b0854966f672653d328d87e75368305abeb0a5cdbddbef5067
MD5 e87e7a9ecbc195cb9a4ba54ad2eb09f8
BLAKE2b-256 2a38e56dbfb26a706c9d23ebd5865f906932bd4565d70591f0c4bcac396ce34b

See more details on using hashes here.

File details

Details for the file gitops-0.12.1-py3-none-any.whl.

File metadata

  • Download URL: gitops-0.12.1-py3-none-any.whl
  • Upload date:
  • Size: 24.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for gitops-0.12.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5aaf361199134ec38af62adc5859dd5028522d20fdf467df5858d003d074643a
MD5 714a86984e14db9d6d1f463e9d55f745
BLAKE2b-256 3a65f282dbc10e0cc6c3815967f7212648f5ef4427df892ab3db819c2d59bbe7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page