mirror of https://github.com/helm/helm
commit
0b8b8733c4
@ -1,7 +1,7 @@
|
|||||||
name: alpine
|
name: alpine
|
||||||
description: Deploy a basic Alpine Linux pod
|
description: Deploy a basic Alpine Linux pod
|
||||||
version: 0.1.0
|
version: 0.1.0
|
||||||
home: https://k8s.io/helm
|
home: https://github.com/kubernetes/helm
|
||||||
sources:
|
sources:
|
||||||
- https://github.com/kubernetes/helm
|
- https://github.com/kubernetes/helm
|
||||||
appVersion: 3.3
|
appVersion: 3.3
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
{{/* vim: set filetype=mustache: */}}
|
||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "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).
|
||||||
|
*/}}
|
||||||
|
{{- define "fullname" -}}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
@ -1,26 +1,23 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Pod
|
kind: Pod
|
||||||
metadata:
|
metadata:
|
||||||
name: "{{.Release.Name}}-{{.Values.Name}}"
|
name: {{ template "fullname" . }}
|
||||||
labels:
|
labels:
|
||||||
# The "heritage" label is used to track which tool deployed a given chart.
|
# The "heritage" label is used to track which tool deployed a given chart.
|
||||||
# It is useful for admins who want to see what releases a particular tool
|
# It is useful for admins who want to see what releases a particular tool
|
||||||
# is responsible for.
|
# is responsible for.
|
||||||
heritage: {{.Release.Service | quote }}
|
heritage: {{ .Release.Service }}
|
||||||
# The "release" convention makes it easy to tie a release to all of the
|
# The "release" convention makes it easy to tie a release to all of the
|
||||||
# Kubernetes resources that were created as part of that release.
|
# Kubernetes resources that were created as part of that release.
|
||||||
release: {{.Release.Name | quote }}
|
release: {{ .Release.Name }}
|
||||||
# This makes it easy to audit chart usage.
|
# This makes it easy to audit chart usage.
|
||||||
chart: "{{.Chart.Name}}-{{.Chart.Version}}"
|
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||||
annotations:
|
app: {{ template "name" . }}
|
||||||
"helm.sh/created": {{.Release.Time.Seconds | quote }}
|
|
||||||
spec:
|
spec:
|
||||||
# This shows how to use a simple value. This will look for a passed-in value
|
# This shows how to use a simple value. This will look for a passed-in value called restartPolicy.
|
||||||
# called restartPolicy. If it is not found, it will use the default value.
|
restartPolicy: {{ .Values.restartPolicy }}
|
||||||
# {{default "Never" .restartPolicy}} is a slightly optimized version of the
|
|
||||||
# more conventional syntax: {{.restartPolicy | default "Never"}}
|
|
||||||
restartPolicy: {{default "Never" .Values.restartPolicy}}
|
|
||||||
containers:
|
containers:
|
||||||
- name: waiter
|
- name: waiter
|
||||||
image: "alpine:3.3"
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
command: ["/bin/sleep", "9000"]
|
command: ["/bin/sleep", "9000"]
|
||||||
|
@ -1,2 +1,6 @@
|
|||||||
# The pod name
|
image:
|
||||||
Name: my-alpine
|
repository: alpine
|
||||||
|
tag: 3.3
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
|
restartPolicy: Never
|
||||||
|
@ -1,15 +1,14 @@
|
|||||||
# This is a simple example of using a config map to create a single page
|
# This is a simple example of using a config map to create a single page static site.
|
||||||
# static site.
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ template "fullname" . }}
|
name: {{ template "fullname" . }}
|
||||||
labels:
|
labels:
|
||||||
release: {{ .Release.Name | quote }}
|
heritage: {{ .Release.Service }}
|
||||||
app: {{template "fullname" .}}
|
release: {{ .Release.Name }}
|
||||||
heritage: {{.Release.Service | quote }}
|
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||||
|
app: {{ template "name" . }}
|
||||||
data:
|
data:
|
||||||
# When the config map is mounted as a volume, these will be created as
|
# When the config map is mounted as a volume, these will be created as files.
|
||||||
# files.
|
index.html: {{ .Values.index | quote }}
|
||||||
index.html: {{default "Hello" .Values.index | quote}}
|
|
||||||
test.txt: test
|
test.txt: test
|
||||||
|
@ -0,0 +1,39 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
{{- if .Values.service.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{ toYaml .Values.service.annotations | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
labels:
|
||||||
|
app: {{ template "name" . }}
|
||||||
|
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||||
|
heritage: {{ .Release.Service }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
name: {{ template "fullname" . }}
|
||||||
|
spec:
|
||||||
|
# Provides options for the service so chart users have the full choice
|
||||||
|
type: "{{ .Values.service.type }}"
|
||||||
|
clusterIP: "{{ .Values.service.clusterIP }}"
|
||||||
|
{{- if .Values.service.externalIPs }}
|
||||||
|
externalIPs:
|
||||||
|
{{ toYaml .Values.service.externalIPs | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.service.loadBalancerIP }}
|
||||||
|
loadBalancerIP: "{{ .Values.service.loadBalancerIP }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.service.loadBalancerSourceRanges }}
|
||||||
|
loadBalancerSourceRanges:
|
||||||
|
{{ toYaml .Values.service.loadBalancerSourceRanges | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: {{ .Values.service.port }}
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: http
|
||||||
|
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }}
|
||||||
|
nodePort: {{ .Values.service.nodePort }}
|
||||||
|
{{- end }}
|
||||||
|
selector:
|
||||||
|
app: {{ template "name" . }}
|
||||||
|
release: {{ .Release.Name }}
|
@ -1,18 +0,0 @@
|
|||||||
# This is a service gateway to the replica set created by the deployment.
|
|
||||||
# Take a look at the deployment.yaml for general notes about this chart.
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: {{template "fullname" .}}
|
|
||||||
labels:
|
|
||||||
heritage: {{ .Release.Service | quote }}
|
|
||||||
release: {{ .Release.Name | quote }}
|
|
||||||
chart: "{{.Chart.Name}}-{{.Chart.Version}}"
|
|
||||||
spec:
|
|
||||||
ports:
|
|
||||||
- port: {{default 80 .Values.httpPort}}
|
|
||||||
targetPort: 80
|
|
||||||
protocol: TCP
|
|
||||||
name: http
|
|
||||||
selector:
|
|
||||||
app: {{template "fullname" .}}
|
|
Loading…
Reference in new issue