mirror of https://github.com/helm/helm
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.
60 lines
2.5 KiB
60 lines
2.5 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 "nginx.fullname" . }}
|
|
labels:
|
|
# The "app.kubernetes.io/managed-by" 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.
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
# The "app.kubernetes.io/instance" convention makes it easy to tie a release
|
|
# to all of the Kubernetes resources that were created as part of that
|
|
# release.
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
# This makes it easy to audit chart usage.
|
|
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
|
app.kubernetes.io/name: {{ template "nginx.name" . }}
|
|
spec:
|
|
replicas: {{ .Values.replicaCount }}
|
|
template:
|
|
metadata:
|
|
{{- if .Values.podAnnotations }}
|
|
# Allows custom annotations to be specified
|
|
annotations:
|
|
{{- toYaml .Values.podAnnotations | nindent 8 }}
|
|
{{- end }}
|
|
labels:
|
|
app.kubernetes.io/name: {{ template "nginx.name" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
spec:
|
|
containers:
|
|
- name: {{ template "nginx.name" . }}
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
ports:
|
|
- name: http
|
|
containerPort: 80
|
|
protocol: TCP
|
|
# This (and the volumes section below) mount the config map as a volume.
|
|
volumeMounts:
|
|
- mountPath: /usr/share/nginx/html
|
|
name: wwwdata-volume
|
|
resources:
|
|
# Allow chart users to specify resources. Usually, no default should
|
|
# be set, so this is left to be a conscious choice to the chart
|
|
# users and avoids that charts don't run out of the box on, e. g.,
|
|
# Minikube when high resource requests are specified by default.
|
|
{{- toYaml .Values.resources | nindent 12 }}
|
|
{{- if .Values.nodeSelector }}
|
|
nodeSelector:
|
|
# Node selectors can be important on mixed Windows/Linux clusters.
|
|
{{- toYaml .Values.nodeSelector | nindent 8 }}
|
|
{{- end }}
|
|
volumes:
|
|
- name: wwwdata-volume
|
|
configMap:
|
|
name: {{ template "nginx.fullname" . }}
|