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: # 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 }} # 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 }} # This makes it easy to audit chart usage. chart: {{ .Chart.Name }}-{{ .Chart.Version }} app: {{ template "name" . }} spec: replicas: {{ .Values.replicaCount }} template: metadata: {{- if .Values.podAnnotations }} # Allows custom annotations to be specified annotations: {{ toYaml .Values.podAnnotations | indent 8 }} {{- end }} labels: app: {{ template "name" . }} release: {{ .Release.Name }} spec: containers: - name: {{ template "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 | indent 12 }} {{- if .Values.nodeSelector }} nodeSelector: # Node selectors can be important on mixed Windows/Linux clusters. {{ toYaml .Values.nodeSelector | indent 8 }} {{- end }} volumes: - name: wwwdata-volume configMap: name: {{ template "fullname" . }}