Skip to content

Commit 3cb2812

Browse files
felixfonteinmitar
andcommitted
Support using comments to select parts to encrypt
Converted from getsops/sops@f63e844 Co-authored-by: Mitar <mitar.git@tnode.com> Signed-off-by: Mitar <mitar.git@tnode.com> Signed-off-by: Felix Fontein <felix@fontein.de>
1 parent 11fd811 commit 3cb2812

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

content/en/docs/_index.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1615,10 +1615,19 @@ will not encrypt the values under the `description` and `metadata` keys
16151615
in a YAML file containing kubernetes secrets, while encrypting
16161616
everything else.
16171617
1618+
For YAML files, another method is to use `--encrypted-comment-regex` which will
1619+
only encrypt comments and values which have a preceding comment matching the supplied
1620+
regular expression.
1621+
1622+
Conversely, you can opt in to only left certain keys without encrypting by using the
1623+
`--unencrypted-comment-regex` option, which will leave the values and comments
1624+
unencrypted when they have a preeceding comment that matches the supplied regular expression.
1625+
16181626
You can also specify these options in the `.sops.yaml` config file.
16191627
1620-
Note: these four options `--unencrypted-suffix`, `--encrypted-suffix`,
1621-
`--encrypted-regex` and `--unencrypted-regex` are mutually exclusive and
1628+
Note: these six options `--unencrypted-suffix`, `--encrypted-suffix`,
1629+
`--encrypted-regex`, `--unencrypted-regex`, `--encrypted-comment-regex`,
1630+
and `--unencrypted-comment-regex` are mutually exclusive and
16221631
cannot all be used in the same file.
16231632
16241633
# Encryption Protocol

0 commit comments

Comments
 (0)