Giter Club home page Giter Club logo

helm-app-operator-kit's Introduction

This project is a component of the Operator Framework, an open source toolkit to manage Kubernetes native applications, called Operators, in an effective, automated, and scalable way. Read more in the introduction blog post.

Helm App Operator Kit

This repository serves as a template for easily creating managed stateless applications that run either Kubernetes Deployments or Helm charts. It was inspired by the Lostromos project. The underlying Operator was created using the operator-sdk new command.

Installing a custom Helm-based app

While the Operator Lifecycle Manager can only manage Operators, not all applications require developers to write a custom Operator. The Helm App Operator Kit makes it possible to leverage a pre-existing Helm chart to deploy Kubernetes resources as a unified application.

git clone https://github.com/coreos/helm-app-operator-kit
cd helm-app-operator-kit

Prerequisites

  • Kubernetes 1.9+ cluster
  • docker client
  • kubectl client
  • Helm Chart

Instructions

  1. Run the following:
$ git checkout [email protected]:operator-framework/helm-app-operator-kit.git && cd helm-app-operator-kit
$ docker build -t quay.io/<namespace>/<chart>-operator -e HELM_CHART=/path/to/helm/chart -e API_VERSION=<group/version> -e KIND=<Kind> .
$ docker push quay.io/<namespace>/<chart>-operator
  1. Modify the following Kubernetes YAML manifest files in helm-app-operator/deploy:
File Action
deploy/crd.yaml Define your CRD (kind, spec.version, spec.group must match the docker build args)
deploy/cr.yaml Make an instance of your custom resource (kind, apiVersion *must match the docker build args)
deploy/operator.yaml Replace <namespace> and <chart> appropriately
deploy/rbac.yaml Ensure the resources created by your chart are properly listed
deploy/csv.yaml Replace fields appropriately. Define RBAC in spec.install.spec.permissions. Ensure spec.customresourcedefinitions.owned correctly contains your CRD
deploy/olm-catalog/crd.yaml Define your CRD (kind, spec.version, spec.group must match the docker build args)
  1. Apply the manifests to your Kubernetes cluster (if using Operator Lifecycle Manager):
$ kubectl create -f helm-app-operator/deploy/olm-catalog/crd.yaml
$ kubectl create -n <operator-namespace> -f helm-app-operator/deploy/olm-catalog/csv.yaml

Otherwise, manually create the RBAC and deployment resources:

$ kubectl create -f helm-app-operator/deploy/crd.yaml
$ kubectl create -n <operator-namespace> -f helm-app-operator/deploy/rbac.yaml
$ kubectl create -n <operator-namespace> -f helm-app-operator/deploy/operator.yaml

Creating an instance of the example application

After the CustomResourceDefinition and ClusterServiceVersion-v1 resources for the new application have been applied, new instances of that app can be created:

$ kubectl create -n <operator-namespace> -f helm-app-operator/deploy/cr.yaml

Confirm the resources defined in the Helm Chart were created.

helm-app-operator-kit's People

Contributors

jzelinskie avatar ecordell avatar alecmerdler avatar robszumski avatar josephschorr avatar zbwright avatar aravindhp avatar tobru avatar

Watchers

Nicolas Trangez avatar James Cloos avatar  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.