Code Monkey home page Code Monkey logo

helm's Introduction

Helm

Build Status Go Report Card GoDoc CII Best Practices

Helm is a tool for managing Charts. Charts are packages of pre-configured Kubernetes resources.

Use Helm to:

  • Find and use popular software packaged as Helm Charts to run in Kubernetes
  • Share your own applications as Helm Charts
  • Create reproducible builds of your Kubernetes applications
  • Intelligently manage your Kubernetes manifest files
  • Manage releases of Helm packages

Helm in a Handbasket

Helm is a tool that streamlines installing and managing Kubernetes applications. Think of it like apt/yum/homebrew for Kubernetes.

  • Helm renders your templates and communicates with the Kubernetes API
  • Helm runs on your laptop, CI/CD, or wherever you want it to run.
  • Charts are Helm packages that contain at least two things:
    • A description of the package (Chart.yaml)
    • One or more templates, which contain Kubernetes manifest files
  • Charts can be stored on disk, or fetched from remote chart repositories (like Debian or RedHat packages)

Install

Binary downloads of the Helm client can be found on the Releases page.

Unpack the helm binary and add it to your PATH and you are good to go!

If you want to use a package manager:

  • Homebrew users can use brew install helm.
  • Chocolatey users can use choco install kubernetes-helm.
  • Scoop users can use scoop install helm.
  • Snapcraft users can use snap install helm --classic

To rapidly get Helm up and running, start with the Quick Start Guide.

See the installation guide for more options, including installing pre-releases.

Docs

Get started with the Quick Start guide or plunge into the complete documentation

Roadmap

The Helm roadmap uses GitHub milestones to track the progress of the project.

Community, discussion, contribution, and support

You can reach the Helm community and developers via the following channels:

Contribution

If you're interested in contributing, please refer to the Contributing Guide before submitting a pull request.

Code of conduct

Participation in the Helm community is governed by the Code of Conduct.

helm's People

Contributors

adamreese avatar adshmh avatar bacongobbler avatar bmelville avatar bridgetkromhout avatar dependabot[bot] avatar dm3ch avatar fibonacci1729 avatar hickeyma avatar jackgr avatar jan25 avatar jascott1 avatar jdolitsky avatar jlegrone avatar joejulian avatar liuming-dev avatar marckhouzam avatar mattfarina avatar nebril avatar prydonius avatar sabre1041 avatar scottrigby avatar sebgoa avatar sparkprime avatar tapaskapadia avatar technosophos avatar thomastaylor312 avatar unguiculus avatar waveywaves avatar yxxhero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

helm's Issues

Error not propagated for expansion errors

Just a simple jinja or python syntax error yields:

$ dm --service=http://localhost:8080 deploy types/redis/v1/redis.yaml
2015/11/11 15:40:27 cannot deploy template named redis.yaml: status code: 400 status: 400 Bad Request : cannot expand template named redis.yaml (template expansion:expander service response:&{400 Bad Request 400 HTTP/1.1 1 1 map[Date:[Wed, 11 Nov 2015 23:40:27 GMT] Content-Length:[642] Content-Type:[text/plain; charset=utf-8]] 0xc8204c20c0 642 [] false map[] 0xc82040a0e0 }
):
imports:

  • path: redis.jinja

resources:

  • name: redis
    type: redis.jinja
    properties: null

Add a test framework for types

Currently, there's no quality assurance for types pushed to the registry, other than review by the registry owners. We've talked about putting a test framework in place, to check for things like:

  • Schema file is present and well formed
  • Schema file metadata is complete
  • Type definition file is present and validates against the schema
  • Referenced types/versions exist and are valid
  • Referenced container images/tags exist and are publicly accessible
  • Type expands and deploys successfully
  • Type specific test suites supplied with the type pass

Tests should run when a type is created or updated. There needs to be a way to add type specific test suites to the type/version directory.

Make type resolution respect semver semantics

Currently, we require an exact match of the version to resolve chart reference. Instead, we should use semver semantics, meaning that:

  • We should prevent breaking changes. For example, a reference to redis:v1,0,0 cannot be satisfied by redis:v2.0.0.
  • We should resolve chart references to compatible versions, defined as versions with the same major and minor number, plus higher patch number . For example, a reference to redis:v1.0.0 should resolve to redis:v1.0.1.
  • We should take the latest compatible version. For example, if redis:v1.0.1 and redis:v1.0.2 are available, a reference to redis:v1.0.0 should resolve to redis:v1.0.2.

DM templates should understand type versions

It should be possible to indicate a version for a type, other than through its name, and a template that uses a type should be able to indicate the version range it will accept, and/or we should support semver based version alignment.

Enforce semver semantics

Automated tests should assert invariants about the chart version associated with a pull request in kubernetes/charts.

  • Automated tests should fail a pull request that doesn't satisfy semver semantics. This requriement ensures that only valid builds can be used to satisfy references.
  • Automated tests should fail a pull request that changes an existing version. In other words, it should ensure that versions are immutable. For example, if you have already committed v1.2.0, you can commit v1.2.1, v1.2.2, v1.3.0 or v2.0.0, but you can't change v1.2.0. This requirement guarantees that a dependency on a fully specified three part version number can't break you by changing out from under you.

Add support for shortened type names

Currently, we pull type definitions from URLs. We then use the URL as the type name in DM, which makes for awkward REST queries, since the URL must be encoded.

A simpler approach would be to do what the go command does, and let the user specify well known registries by just their prefix (i.e., github.com, bitbucket.org, code.google.com, etc.). See go help importpath for details.

Make DM a cluster add-on

Currently, Kubernetes users have to install DM onto their clusters before they can use it. Make DM a cluster add-on, so that they can enable it with a command line switch.

Rationalize terminology

The vocabulary currently used by DM is confusing:

  • Configuration files that contain no substitution points are called templates.
  • Python or Jinja files that do contain substitution points are called types.
  • Kubernetes primitives like Pod, Service and Replication Controller, are called configurable resource types. There are no other uses of this term, unlike in DM for GCP.

On top of this confusion, the term type is opaque. Users looking for simple templates might not think to look for types. Everyone knows what a template is. It's a piece of content that contains substitution points. However, a type could be just about anything.

We need to clean up the terminology, and focus more on making it intuitive to the Kubernetes community than on following the precedents set by DM for GCP.

Simplify the getting started process

Several users have stumbled trying to bootstrap DM. Typically, they run afoul of getting python configured correctly. However, bootstrapping is unnecessary. It's a novelty and fundamentally, we don't need to modify the user's machine to deploy DM. We built the bootstrap initially to get a feeling for how things would work, but it's just as valid, much faster and much less error prone to create the resources for DM in the cluster using a flat kubectl configuration file. So, instead of subjecting first time users to python package installs and running processes locally, we should provide a configuration file to streamline getting started. We should also preserve the bootstrap file and the accompanying instructions as an example.

Sentence based CLI

Currently, our CLI has the generic name client and takes its action from a flag. We could make it friendlier by changing the name to dm and taking the action as the first argument. With those changes, the user experience would change from this:

client --action=deploy <template_files>

to something like this:

dm deploy <template_files>

Make back end services asynchronous

Currently, expandybird and resourcifier are called synchronously by manager. These calls should be asynchronous, so that we can parallelize execution where permitted by dependencies.

Add support for CLI access to a type registry

Assuming #22, the CLI should be able to:

  • add and remove type registries for the user
  • set the default type registry for other commands
  • list the types and versions in a type registry
  • print the metadata for a specific type version

We do not need a way to fetch a type definition or schema, a place to put type definitions or schemas on the localhost, or a way to upload changes to a type definition or schema, since git provides all of that functionality for us, with many supporting features, such as issues, pull requests, etc.

This approach is consistent with our philosophy that config is code, and should be treated as such.

Cannot delete deployment when resources cannot be found

When you try to delete a deployment but it cannot find certain resources the deployment is not deleted.

To reproduce:
Deploy the Guestbook example:
dm deploy guestbook.yaml
Manually delete a replication controller:
kubectl delete rc frontend-rc
Now try to delete the Guestbook deployment
dm delete guestbook.yaml
This returns an error:
cannot delete configuration: kubetcl failed for resource: frontend-rc: exit status 1: Error from server: error when stopping "STDIN": replicationControllers "frontend-rc" not found
And deployment manager still contains the guestbook.yaml deployment:
dm list
includes guestbook.yaml

Error not propagated when resource already exists during deployment

$ dm --service=http://localhost:8080 deploy types/redis/v1/redis.yaml
2015/11/11 15:37:20 cannot deploy template named redis.yaml: status code: 400 status: 400 Bad Request : cannot create configuration (deployer service response:
&{400 Bad Request 400 HTTP/1.1 1 1 map[Content-Type:[text/plain; charset=utf-8] X-Content-Type-Options:[nosniff] Date:[Wed, 11 Nov 2015 23:37:20 GMT] Content-Length:[618]] 0xc82000e360 618 [] false map[] 0xc82040a000 }
)

$ cat log/manager.log
2015/11/11 15:37:14 Version: 0.0.1
2015/11/11 15:37:14 Listening on port 8080...
2015/11/11 15:37:16 manager: create deployment: handling request:POST /deployments
2015/11/11 15:37:16 manager: create deployment: handling request:POST /deployments
2015/11/11 15:37:16 Creating deployment: redis.yaml
2015/11/11 15:37:17 created deployment: &{redis.yaml 1 2015-11-11 15:37:17.613537833 -0800 PST 2015-11-11 15:37:17.613538146 -0800 PST 0001-01-01 00:00:00 +0000 UTC 0001-01-01 00:00:00 +0000 UTC Creat t/r/v/redis.yaml d/dm.go X
ed map[]}
2015/11/11 15:37:17 Added manifest manifest-1447285037613578429 to deployment: redis.yaml
2015/11/11 15:37:20 deleted deployment: &{redis.yaml 1 2015-11-11 15:37:17.613537833 -0800 PST 2015-11-11 15:37:17.613538146 -0800 PST 0001-01-01 00:00:00 +0000 UTC 0001-01-01 00:00:00 +0000 UTC Created map[manifest-1447285037613578429:0xc82049ab00]}
2015/11/11 15:37:20 manager: create deployment: returning response: status code:400, status:cannot create configuration (deployer service response:
&{400 Bad Request 400 HTTP/1.1 1 1 map[Content-Type:[text/plain; charset=utf-8] X-Content-Type-Options:[nosniff] Date:[Wed, 11 Nov 2015 23:37:20 GMT] Content-Length:[618]] 0xc82000e360 618 [] false map[] 0xc82040a000 }
)
::1 - - [11/Nov/2015:15:37:16 -0800] "POST /deployments HTTP/1.1" 400 282 "" "Go-http-client/1.1"

$ cat log/resourcifier.log
2015/11/11 15:37:14 Version: 0.0.1
2015/11/11 15:37:14 Listening on port 8082...
2015/11/11 15:37:17 resourcifier: create configuration: handling request:POST /configurations
2015/11/11 15:37:18 kubetcl failed for resource: redis-master: exit status 1: Error from server: error when creating "STDIN": service "redis-master" already exists

2015/11/11 15:37:18 kubetcl failed for resource: redis-master-rc: exit status 1: Error from server: error when creating "STDIN": replicationControllers "redis-master-rc" already exists

2015/11/11 15:37:19 kubetcl failed for resource: redis-slave: exit status 1: Error from server: error when creating "STDIN": service "redis-slave" already exists

2015/11/11 15:37:20 kubetcl failed for resource: redis-slave-rc: exit status 1: Error from server: error when creating "STDIN": replicationControllers "redis-slave-rc" already exists

2015/11/11 15:37:20 resourcifier: create configuration: returning response: status code:400, status:kubetcl failed for resource: redis-master: exit status 1: Error from server: error when creating "STDIN": service "redis-master" already exists

kubetcl failed for resource: redis-master-rc: exit status 1: Error from server: error when creating "STDIN": replicationControllers "redis-master-rc" already exists

kubetcl failed for resource: redis-slave: exit status 1: Error from server: error when creating "STDIN": service "redis-slave" already exists

kubetcl failed for resource: redis-slave-rc: exit status 1: Error from server: error when creating "STDIN": replicationControllers "redis-slave-rc" already exists

::1 - - [11/Nov/2015:15:37:17 -0800] "POST /configurations HTTP/1.1" 400 618 "" "Go-http-client/1.1"

Output parameters

As a Kubernetes user, I can write DM templates that bind output parameters from a resource into input parameters in dependent resources.

Add support for a Github based type registry

Currently, DM knows how to pull types from URLs. It also understands type schemas that contain metadata describing the type, as well as JSON schema describing the format of the input parameters. We should build on these mechanisms to further formalize the notion of a type registry by:

  • making it a Github repo
  • requiring a types directory at the top level containing type definitions
  • requiring a directory within the types directory for each type being defined (e.g., types/redis)
  • requiring a version number directory within a type directory (e.g., types/redis/v1)
  • requiring a type definition file in the version directory (e.g., types/redis/v1/redis.jinja)
  • requiring a schema file in the version directory (e.g., types/redis/v1/redis.jinja.schema)

redis:v1 Example Missing Properties in Expansion

$ dm deploy redis:v1
2015/11/11 11:25:34 cannot deploy template named : status code: 400 status: 400 Bad Request : cannot expand template named (template expansion:expander service response:&{400 Bad Request 400 HTTP/1.1 1 1 map[Date:[Wed, 11 Nov 2015 19:25:34 GMT] Content-Length:[622] Content-Type:[text/plain; charset=utf-8]] 0xc20824e300 622 [] false map[] 0xc208033ad0 }
):
resources:

$ kubectl logs expandybird-rc-dj2di
2015/11/11 19:22:27 expandybird: expand: handling request:POST /expand
2015/11/11 19:22:28 Expansion process: pid: 14 SysTime: 20ms UserTime: 84ms
2015/11/11 19:22:28 expandybird: expand: returning response: status code:400, status:error (error expanding template : Traceback (most recent call last):
File "./expansion/expansion.py", line 372, in
main()
File "./expansion/expansion.py", line 369, in main
print Expand(template, imports, env=env, validate_schema=validate_schema)
File "./expansion/expansion.py", line 57, in Expand
raise ExpansionError('config', str(e))
main.ExpansionError: 'properties' is undefined Resource: config
) expanding template:
&{ resources:

Failed deployments are deleted but leave k8s resources

We delete deployments in the system when they fail, so any k8s resources that may have been deployed are left in the system.

We should not delete the deployment but leave it failed, so that user can issue a delete or update to correct the issue.

Move template registry to its own repository

Currently, the template registry is embedded in this repository. It should be its own repository for several reasons:

  • Make it easier to expose and publicize. As a top level repository, it will be easier to find and access.
  • Establish and maintain the focus of the registry by having no other kind of content in the repository.
  • Make it possible to have different maintainers. People who maintain content contributions should not have to be the same people who maintain code contributions and vice versa.

expand command does not work in dm client

It loads expander locally with incorrect paths.

We may want to remove it and reimplement it as a service call to an expand API in the manager that proxies to expandybird.

Provide a guide for writing type definitions

Given that we want members of the community to contribute type definitions, we should provide a guide that tells them how, instead of leaving it for them to try and figure out on their own.

Persistent configurations

As a Kubernetes user, I see that the configuration artifacts I create using open source DM are persisted in the cluster.

client should support schemas for imported templates

GCP DM has the gcloud CLI which will, for an imported template, also look for and import its schema file and recursively pull in all imports defined within. e.g.,

imports: [foo.py]

may end up passing foo.py, foo.py.schema, and foo-helper.py to the API.

The DM client should also support this.

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.