Skip to content

Commit 97cad4a

Browse files
committed
Update version-patch.yaml in clusterversion.md
Now that we have no default overrides, the version-patch has to add the overrides field. According to yaml patch docs (that I found http://jsonpatch.com/#add) the Add Op 1) If the path includes an array index, the new value is added to the entity at the specified index 2) If the path doesn't exist, a new member is created 3) If the path does exist, the value is replaced
1 parent 23f7ee1 commit 97cad4a

File tree

1 file changed

+26
-9
lines changed

1 file changed

+26
-9
lines changed

docs/dev/clusterversion.md

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,32 @@ kind: DaemonSet
5050
metadata:
5151
name: cluster-network-operator
5252
namespace: openshift-cluster-network-operator
53-
$ cat <<EOF >version-patch.yaml
54-
> - op: add
55-
> path: /spec/overrides/-
56-
> value:
57-
> kind: DaemonSet
58-
> name: cluster-network-operator
59-
> namespace: openshift-cluster-network-operator
60-
> unmanaged: true
61-
> EOF
53+
```
54+
If there are currently no other overrides configured:
55+
```console
56+
$ cat <<EOF >version-patch-first-override.yaml
57+
- op: add
58+
path: /spec/overrides
59+
value:
60+
- kind: DaemonSet
61+
name: cluster-network-operator
62+
namespace: openshift-cluster-network-operator
63+
unmanaged: true
64+
EOF
65+
```
66+
To add to list of already existing overrides:
67+
```console
68+
$ cat <<EOF >version-patch-add-override.yaml
69+
- op: add
70+
path: /spec/overrides/-
71+
value:
72+
kind: DaemonSet
73+
name: cluster-network-operator
74+
namespace: openshift-cluster-network-operator
75+
unmanaged: true
76+
EOF
77+
```
78+
```console
6279
$ oc patch clusterversion version --type json -p "$(cat version-patch.yaml)"
6380
```
6481

0 commit comments

Comments
 (0)