<p>I'm struggling at having secrets read using application.yml.</p>
<p>When I do:</p>
<pre><code>quarkus:
    application:
        name: pi-quarkus-fund-persistence-service
    kubernetes-config:
        enabled: true
        fail-on-missing-config: false
        config-maps: pi-quarkus-fund-persistence-service-configmap
        secrets: pi-quarkus-fund-persistence-service-secrets
            enabled: true
</code></pre>
<p>The build fails with:</p>
<pre><code>Failed to build quarkus application: mapping values are not allowed here
    in 'reader', line 16, column 20:
                enabled: true
                        ^
</code></pre>
<p>When:</p>
<pre><code>quarkus:
    application:
        name: pi-quarkus-fund-persistence-service
    kubernetes-config:
        enabled: true
        secrets.enabled: true
        fail-on-missing-config: false
        config-maps: pi-quarkus-fund-persistence-service-configmap
        secrets: pi-quarkus-fund-persistence-service-secrets
</code></pre>
<p>The build fails with:</p>
<pre><code>Unrecognized configuration key &quot;quarkus.kubernetes-config.&quot;secrets.enabled&quot;&quot; was provided; it will be ignored; verify that the dependency extension for this configuration is set or you did not make a typo
</code></pre>
<p>When:</p>
<pre><code>quarkus.kubernetes-config.secrets.enabled: true
quarkus:
    application:
        name: pi-quarkus-fund-persistence-service
    kubernetes-config:
        enabled: true
        fail-on-missing-config: false
        config-maps: pi-quarkus-fund-persistence-service-configmap
        secrets: pi-quarkus-fund-persistence-service-secrets
</code></pre>
<p>The build succeed but the service fails at startup with:</p>
<p>Configuration is read from Secrets [pi-quarkus-fund-persistence-service-secrets], but <strong>quarkus.kubernetes-config.secrets.enabled is false</strong>. Check if your application's service account has enough permissions to read secrets.</p>
<p>When I look at this commit: <a href="https://github.com/quarkusio/quarkus/commit/93f00af9444deafe950afa1fad60f56fceb81ca3" rel="nofollow noreferrer">https://github.com/quarkusio/quarkus/commit/93f00af9444deafe950afa1fad60f56fceb81ca3</a></p>
<p>Line 48: // TODO: should probably use converter here</p>
<p>Could it be because the property is not converted from yaml?</p>

<p>I think this is just about how to write the correct YAML. It should be:</p>
<pre><code>quarkus:
    application:
        name: pi-quarkus-fund-persistence-service
    kubernetes-config:
        enabled: true
        fail-on-missing-config: false
        config-maps: pi-quarkus-fund-persistence-service-configmap
        secrets:
            ~: pi-quarkus-fund-persistence-service-secrets
            enabled: true
</code></pre>
<p>In retrospect, <code>quarkus.kubernetes-config.secrets.enabled</code> wasn't the best choice for this config property, sorry about that :-(</p>
