github.com/Beeketing/helm@v2.12.1+incompatible/docs/examples/nginx/templates/deployment.yaml (about)

     1  apiVersion: extensions/v1beta1
     2  kind: Deployment
     3  metadata:
     4    # This uses a "fullname" template (see _helpers)
     5    # Basing names on .Release.Name means that the same chart can be installed
     6    # multiple times into the same namespace.
     7    name: {{ template "nginx.fullname" . }}
     8    labels:
     9      # The "app.kubernetes.io/managed-by" label is used to track which tool
    10      # deployed a given chart. It is useful for admins who want to see what
    11      # releases a particular tool is responsible for.
    12      app.kubernetes.io/managed-by: {{ .Release.Service }}
    13      # The "app.kubernetes.io/instance" convention makes it easy to tie a release
    14      # to all of the Kubernetes resources that were created as part of that
    15      # release.
    16      app.kubernetes.io/instance: {{ .Release.Name }}
    17      # This makes it easy to audit chart usage.
    18      helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
    19      app.kubernetes.io/name: {{ template "nginx.name" . }}
    20  spec:
    21    replicas: {{ .Values.replicaCount }}
    22    template:
    23      metadata:
    24        {{- if .Values.podAnnotations }}
    25        # Allows custom annotations to be specified
    26        annotations:
    27          {{- toYaml .Values.podAnnotations | nindent 8 }}
    28        {{- end }}
    29        labels:
    30          app.kubernetes.io/name: {{ template "nginx.name" . }}
    31          app.kubernetes.io/instance: {{ .Release.Name }}
    32      spec:
    33        containers:
    34          - name: {{ template "nginx.name" . }}
    35            image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
    36            imagePullPolicy: {{ .Values.image.pullPolicy }}
    37            ports:
    38              - name: http
    39                containerPort: 80
    40                protocol: TCP
    41            # This (and the volumes section below) mount the config map as a volume.
    42            volumeMounts:
    43              - mountPath: /usr/share/nginx/html
    44                name: wwwdata-volume
    45            resources:
    46              # Allow chart users to specify resources. Usually, no default should
    47              # be set, so this is left to be a conscious choice to the chart
    48              # users and avoids that charts don't run out of the box on, e. g.,
    49              # Minikube when high resource requests are specified by default.
    50              {{- toYaml .Values.resources | nindent 12 }}
    51        {{- if .Values.nodeSelector }}
    52        nodeSelector:
    53          # Node selectors can be important on mixed Windows/Linux clusters.
    54          {{- toYaml .Values.nodeSelector | nindent 8 }}
    55        {{- end }}
    56        volumes:
    57          - name: wwwdata-volume
    58            configMap:
    59              name: {{ template "nginx.fullname" . }}