New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug 1808457: [release-4.4] generate CRD manifests and fix for oc explain #1520
Bug 1808457: [release-4.4] generate CRD manifests and fix for oc explain #1520
Conversation
Generate validation for: containerruntimeconfig controllerconfig kubeletconfig machineconfig machineconfigpool Using update-codegen-crds target from https://github.com/openshift/build-machinery-go, which will be included in a separate commit as it is not directly usable with the MCO repo until coreos/ignition#917 is resolved. The current generation is done via hacking ignition's config/v2_2/types/schema.go to have dummy `json:",inline"` for fields that are causing errors. Some background on this, there were 2 attempts to add generated schemas in: openshift#1403 and openshift#955. This supercedes those with updated generation methods. Signed-off-by: Yu Qi Zhang <jerzhang@redhat.com>
Now that we have generated schemas, for oc explain to work we need to turn on validation via preserveUnknownFields: false in the spec. There is also one error in the autogenerated machineconfigpool spec due to IntOrString, see: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#intorstring Also minor formatting in machineconfig.crd.yaml. Signed-off-by: Yu Qi Zhang <jerzhang@redhat.com>
Manually modify machineconfig crd fields to have description fields again. Also remove unused fields. Signed-off-by: Yu Qi Zhang <jerzhang@redhat.com>
Run ./hack/update-generated-bindata.sh Signed-off-by: Yu Qi Zhang <jerzhang@redhat.com>
Add nullable to additionalTrustBundle, cloudProviderCAData, proxy, and kernelArguments, as they will otherwise be generated as null during CI runs, and the validation will cause it to fail. Signed-off-by: Yu Qi Zhang <jerzhang@redhat.com>
This allows MCC/MCD to validate the ignition section instead, much like we've always done. Otherwise, any non-valid ignition section will instead get pruned by the validation. A bit more background: for oc explain to work, we need to have preserveUnknownFields: false which means all fields not defined by the crd schema will be pruned upon generation of the CR. Since we only define ignition sections that are allowed, an invalid ignition spec field will simply get removed when the machineconfig is created. Adding the flag tells validation that anything under Config is allowed, and we will let MCC/MCD do the validation instead, like we do today. Signed-off-by: Yu Qi Zhang <jerzhang@redhat.com>
@openshift-cherrypick-robot: No Bugzilla bug is referenced in the title of this pull request. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/retest |
Needs corresponding bugzilla |
@openshift-cherrypick-robot: This pull request references Bugzilla bug 1705750, which is invalid:
Comment In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@openshift-cherrypick-robot: This pull request references Bugzilla bug 1808457, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 6 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: openshift-cherrypick-robot, sinnykumari, yuqi-zhang The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Please review the full test history for this PR and help us cut down flakes. |
@openshift-cherrypick-robot: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest Please review the full test history for this PR and help us cut down flakes. |
@openshift-cherrypick-robot: All pull requests linked via external trackers have merged. Bugzilla bug 1808457 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This is an automated cherry-pick of #1485
/assign yuqi-zhang