Giter Club home page Giter Club logo

tenant-chart's Introduction

Provisioning Tenants

This is a helm chart for provisioning tenants on a cluster in a GitOps fashion. I was doing this with kustomize but was finding I was doing a lot of copy and paste between tenants, using templating via a helm chart helms reduce this.

There is minimal documentation at this point, see the values.yaml file for an example of how to do use it.

Note the intent is for this chart to be used with the kustomize helm inflator, as a result there is minimal overriding of resources provided. Basically the philosphy is to make automatic inclusion a true/false thing and if you want to customize something simply don't include enable it in the chart and just add it as a separate resource to the kustomization.

Credit to Thomas Jungbauer for the original concepts linked in his blog article below.

ApplicationSet

Each tenant gets their own version of the chart that specifies the namespaces and resources required for that tenant. These can be organized into a directory structure in git and then an ApplicationSet can be used with the git generator to automatically generate the tenant applications.

Here is an example ApplicationSet from my cluster-config repository:

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name: tenants
  namespace: openshift-gitops
spec:
  generators:
  - git:
      directories:
      - path: tenants/**/base
      repoURL: https://github.com/gnunn-gitops/cluster-config
      revision: main
  goTemplate: true
  syncPolicy:
    preserveResourcesOnDeletion: true
  template:
    metadata:
      name: tenant-{{ index .path.segments 1 | normalize }}
    spec:
      destination:
        name: in-cluster
        namespace: default
      project: cluster-config
      source:
        path: '{{ .path.path }}'
        repoURL: https://github.com/gnunn-gitops/cluster-config
      syncPolicy:
        automated:
          selfHeal: true

Package chart

Use `helm package .`` to package the chart.

Other Examples

There are other examples of Helm charts for this including:

tenant-chart's People

Contributors

gnunn1 avatar

Stargazers

Saul Alanis avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.