提交 71ef54ad 编写于 作者: 阳明的博客's avatar 阳明的博客

[add] mychart helm chart

上级 05f61b1b
apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: mychart
version: 0.1.0
\ No newline at end of file
Thank you for installing {{ .Chart.Name }}.
Your release is named {{ .Release.Name }}.
To learn more about the release, try:
$ helm status {{ .Release.Name }}
$ helm get {{ .Release.Name }}
\ No newline at end of file
{{/* 生成基本的lables标签 */}}
{{- define "mychart.labels" }}
from: helm
date: {{ now | htmlDate }}
chart: {{ .Chart.Name }}
version: {{ .Chart.Version }}
{{- end }}
\ No newline at end of file
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-configmap
labels:
{{- include "mychart.labels" . | indent 4}}
data:
app: mychart
myvalue: {{ .Values.hello | default "Hello World" | quote }}
{{- $releaseName := .Release.Name }}
{{- with .Values.course }}
k8s: {{ .k8s | upper | quote }}
python: {{ .python | repeat 5 | quote }}
release: {{ $releaseName }}
{{- if eq .python "django" }}
web: true
{{- end }}
{{- end }}
courselist:
{{- range $index, $course := .Values.courselist }}
- {{ $index }}: {{ $course | title | quote }}
{{- end }}
{{- range $key, $val := .Values.course }}
{{ $key }}: {{ $val | upper | quote }}
{{- end }}
{{- include "mychart.labels" . | indent 2 }}
\ No newline at end of file
course:
k8s: devops
python: django
courselist:
- k8s
- python
- search
- golang
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册