mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
New helm chart for kanister-operator (#3406)
* New helm chart for kanister-operator * Trailing whitespaces fix * making rbac.service_account consistent across all files * miving to stable per suggecstion in PR's comments * updating README incubator->stable * Updating kanister-operator release version * fixing incorrect value name. * Adding appVersion, source and github usernames for maintainers * updating _helpers.tpl to use namespace functions updating all function calls * bring rbac configuration to the latest best practices * fixing typos * adding missing new line * tables->table there is only one table * default image tag 0.2.0 -> v0.2.0 * addressing requested review changes serviceAccount is getting it's own file minimal version 1.8+ chart template into chart label apps/v1beta2 for Deployment
This commit is contained in:
committed by
k8s-ci-robot
parent
76acc43b9d
commit
6ae37ee184
@@ -0,0 +1,21 @@
|
||||
# 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
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
@@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
description: Kanister-operator Helm chart for Kubernetes
|
||||
name: kanister-operator
|
||||
version: 0.2.0
|
||||
home: https://kanister.io/
|
||||
maintainers:
|
||||
- email: ilya@kasten.io
|
||||
name: depohmel
|
||||
- email: tom@kasten.io
|
||||
name: tdmanv
|
||||
icon: https://avatars3.githubusercontent.com/u/30535216?s=200&v=4
|
||||
appVersion: 0.2.0
|
||||
source: https://github.com/kanisterio/kanister
|
||||
@@ -0,0 +1,63 @@
|
||||
# kanister-operator
|
||||
|
||||
[kanister-operator](https://github.com/kanisterio/kanister) is a Kubernetes operator for Kanister framework.
|
||||
|
||||
Kanister is a framework that enables application-level data management on Kubernetes. It allows domain experts to capture application specific data management tasks via blueprints, which can be easily shared and extended. The framework takes care of the tedious details surrounding execution on Kubernetes and presents a homogeneous operational experience across applications at scale.
|
||||
|
||||
## TL;DR;
|
||||
|
||||
```console
|
||||
$ helm install stable/kanister-operator
|
||||
```
|
||||
|
||||
## Introduction
|
||||
|
||||
This chart bootstraps a kanister-operator deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
|
||||
|
||||
## Prerequisites
|
||||
- Kubernetes 1.8+ with Beta APIs enabled
|
||||
|
||||
## Installing the Chart
|
||||
|
||||
To install the chart with the release name `my-release`:
|
||||
|
||||
```console
|
||||
$ helm install --name my-release stable/kanister-operator
|
||||
```
|
||||
|
||||
The command deploys kanister-operator on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
|
||||
|
||||
> **Tip**: List all releases using `helm list`
|
||||
|
||||
## Uninstalling the Chart
|
||||
|
||||
To uninstall/delete the `my-release` deployment:
|
||||
|
||||
```console
|
||||
$ helm delete my-release
|
||||
```
|
||||
|
||||
The command removes all the Kubernetes components associated with the chart and deletes the release.
|
||||
|
||||
## Configuration
|
||||
|
||||
The following table lists the configurable parameters of the nginx-ingress chart and their default values.
|
||||
|
||||
Parameter | Description | Default
|
||||
--- | --- | ---
|
||||
`rbac.create` | all required roles and SA will be created | `true`
|
||||
`serviceAccount.create`| specify if SA will be created | `true`
|
||||
`serviceAccount.name`| porvided service account name will be used | `None`
|
||||
`image.repository` | controller container image repository | `kanisterio/controller`
|
||||
`image.tag` | controller container image tag | `v0.2.0`
|
||||
`image.pullPolicy` | controller container image pull policy | `IfNotPresent`
|
||||
`resources` | k8s pod resorces | `None`
|
||||
|
||||
Specify each parameter you'd like to override using a YAML file as described above in the [installation](#Installing the Chart) section.
|
||||
|
||||
You can also specify any non-array parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||
|
||||
```console
|
||||
$ helm install stable/kanister-operator --name my-release \
|
||||
--set rbac.create=false
|
||||
```
|
||||
@@ -0,0 +1,9 @@
|
||||
Kanister-operator is installed.
|
||||
|
||||
Getting Started is available: https://github.com/kanisterio/kanister
|
||||
|
||||
Documentation is available: https://docs.kanister.io/
|
||||
|
||||
Please report any issues: https://github.com/kanisterio/kanister/issues
|
||||
|
||||
Thank you for trying Kanister.
|
||||
@@ -0,0 +1,51 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "kanister-operator.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "kanister-operator.fullname" -}}
|
||||
{{- if .Values.fullnameOverride -}}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- if contains $name .Release.Name -}}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "kanister-operator.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Helm required labels */}}
|
||||
{{- define "kanister-operator.helmLabels" -}}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
chart: {{ template "kanister-operator.chart" . }}
|
||||
app: {{ template "kanister-operator.name" . }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "kanister-operator.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create -}}
|
||||
{{ default (include "kanister-operator.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else -}}
|
||||
{{ default "default" .Values.serviceAccount.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,22 @@
|
||||
apiVersion: apps/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "kanister-operator.fullname" . }}
|
||||
labels:
|
||||
{{ include "kanister-operator.helmLabels" . | indent 4 }}
|
||||
spec:
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{ include "kanister-operator.helmLabels" . | indent 8}}
|
||||
spec:
|
||||
serviceAccountName: {{ template "kanister-operator.serviceAccountName" . }}
|
||||
containers:
|
||||
- name: {{ template "kanister-operator.fullname" . }}
|
||||
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.resources }}
|
||||
resources:
|
||||
{{ toYaml .Values.resources | indent 12 }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,45 @@
|
||||
{{- if .Values.rbac.create }}
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
metadata:
|
||||
labels:
|
||||
{{ include "kanister-operator.helmLabels" . | indent 4 }}
|
||||
name: {{ template "kanister-operator.fullname" . }}-cluster-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- cr.kanister.io
|
||||
resources:
|
||||
- "*"
|
||||
verbs:
|
||||
- "*"
|
||||
---
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
metadata:
|
||||
labels:
|
||||
{{ include "kanister-operator.helmLabels" . | indent 4 }}
|
||||
name: {{ template "kanister-operator.fullname" . }}-edit-role
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: edit
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "kanister-operator.serviceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
---
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
metadata:
|
||||
labels:
|
||||
{{ include "kanister-operator.helmLabels" . | indent 4 }}
|
||||
name: {{ template "kanister-operator.fullname" . }}-cr-role
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: {{ template "kanister-operator.fullname" . }}-cluster-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "kanister-operator.serviceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,8 @@
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
labels:
|
||||
{{ include "kanister-operator.helmLabels" . | indent 4 }}
|
||||
name: {{ template "kanister-operator.serviceAccountName" . }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,24 @@
|
||||
# Default values for kanister-operator.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
image:
|
||||
repository: kanisterio/controller
|
||||
tag: v0.2.0
|
||||
pullPolicy: IfNotPresent
|
||||
rbac:
|
||||
create: true
|
||||
serviceAccount:
|
||||
create: true
|
||||
name:
|
||||
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
Reference in New Issue
Block a user