Git Product home page Git Product logo

flux-helm-test's Introduction

flux-helm-test

A repository with example configs for relasing Helm charts via Flux.

The Helm operator (alpha release)

Synopsis

The Flux Helm operator provides an extension to Flux (https://github.com/weaveworks/flux) to be able to automate Helm Chart releases. In other words, given a desired state as a file in git, it does helm install and helm upgrade for you.

A Chart release is described through a Kubernetes custom resource. Each custom resource contains all that needs to be known to do a Chart release. The Flux daemon synchronises these resources from git to the cluster, and the Flux Helm operator makes sure Helm charts are released as specified in the resources.

Custom resource (FluxHelmRelease)

To record that you want a chart release, you create a resource of the kind FluxHelmRelease.

Example

---
apiVersion: helm.integrations.flux.weave.works/v1alpha2
kind: FluxHelmRelease
metadata:
  name: mongodb
  namespace: test
  labels:
    chart: mongodb
spec:
  chartGitPath: mongodb
  releaseName: mongo-database
  values:
    image: bitnami/mongodb:3.7.1-r1
    imagePullPolicy: IfNotPresent
    persistence:
      enabled: false
  • the name is mandatory and needs to follow k8s naming conventions
  • the namespace is optional. It determines where the resource, and thereby the chart, are created
  • if the releaseName field is not provided, the release name used for Helm will be $namespace-$name
  • the label chart is mandatory, and should match the directory containing the chart
  • chartGitPath is the directory containing a chart, given relative to the charts path (provided to the helm-operator)
  • values are user customizations of default parameter values from the chart itself

Prerequisites and limitations

  • Tiller (the server component of Helm) should be running in the cluster. See the Helm documentation for how to install Helm. The Helm operator alpha will only deal with an unauthenticated Tiller installation (the default).

  • You need a git repo with a similar directory structure to this repo (if not this repo). That is, the configuration you want sync'ed by the Flux daemon.

  • The Helm operator alpha only deals with charts in a single git repository, which you supply to it as a command-line argument, along with a parent directory for charts within that repository. In the resources, charts are given relative to the parent directory.

User setup

You can fork this repo and use it as the basis for trying out the Helm operator alpha. It is best to use a fresh Kubernetes cluster.

  1. Set up helm by running helm init. Additional configuration may be required when using GKE or other Kubernetes Distributions. Have a read through Helm's installation instructions.

  2. Make a fork of this repository to your own account, and clone it to your computer

  3. In your cloned repo, change the git URL in artifacts/weave-helm-operator.yaml to refer to your fork on github. Make sure to use the full ssh form of the url.

  4. Go to Weave Cloud and create an instance

  5. Set up the Weave agents by running the provided curl command

  6. Before configuring "Deploy" for your new Weave Cloud instance, run this in the cloned repository to install the Helm operator:

    kubectl apply -f artifacts/

  7. Now go back to Weave Cloud and set "Deploy" up, giving the git URL of your forked repo. You will need to install the deploy key (either using the button, or by copying and pasting), since both the operator and the Flux daemon need it to access your forked git repository. Run the kubectl command given there to complete the setup.

At this point, you can click through to Explore, wait a bit, and see the resources started in the cluster by the charts being released. If you make a change in the chart, or a change in the chart release resource, and push a commit to your fork, the change will be reflected shortly in your cluster.

Getting Help

If you have any questions about, feedback for or problems with flux-helm-test:

Your feedback is always welcome!

flux-helm-test's People

Contributors

aaron7 avatar dholbach avatar foot avatar kahootali avatar squaremo avatar stefanprodan avatar tamarakaufler avatar waseem-h avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

alexrogalskiy

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.