Bug 2141399
Summary: | Unable to set TLS Security profile for CDI using HCO jsonpatch annotations | ||
---|---|---|---|
Product: | Container Native Virtualization (CNV) | Reporter: | SATHEESARAN <sasundar> |
Component: | Installation | Assignee: | Simone Tiraboschi <stirabos> |
Status: | CLOSED ERRATA | QA Contact: | SATHEESARAN <sasundar> |
Severity: | low | Docs Contact: | |
Priority: | unspecified | ||
Version: | 4.12.0 | CC: | stirabos |
Target Milestone: | --- | ||
Target Release: | 4.12.0 | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | upstream doc only | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2023-01-24 13:42:07 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
SATHEESARAN
2022-11-09 17:47:59 UTC
This is basically a side effect of: https://github.com/golang/go/issues/53104 https://github.com/kubernetes-sigs/yaml/issues/86 and Old, Intermediate, Modern and Custom being pointers on golang implementation of the API: https://github.com/openshift/api/blob/b7057289fac81e08b06a564a0c724d1a4f3a783a/config/v1/types_tlssecurityprofile.go#L86 I don't think we can have a general solution. I'd suggest to use an appropriate JsonPatch explicitly nulling them if not wanted: $ oc annotate --overwrite -n openshift-cnv hco kubevirt-hyperconverged containerizeddataimporter.kubevirt.io/jsonpatch='[{"op": "replace", "path": "/spec/config/tlsSecurityProfile", "value": {"old":{}, "type": "Old"}}]' $ oc get cdi cdi-kubevirt-hyperconverged -o json | jq .spec.config.tlsSecurityProfile { "intermediate": {}, "old": {}, "type": "Old" } $ oc annotate --overwrite -n openshift-cnv hco kubevirt-hyperconverged containerizeddataimporter.kubevirt.io/jsonpatch='[{"op": "replace", "path": "/spec/config/tlsSecurityProfile", "value": {"old":{}, "type": "Old", "intermediate": null, "modern": null, "custom": null }}]' $ oc get cdi cdi-kubevirt-hyperconverged -o json | jq .spec.config.tlsSecurityProfile { "old": {}, "type": "Old" } *** Bug 2141419 has been marked as a duplicate of this bug. *** Verified with the upstream doc reference about updating the tlsSecurityProfile of CDI/CNAO/KubeVirt using jsonpatch. The content is well described and helps to achieve the requirement as stated Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: OpenShift Virtualization 4.12.0 Images security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2023:0408 |