github.com/zoumo/helm@v2.5.0+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 "fullname" .}}
     8    labels:
     9      # The "heritage" label is used to track which tool deployed a given chart.
    10      # It is useful for admins who want to see what releases a particular tool
    11      # is responsible for.
    12      heritage: {{ .Release.Service | quote }}
    13      # This makes it easy to search for all components of a release using kubectl.
    14      release: {{ .Release.Name | quote }}
    15      # This makes it easy to audit chart usage.
    16      chart: "{{.Chart.Name}}-{{.Chart.Version}}"
    17  spec:
    18    replicas: {{default 1 .Values.replicaCount}}
    19    template:
    20      metadata:
    21        labels:
    22          app: {{template "fullname" .}}
    23          release: {{.Release.Name | quote }}
    24      spec:
    25        containers:
    26        - name: nginx
    27          # Making image configurable is not necessary. Making imageTag configurable
    28          # is a nice option for the user. Especially in the strange cases like
    29          # nginx where the base distro is determined by the tag. Using :latest
    30          # is frowned upon, using :stable isn't that great either.
    31          image: "{{default "nginx" .Values.image}}:{{default "stable-alpine" .Values.imageTag}}"
    32          imagePullPolicy: {{default "IfNotPresent" .Values.pullPolicy}}
    33          ports:
    34          - containerPort: 80
    35          # This (and the volumes section below) mount the config map as a volume.
    36          volumeMounts:
    37          - mountPath: /usr/share/nginx/html
    38            name: wwwdata-volume
    39        volumes:
    40          - name: wwwdata-volume
    41            configMap:
    42              name: {{template "fullname" .}}