Skip to content

Commit

Permalink
feat(deployments) add Helm chart for kuma (#916)
Browse files Browse the repository at this point in the history
Chart
Add a Helm chart (compatible with Helm 3) for the Kuma Control Plane. This initial Helm chart is hard-coded but we would like to eventually merge the `kumactl` install commands with generating charts.

Based on `kumactl` install control-plane, this chart parameterizes all the possible flags and supports CNI, installing CRDs, and all modes.

CI/CD
Use helm/chart-releaser to publish charts to GitHub Releases and then host them on the gh-pages branch.


* feat(deployments) add Helm chart for kuma

* ci(helm) add Helm 3 to install dev tools

* test(e2e) add Helm tests

* ci(helm) release charts with chart-releaser

* fix(test) helm chart path constant

* fix(test) helm test use Build version for images

* feat(deployments) rename kuma-cp chart to kuma

* docs(deployments) update kuma chart README

Signed-off-by: austin ce <[email protected]>

Co-authored-by: Nikolay Nikolaev <[email protected]>
  • Loading branch information
austince and Nikolay Nikolaev authored Jul 31, 2020
1 parent 62d8318 commit 7a6d6dd
Show file tree
Hide file tree
Showing 44 changed files with 6,648 additions and 28 deletions.
43 changes: 39 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ reusable:
tags:
only: /.*/

# filters for the kuma-commit workflow
commit_workflow_filters: &commit_workflow_filters
filters:
branches:
# don't run on gh-pages
ignore: /gh-pages/

executors:
golang:
docker:
Expand Down Expand Up @@ -525,6 +532,14 @@ jobs:
curl -L -o /tmp/docker-$VER.tgz https://download.docker.com/linux/static/stable/x86_64/docker-$VER.tgz
tar -xz -C /tmp -f /tmp/docker-$VER.tgz
mv /tmp/docker/docker /usr/bin
- run:
name: "Install Helm Chart Releaser"
command: |
VER="1.0.0-beta.1"
curl -L -o /tmp/cr-$VER.tgz https://github.com/helm/chart-releaser/releases/download/v$VER/chart-releaser_$VER_linux_amd64.tar.gz
mkdir -p /tmp/cr
tar -xz -C /tmp/cr -f /tmp/cr-$VER.tgz
mv /tmp/cr/cr /usr/bin
- run:
name: Build Packages
command: ./tools/releases/distros.sh --package --version $CIRCLE_TAG --sha $CIRCLE_SHA1
Expand All @@ -537,6 +552,12 @@ jobs:
- run:
name: Push Docker
command: ./tools/releases/docker.sh --push --version $CIRCLE_TAG
- run:
name: Package Helm Charts
command: ./tools/releases/helm.sh --package --version $CIRCLE_TAG --sha $CIRCLE_SHA1
# - run:
# name: Release Helm Charts
# command: ./tools/releases/helm.sh --release --version $CIRCLE_TAG --sha $CIRCLE_SHA1

#
# Below, the tag filter needs to be in all jobs
Expand All @@ -550,79 +571,93 @@ workflows:
version: 2
kuma-commit:
jobs:
- dev_golang
- dev_mac
- dev_ubuntu
- go_cache
- dev_golang: *commit_workflow_filters
- dev_mac: *commit_workflow_filters
- dev_ubuntu: *commit_workflow_filters
- go_cache: *commit_workflow_filters
- api_check:
<<: *commit_workflow_filters
requires:
- go_cache
- check:
<<: *commit_workflow_filters
requires:
- go_cache
- build:
<<: *commit_workflow_filters
requires:
- go_cache
- test:
<<: *commit_workflow_filters
requires:
- api_check
- check
- integration:
<<: *commit_workflow_filters
requires:
- api_check
- check
- images:
<<: *commit_workflow_filters
requires:
- build
- example_docker-compose:
<<: *commit_workflow_filters
name: docker-compose
requires:
- images
# custom parameters
use_local_kuma_images: true
- example_minikube:
<<: *commit_workflow_filters
name: minikube_v1_13
requires:
- images
# custom parameters
kubernetes_version: v1.13.12
use_local_kuma_images: true
- example_minikube:
<<: *commit_workflow_filters
name: minikube_v1_14
requires:
- images
# custom parameters
kubernetes_version: v1.14.10
use_local_kuma_images: true
- example_minikube:
<<: *commit_workflow_filters
name: minikube_v1_15
requires:
- images
# custom parameters
kubernetes_version: v1.15.11
use_local_kuma_images: true
- example_minikube:
<<: *commit_workflow_filters
name: minikube_v1_16
requires:
- images
# custom parameters
kubernetes_version: v1.16.13
use_local_kuma_images: true
- example_minikube:
<<: *commit_workflow_filters
name: minikube_v1_17
requires:
- images
# custom parameters
kubernetes_version: v1.17.9
use_local_kuma_images: true
- example_minikube:
<<: *commit_workflow_filters
name: minikube_v1_18
requires:
- images
# custom parameters
kubernetes_version: v1.18.6
use_local_kuma_images: true
- integration:
<<: *commit_workflow_filters
name: test/e2e
requires:
- images
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ build/

# macOS
.DS_Store

# Release artifacts
.cr-release-packages
2 changes: 2 additions & 0 deletions deployments/charts/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Local Helm values
**/*.*values.yaml
7 changes: 7 additions & 0 deletions deployments/charts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Kuma Helm Charts

In addition to the `kumactl install` command, Kuma offers a set of Helm charts to install
Kuma on Kubernetes.

These charts are compatible with Helm 3+.

23 changes: 23 additions & 0 deletions deployments/charts/kuma/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
11 changes: 11 additions & 0 deletions deployments/charts/kuma/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v2
name: kuma
description: A Helm chart for the Kuma Control Plane
type: application
version: 0.1.0
appVersion: 0.7.0
home: https://github.com/kumahq/kuma
icon: https://kuma.io/images/brand/kuma-logo-new.svg
keywords:
- service mesh
- control plane
51 changes: 51 additions & 0 deletions deployments/charts/kuma/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[![][kuma-logo]][kuma-url]

# kuma

The kuma chart supports all the features and options provided by `kumactl install control-plane`.
The chart supports Helm v3+.

## Values

| Parameter | Description | Default |
|---------------------------------------------|-----------------------------------------------------------------------------------|--------------------------------------|
| `global.image.registry` | Default registry for all Kuma images | `kong-docker-kuma-docker.bintray.io` |
| `global.image.tag` | Default tag for all Kuma images | nil, defaults to Chart.AppVersion |
| `patchSystemNamespace` | Patch the release namespace with the Kuma system label | `true` |
| `controlPlane.logLevel` | Kuma CP log level: one of off\|info\|debug | `info` |
| `controlPlane.mode` | Kuma CP modes: one of standalone\|remote\|global | `standalone` |
| `controlPlane.zone` | Kuma zone name | nil |
| `controlPlane.kdsGlobalAddress` | URL of Global Kuma CP | |
| `controlPlane.useNodePort` | Use NodePort instead of LoadBalancer | `false` |
| `controlPlane.injectorFailurePolicy` | Failure policy of the mutating webhook implemented by the Kuma Injector component | `Ignore` |
| `controlPlane.service.name` | Service name of the Kuma Control Plane | nil |
| `controlPlane.service.type` | Service type of the Kuma Control Plane | ClusterIP |
| `controlPlane.defaults.skipMeshCreation` | Whether or not to skip creating the default Mesh | `true` |
| `controlPlane.resources` | The K8s resources spec for Kuma CP | nil, differs based on mode |
| `controlPlane.tls.{admission,sds,kds}.cert` | TLS certificate for the Admission, SDS, and KDS servers, respectively | nil, generated and self-signed |
| `controlPlane.tls.{admission,sds,kds}.key` | TLS key for the Admission, SDS, and KDS servers, respectively | nil, generated and self-signed |
| `controlPlane.imagePullPolicy` | Kuma CP ImagePullPolicy | `IfNotPresent` |
| `controlPlane.image.registry` | Kuma CP image registry | nil, uses global |
| `controlPlane.image.repository` | Kuma CP image repository | `kuma-cp` |
| `controlPlane.image.tag` | Kuma CP image tag | nil, uses global |
| `cni.enabled` | Install Kuma with CNI instead of proxy init container | `false` |
| `cni.logLevel` | CNI log level: one of off\|info\|debug | `info` |
| `cni.image.registry` | CNI image registry | `docker.io` |
| `cni.image.repository` | CNI image repository | `lobkovilya/install-cni` |
| `cni.image.tag` | The CNI image tag | `0.0.1` |
| `dataPlane.image.registry` | The Kuma DP image registry | nil, uses global |
| `dataPlane.image.repository` | The Kuma DP image repository | `kuma-cp` |
| `dataPlane.image.tag` | The Kuma DP image tag | nil, uses global |
| `dataPlane.initImage.registry` | The Kuma DP init image registry | nil, uses global |
| `dataPlane.initImage.repository` | The Kuma DP init image repository | `kuma-init` |
| `dataPlane.initImage.tag` | The Kuma DP init image tag | nil, uses global |

## Custom Resource Definitions

All Kuma CRDs are loaded via the [`crds`](crds) directory. For more detailed information on CRDs and Helm,
please refer to [the Helm documentation][helm-crd].


[kuma-url]: https://kuma.io/
[kuma-logo]: https://kuma-public-assets.s3.amazonaws.com/kuma-logo-v2.png
[helm-crd]: https://helm.sh/docs/chart_best_practices/custom_resource_definitions/
Loading

0 comments on commit 7a6d6dd

Please sign in to comment.