<p>I'm using helm3.
My kubernetes deployment get crashed on 43 line of code below.</p>
<p>Error in console: error converting YAML to JSON:  mapping values are not allowed in this context</p>
<p>yaml lint says this:
<strong>(): found unexpected ':' while scanning a plain scalar at line 43 column 19</strong></p>
<p>Whats wrong with that line?</p>
<p>wrong one:</p>
<pre><code>- image: {{ printf &quot;%s/%s:%s&quot; .Values.dockerRegistry .Values.dockerImage .Values.version }}



  apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ template &quot;deploy_name&quot; . }}
  namespace: {{ .Release.Namespace }}
spec:
  replicas: {{ .Values.replicas.min }}
  revisionHistoryLimit: 3
  selector:
    matchLabels:
      app: {{ .Release.Name }}
  template:
    metadata:
      labels:
        app: {{ .Release.Name }}
        team: {{ .Values.meta.team }}
        env: {{ .Values.env }}
        version: {{ .Values.version }}
        revision: {{ .Release.Revision | quote }}
        json_logs: &quot;true&quot;
        commit_hash: {{ .Values.commitHash }}
      annotations:
        prometheus.io/port: {{ .Values.ports.application | quote }}
        prometheus.io/path: {{ .Values.prometheus.path | quote }}
        prometheus.io/scrape: {{ .Values.prometheus.scrape | quote }}
        prometheus.io/scheme: {{ .Values.prometheus.scheme | quote }}
        host/url: {{ .Values.url | quote }}
        host.net/owner: {{ .Values.meta.owner | quote }}
        host.net/system: {{ .Values.meta.team | quote }}
        sidecar.istio.io/rewriteAppHTTPProbers: &quot;true&quot;
    spec:
      imagePullSecrets:
      - name: gitlab
      hostAliases:
      - ip: 0.0.0.0
        hostnames:
        - host
        - host
      - ip: 0.0.0.0
        hostnames:
        - host
      containers:
      - image: {{ printf &quot;%s/%s:%s&quot; .Values.dockerRegistry .Values.dockerImage .Values.version }}
        imagePullPolicy: Always
        name: website
        ports:
        - containerPort: {{  .Values.ports.application }}
        envFrom:
        - configMapRef:
            name: {{ template &quot;config_map_name&quot; . }}
        - secretRef:
            name: {{ template &quot;secret_name&quot; . }}
        resources:
          limits:
            cpu: 2
            memory: 4Gi
          requests:
            cpu: 350m
            memory: 2Gi
        livenessProbe:
          httpGet:
            path: /healthz
            port: {{ .Values.ports.application }}
          initialDelaySeconds: 20
          periodSeconds: 3
          failureThreshold: 10
        readinessProbe:
          httpGet:
            path: /readyz
            port: {{ .Values.ports.application }}
          initialDelaySeconds: 20
          periodSeconds: 3
</code></pre>

<p>so my solution is:</p>
<pre><code>- image: '{{.Values.dockerRegistry}}/{{.Values.dockerImage}}:{{.Values.version}}'
</code></pre>
<p>The problem was about printf function and colon symbol within</p>
<pre><code>&quot;%s/%s:%s&quot;
</code></pre>
