Testing of common chart
This commit is contained in:
@@ -28,8 +28,12 @@ kubeval:
|
||||
find manifests/ -name '*.yaml' | xargs kubeval --ignore-missing-schemas -v 1.18.0
|
||||
|
||||
test:
|
||||
helm dependency update charts/onechart
|
||||
helm unittest charts/onechart
|
||||
|
||||
helm dependency update charts/cron-job
|
||||
helm unittest charts/cron-job
|
||||
|
||||
helm unittest charts/namespaces
|
||||
|
||||
package:
|
||||
@@ -45,8 +49,13 @@ package:
|
||||
helm repo index docs --url https://chart.onechart.dev
|
||||
|
||||
debug:
|
||||
helm dependency update charts/onechart
|
||||
helm template charts/onechart/ -f values.yaml --debug
|
||||
|
||||
debug-cron-job:
|
||||
helm dependency update charts/cron-job
|
||||
helm template charts/cron-job/ -f values-cron-job.yaml --debug
|
||||
|
||||
debug-ui:
|
||||
#gimlet chart configure -s charts/onechart/values.schema.json -u charts/onechart/helm-ui.json onechart/onechart
|
||||
/home/laszlo/projects/gimlet-cli/build/gimlet chart configure -s charts/onechart/values.schema.json -u charts/onechart/helm-ui.json onechart/onechart
|
||||
|
||||
@@ -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/
|
||||
@@ -0,0 +1,24 @@
|
||||
apiVersion: v2
|
||||
name: common
|
||||
description: A Helm chart for Kubernetes
|
||||
|
||||
# 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: library
|
||||
|
||||
# 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.1.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: "1.16.0"
|
||||
@@ -0,0 +1,15 @@
|
||||
{{- define "common.configmap.tpl" -}}
|
||||
{{- if .Values.vars }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ template "common.robustName" .Release.Name }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "helm-chart.labels" . | nindent 4 }}
|
||||
data:
|
||||
{{- range $key, $val := .Values.vars }}
|
||||
{{ $key }}: {{ $val | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,10 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
|
||||
{{/*
|
||||
Create robustName that can be used as Kubernetes resource name, and as subdomain as well
|
||||
\w – Latin letters, digits, underscore '_' .
|
||||
\W – all but \w .
|
||||
*/}}
|
||||
{{- define "common.robustName" -}}
|
||||
{{ regexReplaceAll "[^0-9A-Za-z_\\.]+" . "-" | replace "_" "-" | lower | trunc 63 | trimSuffix "-" | trimPrefix "-" }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,6 @@
|
||||
dependencies:
|
||||
- name: common
|
||||
repository: file://../common
|
||||
version: 0.1.0
|
||||
digest: sha256:636a65e9846bdff17cc4e65b0849061f783759a37aa51fb85ff6fd8ba5e68467
|
||||
generated: "2021-08-05T10:18:17.533366128+02:00"
|
||||
@@ -16,3 +16,8 @@ type: application
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.1.2
|
||||
|
||||
dependencies:
|
||||
- name: common
|
||||
version: 0.1.0
|
||||
repository: file://../common
|
||||
|
||||
Binary file not shown.
@@ -1,13 +1 @@
|
||||
{{- if .Values.vars }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ .Release.Name }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "helm-chart.labels" . | nindent 4 }}
|
||||
data:
|
||||
{{- range $key, $val := .Values.vars }}
|
||||
{{ $key }}: {{ $val | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- include "common.configmap.tpl" . -}}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
dependencies:
|
||||
- name: common
|
||||
repository: file://../common
|
||||
version: 0.1.0
|
||||
digest: sha256:636a65e9846bdff17cc4e65b0849061f783759a37aa51fb85ff6fd8ba5e68467
|
||||
generated: "2021-08-05T10:39:10.053810673+02:00"
|
||||
@@ -16,3 +16,8 @@ type: application
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.27.0
|
||||
|
||||
dependencies:
|
||||
- name: common
|
||||
version: 0.1.0
|
||||
repository: file://../common
|
||||
|
||||
Binary file not shown.
@@ -1,13 +1 @@
|
||||
{{- if .Values.vars }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ template "robustName" .Release.Name }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "helm-chart.labels" . | nindent 4 }}
|
||||
data:
|
||||
{{- range $key, $val := .Values.vars }}
|
||||
{{ $key }}: {{ $val | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- include "common.configmap.tpl" . -}}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
image:
|
||||
repository: debian
|
||||
tag: stable-slim
|
||||
|
||||
schedule: "*/1 * * * *"
|
||||
command: |
|
||||
echo "I'm alive"
|
||||
shell: "/bin/sh"
|
||||
|
||||
vars:
|
||||
MY_VAR: "value"
|
||||
@@ -12,3 +12,6 @@ ingresses:
|
||||
|
||||
gitRepository: github.com/laszlocph/demo-app
|
||||
gitSha: xyz
|
||||
|
||||
vars:
|
||||
MY_VAR: "value"
|
||||
|
||||
Reference in New Issue
Block a user