<p>I setup a docker registry using the <a href="https://github.com/helm/charts/tree/master/stable/docker-registry" rel="nofollow noreferrer">official helm chart</a> on my k8s cluster.
I tried configuring notifications for my registry as per <a href="https://docs.docker.com/registry/notifications/#configuration" rel="nofollow noreferrer">the docs</a>, as follows:</p>

<pre><code>apiVersion: v1
data:
  config.yml: |-
    health:
      storagedriver:
        enabled: true
        interval: 10s
        threshold: 3
    http:
      addr: :5000
      headers:
        X-Content-Type-Options:
        - nosniff
    notifications:
      endpoints:
        - name: keel
          url: http://keel.example.com/v1/webhooks/registry
          headers:
            Content-Type: application/json
          timeout: 500ms
          threshold: 5
          backoff: 1s
    log:
      fields:
        service: registry
    storage:
      cache:
        blobdescriptor: inmemory
    version: 0.1
kind: ConfigMap
</code></pre>

<p>After changing the config to include notifications, the registry fails to start as it does not recognize the configuration. I get this error:</p>

<pre><code>configuration error: error parsing /etc/docker/registry/config.yml: yaml: unmarshal errors:
  line 16: cannot unmarshal !!str `applica...` into []string

Usage: 
  registry serve &lt;config&gt; [flags]
Flags:
  -h, --help=false: help for serve


Additional help topics:
</code></pre>

Badri
<p>You missed the yaml character <code>[</code> in their docs (which I freely admit is a terrible example, given that <code>[</code> is often used in documentation as "placeholder goes here"), since in yaml it is the character that turns an item into a list -- just like in JSON, from which YAML draws its inspiration</p>

<p>But, that aside, the <code>cannot unmarshal str into []string</code> should have been a dead giveaway that they were expecting an <em>array</em> of strings for the header:</p>

<pre><code>headers:
  Content-Type:
  - application/json
</code></pre>

<p>or, using the syntax of their <strong>terrible</strong> example:</p>

<pre><code>headers:
  Content-Type: [application/json]
</code></pre>

<p>To follow up, the <a href="https://docs.docker.com/registry/configuration/#endpoints" rel="nofollow noreferrer"><code>endpoints:</code> reference docs</a> <em>also</em> point out that:</p>

<blockquote>
  <p>A list of static headers to add to each request. Each header's name is a key beneath headers, and each value is a <strong>list of payloads</strong> for that header name. <strong>Values must always be lists</strong>.</p>
</blockquote>

<p><em>(emphasis is mine)</em></p>
