title: Error: YAML parse error on deployment.yaml: error converting YAML to JSON: yaml: line 50: mapping values are not allowed in this context
body: <p>I get an error when I install the helm chart I created.</p>
  <p>helm install -f values.yaml --dry-run  testbb ./</p>
  <p>I change the indent and make it like yamls. I use &quot;kubectl get -o yaml&quot; many times, but it doesn't work.</p>
  <p>Line 50 in yaml file contains volume <strong>name: frontend-http</strong></p>
  <p>Does anyone know how to solve this, please?
  Here is the entire yaml template file:</p>
  <pre><code>apiVersion: apps/v1
  kind: Deployment
  metadata:
    name: {{ include &quot;frontend-nginx.fullname&quot; . }}
    labels:
      {{- include &quot;frontend-nginx.labels&quot; . | nindent 4 }}
  spec:
    {{- if not .Values.autoscaling.enabled }}
    replicas: {{ .Values.replicaCount }}
    {{- end }}
    selector:
      matchLabels:
        {{- include &quot;frontend-nginx.selectorLabels&quot; . | nindent 6 }}
    template:
      metadata:
        {{- with .Values.podAnnotations }}
        annotations:
          {{- toYaml . | nindent 8 }}
        {{- end }}
        labels:
          {{- include &quot;frontend-nginx.selectorLabels&quot; . | nindent 8 }}
      spec:
        {{- with .Values.imagePullSecrets }}
        imagePullSecrets:
          {{- toYaml . | nindent 8 }}
        {{- end }}
        serviceAccountName: {{ include &quot;frontend-nginx.serviceAccountName&quot; . }}
        securityContext:
          {{- toYaml .Values.podSecurityContext | nindent 8 }}
        containers:
        - name: {{ .Chart.Name }}
          securityContext:
            {{- toYaml .Values.securityContext | nindent 12 }}
          image: &quot;{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}&quot;
          imagePullPolicy: {{ .Values.image.pullPolicy }}
          ports:
          - name: http
            containerPort: 80
            protocol: TCP
          volumeMounts:
            - mountPath: /usr/local/nginx/conf/nginx.conf
              name: {{ .Values.nginxconfig.nginxcm }}-volume
              subPath: nginx.conf
            - mountPath: /usr/local/nginx/html/app
              name: data-storage
        volumes: 
        - configMap:
            defaultMode: 420
            name: frontend-http
          name: frontend-http-volume
        {{- if .Values.persistentVolume.enabled }}
        - name: data-storage
          persistentVolumeClaim:
            claimName: {{ .Values.persistentVolume.existingClaim | default (include &quot;frontend-nginx.fullname&quot; .) }}
        {{- else }}
        - name: data-storage
          emptyDir: {}
        {{- end }}            
  {{- if .Values.persistentVolume.mountPaths }}
  {{ toYaml .Values.persistentVolume.mountPaths | indent 12 }}
  {{- end }}            
        {{- with .Values.nodeSelector }}
        nodeSelector:
          {{- toYaml . | nindent 8 }}
        {{- end }}
        {{- with .Values.affinity }}
        affinity:
          {{- toYaml . | nindent 8 }}
        {{- end }}
        {{- with .Values.tolerations }}
        tolerations:
          {{- toYaml . | nindent 8 }}
        {{- end }}
  </code></pre>