@@ -487,6 +487,13 @@ An item on the list offers the following subkeys:
487487 ` true` , a not found error for the values reference is ignored, but any
488488 ` valuesKey` , `targetPath` or transient error will still result in a
489489 reconciliation failure. Defaults to `false` when omitted.
490+ - `literal` (Optional) : When set together with `targetPath`, the referenced
491+ value is merged at the target path verbatim, without interpreting Helm's
492+ ` --set` syntax (commas, brackets, dots, equal signs, etc.). Mirrors the
493+ behavior of `helm --set-literal`. Use this to inject arbitrary file content
494+ (config files, JSON blobs, multi-line strings containing special characters)
495+ through `valuesFrom`. Has no effect when `targetPath` is empty.
496+ Defaults to `false` when omitted.
490497
491498` ` ` yaml
492499spec:
@@ -499,6 +506,11 @@ spec:
499506 valuesKey: crt
500507 targetPath: tls.crt
501508 optional: true
509+ - kind: ConfigMap
510+ name: app-config-source
511+ valuesKey: application.yml
512+ targetPath: 'externalConfig.application\. yml.content'
513+ literal: true
502514` ` `
503515
504516**Note:** The `targetPath` supports the same formatting as you would supply as
@@ -510,6 +522,11 @@ a list). You can read more about the available formats and limitations in the
510522For JSON strings, the [limitations are the same as while using `helm`](https://github.com/helm/helm/issues/5618)
511523and require you to escape the full JSON string (including `=`, `[`, `,`, `.`).
512524
525+ To skip the `--set`-style parsing entirely and pass the value as a raw string
526+ (useful for full config files or any content containing `,`, `[`, `]`, `{`,
527+ `}`, `=`), set `literal : true` together with `targetPath`. This mirrors
528+ ` helm --set-literal` .
529+
513530To make a HelmRelease react immediately to changes in the referenced Secret
514531or ConfigMap see [this](#reacting-immediately-to-configuration-dependencies)
515532section.
0 commit comments