initial commit
This commit is contained in:
26
helm/.helmignore
Normal file
26
helm/.helmignore
Normal file
@@ -0,0 +1,26 @@
|
||||
# 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
|
||||
.vscode/
|
||||
# img folder
|
||||
img/
|
||||
# Changelog
|
||||
CHANGELOG.md
|
||||
12
helm/Chart.yaml
Normal file
12
helm/Chart.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
# Always have the same value for appVersion and version.
|
||||
apiVersion: v2
|
||||
appVersion: 0.1.0
|
||||
description: A Library Helm Chart for grouping common logic between bitnami charts. This chart is not deployable by itself.
|
||||
keywords:
|
||||
- common
|
||||
- helper
|
||||
- template
|
||||
- function
|
||||
name: common
|
||||
type: library
|
||||
version: 0.1.0
|
||||
15
helm/templates/_labels.tpl
Normal file
15
helm/templates/_labels.tpl
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
{{- define "common.labels.standard" }}
|
||||
app.kubernetes.io/name: {{ include "common.names.name" . }}
|
||||
helm.sh/chart: {{ include "common.names.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- with .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "common.labels.matchLabels" }}
|
||||
app.kubernetes.io/name: {{ include "common.names.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
31
helm/templates/_names.tpl
Normal file
31
helm/templates/_names.tpl
Normal file
@@ -0,0 +1,31 @@
|
||||
{{/* We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). */}}
|
||||
|
||||
{{- define "common.names.chart" }}
|
||||
{{ printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "common.names.name" }}
|
||||
{{ default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "common.names.namespace" }}
|
||||
{{ default .Release.Namespace .Values.namespaceOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "common.names.fullname" }}
|
||||
{{- if .Values.fullnameOverride }}
|
||||
{{ .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{ $name := default .Chart.Name .Values.nameOverride }}
|
||||
{{- $releaseName := regexReplaceAll "(-?[^a-z\\d\\-])+-?" (lower .Release.Name) "-" }}
|
||||
{{- if contains $name $releaseName }}
|
||||
{{ $releaseName | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{ printf "%s-%s" $releaseName $name | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "common.names.fullname.namespace" }}
|
||||
{{ printf "%s-%s" (include "common.names.fullname" .) (include "common.names.namespace" .) | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user