Skip to content

Commit

Permalink
Update keptn Helm chart (#107)
Browse files Browse the repository at this point in the history
Co-authored-by: mowies <[email protected]>
  • Loading branch information
keptn-bot and mowies authored Oct 31, 2023
1 parent 1686968 commit a64b07e
Show file tree
Hide file tree
Showing 8 changed files with 266 additions and 0 deletions.
1 change: 1 addition & 0 deletions charts/keptn/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
charts/*.tgz
23 changes: 23 additions & 0 deletions charts/keptn/.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/
12 changes: 12 additions & 0 deletions charts/keptn/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
dependencies:
- name: keptn-cert-manager
repository: https://charts.lifecycle.keptn.sh
version: 0.2.0
- name: keptn-lifecycle-operator
repository: https://charts.lifecycle.keptn.sh
version: 0.1.0
- name: keptn-metrics-operator
repository: https://charts.lifecycle.keptn.sh
version: 0.1.0
digest: sha256:170beda719610c8985113a4d13fe61cacadf8543c6566d3c5ca436e03d648522
generated: "2023-10-31T15:49:17.358165748+01:00"
71 changes: 71 additions & 0 deletions charts/keptn/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
apiVersion: v2
name: keptn
description: A Helm chart for Keptn Lifecycle Toolkit, a set of tools to enable cloud-native application lifecycle management
icon: "https://raw.githubusercontent.com/cncf/artwork/master/projects/keptn/icon/color/keptn-icon-color.svg"
home: https://keptn.sh
sources:
- "https://github.com/keptn/lifecycle-toolkit"
keywords:
- cloud-native
- lifecycle
- lifecycle-management
- application-lifecycle
- application-lifecycle-management
- orchestration
- keptn
- operator
- pre-deployment
- post-deployment
- metrics
- analysis
- evaluation
- certificate
annotations:
artifacthub.io/links: |
- name: support
url: https://github.com/keptn/lifecycle-toolkit/issues/new
- name: community
url: https://slack.keptn.sh/
artifacthub.io/license: "Apache-2.0"
artifacthub.io/operator: "true"
artifacthub.io/operatorCapabilities: "Full Lifecycle"

kubeVersion: ">= 1.24.0-0"
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.3.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "v0.9.0" # x-release-please-version

dependencies:
- name: keptn-cert-manager
version: 0.2.0
alias: certManager
condition: certManager.enabled
repository: "https://charts.lifecycle.keptn.sh"
- name: keptn-lifecycle-operator
version: 0.1.0
alias: lifecycleOperator
condition: lifecycleOperator.enabled
repository: "https://charts.lifecycle.keptn.sh"
- name: keptn-metrics-operator
version: 0.1.0
alias: metricsOperator
condition: metricsOperator.enabled
repository: "https://charts.lifecycle.keptn.sh"
# TODO: change repository links to released ones once the charts get their first release
29 changes: 29 additions & 0 deletions charts/keptn/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
CHART NAME: {{ .Chart.Name }}
CHART VERSION: {{ .Chart.Version }}
KEPTN VERSION: {{ .Chart.AppVersion }}

** Please be patient while the chart is being deployed **

The following controllers have been deployed:

{{- if .Values.certManager.enabled }}
- keptn-cert-manager
{{- end }}
{{- if .Values.lifecycleOperator.enabled }}
- keptn-lifecycle-operator
{{- end }}
{{- if .Values.metricsOperator.enabled }}
- keptn-metrics-operator
{{- end }}

Check the status of the pods by running this command:

kubectl get pods --namespace {{ include "common.names.namespace" . | quote }} -l app.kubernetes.io/instance={{ .Release.Name }}

Read the keptn documentation to start working with the controllers:

https://lifecycle.keptn.sh/

For any bug and issues, use:

https://github.com/keptn/lifecycle-toolkit/issues
25 changes: 25 additions & 0 deletions charts/keptn/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Keptn Helm Chart

Keptn provides a “cloud-native” approach for managing the application release lifecycle
metrics, observability, health checks, with pre- and post-deployment evaluations and tasks.

<!-- markdownlint-disable MD012 -->

## Parameters

### Keptn

| Name | Description | Value |
| --------------------------- | ------------------------------------------------------ | ------ |
| `certManager.enabled` | Enable this value to install Keptn Certificate Manager | `true` |
| `lifecycleOperator.enabled` | Enable this value to install Keptn Lifecycle Operator | `true` |
| `metricsOperator.enabled` | Enable this value to install Keptn Metrics Operator | `true` |

### Global parameters

| Name | Description | Value |
| -------------------------- | ------------------------------------------------------------------------- | ----- |
| `global.imageRegistry` | Global Docker image registry | `""` |
| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` |
| `global.commonLabels` | Common annotations to add to all Keptn resources. Evaluated as a template | `{}` |
| `global.commonAnnotations` | Common annotations to add to all Keptn resources. Evaluated as a template | `{}` |
75 changes: 75 additions & 0 deletions charts/keptn/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "keptn.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 "keptn.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 "keptn.chart" -}}
{{- printf "%s-%s" (kebabcase .Chart.Name) .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "keptn.labels" -}}
helm.sh/chart: {{ include "keptn.chart" . }}
{{ include "keptn.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "keptn.selectorLabels" -}}
app.kubernetes.io/name: {{ kebabcase (include "keptn.name" .) }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "keptn.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "keptn.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

{{/*
Renders a value that contains template.
Usage:
{{ include "tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $) }}
*/}}
{{- define "tplvalues.render" -}}
{{- if typeIs "string" .value }}
{{- tpl .value .context }}
{{- else }}
{{- tpl (.value | toYaml) .context }}
{{- end }}
{{- end -}}
30 changes: 30 additions & 0 deletions charts/keptn/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## @section Keptn
certManager:
## @param certManager.enabled Enable this value to install Keptn Certificate Manager
enabled: true
lifecycleOperator:
## @param lifecycleOperator.enabled Enable this value to install Keptn Lifecycle Operator
enabled: true
metricsOperator:
## @param metricsOperator.enabled Enable this value to install Keptn Metrics Operator
enabled: true

## @section Global parameters
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
## Current available global Docker image parameters: imageRegistry, imagePullSecrets and storageClass
##

global:
## @param global.imageRegistry Global Docker image registry
imageRegistry: ""

## @param global.imagePullSecrets Global Docker registry secret names as an array
## E.g.
## imagePullSecrets:
## - myRegistryKeySecretName
##
imagePullSecrets: []
## @param global.commonLabels Common annotations to add to all Keptn resources. Evaluated as a template
commonLabels: {}
## @param global.commonAnnotations Common annotations to add to all Keptn resources. Evaluated as a template
commonAnnotations: {}

0 comments on commit a64b07e

Please sign in to comment.