mirror of https://github.com/helm/helm
commit
0b8b8733c4
@ -1,7 +1,7 @@
|
||||
name: alpine
|
||||
description: Deploy a basic Alpine Linux pod
|
||||
version: 0.1.0
|
||||
home: https://k8s.io/helm
|
||||
home: https://github.com/kubernetes/helm
|
||||
sources:
|
||||
- https://github.com/kubernetes/helm
|
||||
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
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: "{{.Release.Name}}-{{.Values.Name}}"
|
||||
name: {{ template "fullname" . }}
|
||||
labels:
|
||||
# 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
|
||||
# is responsible for.
|
||||
heritage: {{.Release.Service | quote }}
|
||||
heritage: {{ .Release.Service }}
|
||||
# The "release" convention makes it easy to tie a release to all of the
|
||||
# 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.
|
||||
chart: "{{.Chart.Name}}-{{.Chart.Version}}"
|
||||
annotations:
|
||||
"helm.sh/created": {{.Release.Time.Seconds | quote }}
|
||||
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||
app: {{ template "name" . }}
|
||||
spec:
|
||||
# This shows how to use a simple value. This will look for a passed-in value
|
||||
# called restartPolicy. If it is not found, it will use the default value.
|
||||
# {{default "Never" .restartPolicy}} is a slightly optimized version of the
|
||||
# more conventional syntax: {{.restartPolicy | default "Never"}}
|
||||
restartPolicy: {{default "Never" .Values.restartPolicy}}
|
||||
# This shows how to use a simple value. This will look for a passed-in value called restartPolicy.
|
||||
restartPolicy: {{ .Values.restartPolicy }}
|
||||
containers:
|
||||
- name: waiter
|
||||
image: "alpine:3.3"
|
||||
command: ["/bin/sleep","9000"]
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command: ["/bin/sleep", "9000"]
|
||||
|
@ -1,2 +1,6 @@
|
||||
# The pod name
|
||||
Name: my-alpine
|
||||
image:
|
||||
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
|
||||
# static site.
|
||||
# This is a simple example of using a config map to create a single page static site.
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{template "fullname" .}}
|
||||
name: {{ template "fullname" . }}
|
||||
labels:
|
||||
release: {{ .Release.Name | quote }}
|
||||
app: {{template "fullname" .}}
|
||||
heritage: {{.Release.Service | quote }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||
app: {{ template "name" . }}
|
||||
data:
|
||||
# When the config map is mounted as a volume, these will be created as
|
||||
# files.
|
||||
index.html: {{default "Hello" .Values.index | quote}}
|
||||
# When the config map is mounted as a volume, these will be created as files.
|
||||
index.html: {{ .Values.index | quote }}
|
||||
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