You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
helm/docs/examples/nginx/templates/deployment.yaml

40 lines
1.4 KiB

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
# This uses a "fullname" template (see _helpers)
# Basing names on .Release.Name means that the same chart can be installed
# multiple times into the same namespace.
name: {{template "fullname" .}}
labels:
heritage: helm
# This makes it easy to search using kubectl
release: {{.Release.Name}}
# This makes it easy to audit chart usage.
chart: {{.Chart.Name}}-{{.Chart.Version}}
spec:
replicas: {{default 1 .replicaCount}}
template:
metadata:
labels:
app: {{template "fullname" .}}
release: {{.Release.Name}}
spec:
containers:
- name: {{template "fullname" .}}
# Making image configurable is not necessary. Making imageTag configurable
# is a nice option for the user. Especially in the strange cases like
# nginx where the base distro is determined by the tag. Using :latest
# is frowned upon, using :stable isn't that great either.
image: "{{default "nginx" .image}}:{{default "stable-alpine" .imageTag}}"
imagePullPolicy: {{default "IfNotPresent" .pullPolicy}}
ports:
- containerPort: 80
# This (and the volumes section below) mount the config map as a volume.
volumeMounts:
- mountPath: /usr/share/nginx/html
name: wwwdata-volume
volumes:
- name: wwwdata-volume
configMap:
name: {{template "fullname" .}}