Skip to content

Commit 51d35b4

Browse files
committed
📝 Update documentation.
1 parent fa6ba12 commit 51d35b4

File tree

1 file changed

+32
-3
lines changed

1 file changed

+32
-3
lines changed

README.md

+32-3
Original file line numberDiff line numberDiff line change
@@ -1112,9 +1112,38 @@ replacements:
11121112
- spec.source.helm.values.!!yaml.ingressRoute.dashboard.enabled
11131113
```
11141114

1115-
As the source of the replacement is _sideloaded_, there no need to inject it nor
1116-
remove it from the configuration. Also, as the `source` can be a kustomization,
1117-
there is no need for it to be local.
1115+
As the source of the replacement is _side loaded_, there no need to inject it
1116+
nor remove it from the configuration. Also, as the `source` can be a
1117+
kustomization, there is no need for it to be local.
1118+
1119+
#### Replacement with encoding
1120+
1121+
Kustomize has an `encoding` option in `ReplacementTransformer` that is currently
1122+
unused. We put it to the work and provide three encoding types:
1123+
1124+
- base64
1125+
- bcrypt
1126+
- hex
1127+
1128+
Example:
1129+
1130+
```yaml
1131+
- source:
1132+
name: autocloud-values
1133+
fieldPath: data.to_encode
1134+
options:
1135+
encoding: base64
1136+
targets:
1137+
- select:
1138+
kind: ConfigMap
1139+
name: argocd-cm
1140+
fieldPaths:
1141+
- data.b64encoded
1142+
```
1143+
1144+
Thanks to this feature, you can keep some values in clear text inside your
1145+
properties files and encode them on kustomization. Be aware that the `bcrypt`
1146+
encoding will generate a new value for each kustomization.
11181147

11191148
## Installation
11201149

0 commit comments

Comments
 (0)