You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/customize-installation-operator-overlays.adoc
+20-11Lines changed: 20 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -39,21 +39,21 @@ The following example shows the structure of an overlay:
39
39
[source,yaml]
40
40
----
41
41
overlays:
42
-
- apiVersion: v1 # <1>
43
-
kind: ConfigMap # <2>
44
-
name: my-configmap # <3>
42
+
- apiVersion: v1 # <1>
43
+
kind: ExampleKind # <2>
44
+
name: my-resource # <3>
45
45
patches:
46
-
- path: .data # <4>
47
-
value: | # <5>
46
+
- path: .some.field # <4>
47
+
value: | # <5>
48
48
key1: data2
49
49
key2: data2
50
50
----
51
51
52
52
<1> Targeted Kubernetes resource ApiVersion, for example `apps/v1`, `v1`, `networking.k8s.io/v1`
53
53
<2> Resource type (e.g., Deployment, ConfigMap, NetworkPolicy)
54
-
<3> Name of the resource, for example `my-configmap`
54
+
<3> Name of the resource, for example `my-resource`
55
55
<4> JSONPath expression to the field, for example `spec.template.spec.containers[name:central].env[-1]`
56
-
<5> YAML string for the new field value
56
+
<5> YAML string for the new field value. If you do not want to use YAML parsing, you can use the `verbatim` key as shown in the following ConfigMap example.
57
57
58
58
[id="adding-an-overlay_{context}"]
59
59
=== Adding an overlay
@@ -157,12 +157,21 @@ spec:
157
157
kind: ConfigMap
158
158
name: central-endpoints
159
159
patches:
160
-
- path: data
161
-
value: |
162
-
endpoints.yaml: |
163
-
disableDefault: false
160
+
- path: data.endpoints\.yaml
161
+
verbatim: |
162
+
disableDefault: false
163
+
# another line
164
164
----
165
165
166
+
This example shows how to override only a single item (file) under `data`.
167
+
168
+
Follow this example by taking these steps:
169
+
170
+
* Use the `verbatim` key, rather than `value`.
171
+
This helps pass through characters such as newlines or quotes so that they are unaffected.
172
+
* You must escape the dot in the filename in the `path` key as shown, or
173
+
you can write the path as `data["endpoints.yaml"]`.
0 commit comments