Skip to content

Commit 9adb753

Browse files
committed
move behavior: merge in base
1 parent c87c7a1 commit 9adb753

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

proposals/22-03-value-in-the-structured-data.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ If this proposal is an expansion of an existing GitHub issue, link to it here.
4848
kustomize can apply structured edits to Kubernetes objects defined in yaml files.\
4949
Sometimes structured multi-line or long single line string (ex. json,yaml, and other structured format data) is injected in Kubernetes objects' string literal field. From the kustomize perspective, these "structured" multiline strings are just arbitrary unstructured strings.\
5050
So, kustomize can't manipulate one value on structured, formatted data in the Kubernetes object's string literal field. This function is expected behavior, but kustomize will be very helpful if it can change the value of structured data like json and yaml substrings in a string literal.\
51-
While kustomize won't support unstructured edits in general, theis proposal allows editing of an unstructured string literal as an exception if the string literal is a structured string of a well-known format like json.\
51+
This proposal allows the user to identify strings literals containing JSON/YAML data so that Kustomize can make structured edits to the data they contain. This allows the requested functionality to be added without violating Kustomize's core principle of supporting structured edits exclusively.\
5252

5353
For example, kustomize can't change the value `"REPLACE_TARGET_HOSTNAME"` in this yaml file straightforwardly.
5454

@@ -285,7 +285,6 @@ So, If kustomize configMapGenerator can overlay to one line inside a configMap d
285285
# base/kustomization.yaml
286286
configMapGenerator:
287287
- name: demo
288-
behavior: merge
289288
literals:
290289
- config.json: |-
291290
{
@@ -304,6 +303,7 @@ resources:
304303
- ../base
305304
configMapGenerator:
306305
- name: demo
306+
behavior: merge
307307
option:
308308
valueMergeFormat: json
309309
literals:

0 commit comments

Comments
 (0)