Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions docs/runbooks/UnsupportedHCOModification.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,50 @@
severity=info
```

To locate and review JSON Patch annotations on the `HyperConverged` resource:

```bash
# Discover the HCO namespace (commonly 'openshift-cnv' or 'kubevirt-hyperconverged')
NS=$(kubectl get hyperconverged -A -o jsonpath='{.items[0].metadata.namespace}')

# Show annotations on the HyperConverged CR
kubectl get hyperconverged -n "${NS}" kubevirt-hyperconverged \
-o jsonpath='{.metadata.annotations}'; echo
```

When reviewing the annotations:
- The jsonpatch annotation keys are fixed and live on the `HyperConverged` CR:
- `kubevirt.kubevirt.io/jsonpatch`
- `containerizeddataimporter.kubevirt.io/jsonpatch`
- `networkaddonsconfigs.kubevirt.io/jsonpatch`
- `ssp.kubevirt.io/jsonpatch`
- Annotations such as `kubevirt.io/latest-observed-api-version` and
`kubevirt.io/storage-observed-api-version` are normal KubeVirt annotations and are

Check failure on line 59 in docs/runbooks/UnsupportedHCOModification.md

View workflow job for this annotation

GitHub Actions / Sanity Checks

Line length

docs/runbooks/UnsupportedHCOModification.md:59:81 MD013/line-length Line length [Expected: 80; Actual: 84] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md013.md
Comment on lines +58 to +59
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just "Any other annotation is not a jsonpatch annotation and is not related to this alert"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nunnatsa, since Im not sure our customers know what a jsonpatch is perhaps this?

`Annotations that don't include the word jsonpatch, are are normal KubeVirt annotations and are unrelated to jsonpatch.

unrelated to jsonpatch.

## Mitigation

It is best to use the HCO API to change an operand. However, if the change can
only be done with a JSON Patch annotation, proceed with caution.

Remove JSON Patch annotations before upgrade to avoid potential issues.

To remove a specific JSON Patch annotation from the `HyperConverged` CR:

```bash
# Example: remove the KubeVirt jsonpatch annotation key
kubectl annotate hyperconverged -n "${NS}" kubevirt-hyperconverged \
'kubevirt.kubevirt.io/jsonpatch-'

# Other examples (use if those annotations are present):
# Remove CDI jsonpatch
# kubectl annotate hyperconverged -n "${NS}" kubevirt-hyperconverged 'containerizeddataimporter.kubevirt.io/jsonpatch-'
# Remove CNAO jsonpatch
# kubectl annotate hyperconverged -n "${NS}" kubevirt-hyperconverged 'networkaddonsconfigs.kubevirt.io/jsonpatch-'
# Remove SSP jsonpatch
# kubectl annotate hyperconverged -n "${NS}" kubevirt-hyperconverged 'ssp.kubevirt.io/jsonpatch-'
```

<!--USstart-->
If the JSON Patch annotation is generic and useful, you can submit an RFE to add
the modification to the API by filing a [bug](https://bugzilla.redhat.com/).
Expand Down
Loading