-
Notifications
You must be signed in to change notification settings - Fork 27
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
OTA-1014: bundle/manifests: Update UpdateService CRD to pick up metadataURI #179
Conversation
Generated with: $ cp config/crd/bases/updateservice.operator.openshift.io_updateservices.yaml bundle/manifests/updateservice.operator.openshift.io_updateservices.yaml to catch up with 6b266d2 (config: Regenerate UpdateService CRD, 2023-10-03, openshift#176). 24c7382 (Include bundle manifests and Dockerfile, 2023-08-08, openshift#173) suggests I could have done this with 'make bundle VERSION=5.0.3-dev' or some such, but I don't have operator-sdk installed at the moment.
@wking: This pull request references OTA-1014 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.15.0" version, but no target version was set. 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. |
@wking: all tests passed! Full PR test history. Your PR dashboard. 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. |
Testing with Cluster Bot $ oc adm upgrade
Cluster version is 4.14.0-0.test-2023-11-22-221520-ci-ln-4rl3xqt-latest
...
$ oc get -o json customresourcedefinition updateservices.updateservice.operator.openshift.io | jq -r '.spec.versions[].schema.openAPIV3Schema.properties.status.properties | to_entries[].key'
conditions
metadataURI
policyEngineURI And then deploying from here: $ sed -i 's/namespace: openshift-update-service/namespace: install-osus-here/g' *.yaml
$ oc apply -f .
imagestream.image.openshift.io/graph-data created
buildconfig.build.openshift.io/graph-data created
updateservice.updateservice.operator.openshift.io/example created
$ oc -n install-osus-here get -o json updateservice example | jq -r .status.metadataURI
https://example-meta-route-install-osus-here.apps.ci-ln-4rl3xqt-72292.origin-ci-int-gce.dev.rhcloud.com so that looks good to me. I didn't inject any signatures in my graph-data image, but I don't have any handy BuildConfig to do that, so skipping it for now. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: petr-muller, wking 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 |
The Go-side 'optional' was not enough to get these optional, so talk to kubebuilder directly. We need metadataURI to be optional to avoid [1]: $ oc -n openshift-update-service get -o json installplan install-wpgw2 | jq '.status.conditions[]' { "lastTransitionTime": "2024-05-20T07:05:46Z", "lastUpdateTime": "2024-05-20T07:05:46Z", "message": "error validating existing CRs against new CRD's schema for \"updateservices.updateservice.operator.openshift.io\": error validating updateservice.operator.openshift.io/v1, Kind=UpdateService \"openshift-update-service/sample\": updated validation is too restrictive: [].status.metadataURI: Required value", "reason": "InstallComponentFailed", "status": "False", "type": "Installed" } We need those existing 5.0.2 UpdateService to be compatible with the incoming 5.0.3 CustomResourceDefinition, so we can install the new CRD and updated operator, so the incoming operator can populate the new metadataURI property. While I was fixing that property, I'm adding the same comment to policyEngineURI for consistency. This will allow the operator do things like setting conditions complaining about difficulty provisioning the Route needed to figure out the policyEngineURI. After updating the Go, I updated config/crd/bases/... like 6b266d2 (config: Regenerate UpdateService CRD, 2023-10-03, openshift#176): $ controller-gen rbac:roleName=updateservice-operator crd paths=./... output:crd:dir=config/crd/bases $ git add -p # preserve additionalPrinterColumns using the same: $ controller-gen --version Version: v0.13.0 I'd built in 6b266d2 (there may have been subsequent releases; I haven't checked). Then dropping the additionalPrinterColumns changes: $ git restore config/crd/bases/updateservice.operator.openshift.io_updateservices.yaml And copying into the bundle as I'd done in e5716f8 (bundle/manifests: Update UpdateService CRD to pick up metadataURI, 2023-11-22, openshift#179): $ cp config/crd/bases/updateservice.operator.openshift.io_updateservices.yaml bundle/manifests/updateservice.operator.openshift.io_updateservices.yaml
The Go-side 'optional' was not enough to get these optional, so talk to kubebuilder directly. We need metadataURI to be optional to avoid [1]: $ oc -n openshift-update-service get -o json installplan install-wpgw2 | jq '.status.conditions[]' { "lastTransitionTime": "2024-05-20T07:05:46Z", "lastUpdateTime": "2024-05-20T07:05:46Z", "message": "error validating existing CRs against new CRD's schema for \"updateservices.updateservice.operator.openshift.io\": error validating updateservice.operator.openshift.io/v1, Kind=UpdateService \"openshift-update-service/sample\": updated validation is too restrictive: [].status.metadataURI: Required value", "reason": "InstallComponentFailed", "status": "False", "type": "Installed" } We need those existing 5.0.2 UpdateService to be compatible with the incoming 5.0.3 CustomResourceDefinition, so we can install the new CRD and updated operator, so the incoming operator can populate the new metadataURI property. While I was fixing that property, I'm adding the same comment to policyEngineURI for consistency. This will allow the operator do things like setting conditions complaining about difficulty provisioning the Route needed to figure out the policyEngineURI. After updating the Go, I updated config/crd/bases/... like 6b266d2 (config: Regenerate UpdateService CRD, 2023-10-03, openshift#176): $ controller-gen rbac:roleName=updateservice-operator crd paths=./... output:crd:dir=config/crd/bases $ git add -p # preserve additionalPrinterColumns using the same: $ controller-gen --version Version: v0.13.0 I'd built in 6b266d2 (there may have been subsequent releases; I haven't checked). Then dropping the additionalPrinterColumns changes: $ git restore config/crd/bases/updateservice.operator.openshift.io_updateservices.yaml And copying into the bundle as I'd done in e5716f8 (bundle/manifests: Update UpdateService CRD to pick up metadataURI, 2023-11-22, openshift#179): $ cp config/crd/bases/updateservice.operator.openshift.io_updateservices.yaml bundle/manifests/updateservice.operator.openshift.io_updateservices.yaml [1]: https://issues.redhat.com/browse/OCPBUGS-33939
Generated with:
$ cp config/crd/bases/updateservice.operator.openshift.io_updateservices.yaml bundle/manifests/updateservice.operator.openshift.io_updateservices.yaml
to catch up with 6b266d2 (#173) suggests I could have done this with
make bundle VERSION=5.0.3-dev
or some such, but I don't haveoperator-sdk
installed at the moment.