Define a livenessProbe with secret httpHeaders : <p>I want to define a livenessProbe with an httpHeader whose value is secret.</p>

<p>This syntax is invalid:</p>

<pre><code>livenessProbe:
  httpGet:
    path: /healthz
    port: 8080
    httpHeaders:
      - name: X-Custom-Header
        valueFrom:
          secretKeyRef:
            name: my-secret-key
            value: secret
</code></pre>

<p>If I specify <code>my-secret-key</code> with value <code>secret</code> as an environment variable named <code>MY_SECRET_KEY</code>, the following could work:</p>

<pre><code>livenessProbe:
  exec:
    command:
      - curl
      - --fail
      - -H
      - "X-Custom-Header: $MY_SECRET_KEY"
      - 'http://localhost:8080/healthz'
</code></pre>

<p>Unfortunately it doesn't due to the way the quotations are being evaluated. If I type the command <code>curl --fail -H "X-Custom-Header: $MY_SECRET_KEY" http://localhost:8080/healthz</code> directly on the container, it works.</p>

<p>I've also tried many combinations of single quotes and escaping the double quotes.</p>

<p>Does anyone know of a workaround?</p>
