MULTIARCH-5543: Migrate Operator SDK to minimum supported version 1.33 #707
@pkenchap: This pull request references MULTIARCH-5543 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.21.0" version, but no target version was set.
<details>
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 openshift-eng/jira-lifecycle-plugin repository.
</details>
/assign @pkenchap
@pkenchap: This pull request references MULTIARCH-5543 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.21.0" version, but no target version was set.
<details>
In response to this:
>These are the migration todo checklist :
>- [ ] PROJECT: go.kubebuilder.io/v4 layout
>- [ ] API: apis/ to api/ and api/v1beta1/ with +groupName
>- [ ] Controllers: controllers/ to internal/controller/
>- [ ] main.go: root (multi-binary with cmd/enoexec-daemon/)
>- [ ] Dockerfile: Updated COPY paths
>- [ ] Webhooks: v1 APIs + modern cert-manager
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 openshift-eng/jira-lifecycle-plugin repository.
</details>
@pkenchap: This pull request references MULTIARCH-5543 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.21.0" version, but no target version was set.
<details>
In response to this:
>These are the migration todo checklist :
>- [x] PROJECT: go.kubebuilder.io/v4 layout
>- [ ] API: apis/ to api/ and api/v1beta1/ with +groupName
>- [ ] Controllers: controllers/ to internal/controller/
>- [ ] main.go: root (multi-binary with cmd/enoexec-daemon/)
>- [ ] Dockerfile: Updated COPY paths
>- [ ] Webhooks: v1 APIs + modern cert-manager
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 openshift-eng/jira-lifecycle-plugin repository.
</details>
@pkenchap: This pull request references MULTIARCH-5543 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.21.0" version, but no target version was set.
<details>
In response to this:
>These are the migration todo checklist :
>- [x] PROJECT: go.kubebuilder.io/v4 layout
>- [x] API: apis/ to api/ and api/v1beta1/ with +groupName
>- [ ] Controllers: controllers/ to internal/controller/
>- [ ] main.go: root (multi-binary with cmd/enoexec-daemon/)
>- [ ] Dockerfile: Updated COPY paths
>- [ ] Webhooks: v1 APIs + modern cert-manager
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 openshift-eng/jira-lifecycle-plugin repository.
</details>
@pkenchap: This pull request references MULTIARCH-5543 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.21.0" version, but no target version was set.
<details>
In response to this:
>These are the migration todo checklist :
>- [x] PROJECT: go.kubebuilder.io/v4 layout
>- [x] API: apis/ to api/ and api/v1beta1/ with +groupName
>- [x] Controllers: controllers/ to internal/controller/
>- [x] main.go: root (multi-binary with cmd/enoexec-daemon/)
>- [ ] Dockerfile: Updated COPY paths
>- [ ] Webhooks: v1 APIs + modern cert-manager
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 openshift-eng/jira-lifecycle-plugin repository.
</details>
@pkenchap: This pull request references MULTIARCH-5543 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.21.0" version, but no target version was set.
<details>
In response to this:
>These are the migration todo checklist :
>- [x] PROJECT: go.kubebuilder.io/v4 layout
>- [x] API: apis/ to api/ and api/v1beta1/ with +groupName
>- [x] Controllers: controllers/ to internal/controller/
>- [x] main.go: root (multi-binary with cmd/enoexec-daemon/)
>- [x] Dockerfile: Updated COPY paths
>- [x] Webhooks: v1 APIs + modern cert-manager
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 openshift-eng/jira-lifecycle-plugin repository.
</details>
multiarch-tuning-operator-e2e-olm-kustomize has issues in hack/deploy-and-e2e.sh.
+ operator-sdk run bundle registry.build01.ci.openshift.org/ci-op-fcibdpwk/pipeline@sha256:a0d2a9826a16160d25390dcb480ae17d7c7cb1c5cef498f7bfcc6f41a204b432 -n openshift-multiarch-tuning-operator --security-context-config restricted --timeout=10m
Error: no plugin could be resolved with key "go.kubebuilder.io/v4" for project version "3"
To resolve, I think you need to update https://github.com/outrigger-project/multiarch-tuning-operator/blob/main/bundle.konflux.Dockerfile
Can you put main.go back into cmd/main-binary and update the corresponding files?
https://book.kubebuilder.io/migration/manually_migration_guide_gov3_to_gov4#now-lets-update-the-paths-in-the-project-file-accordingly
Sorry to ask you to move this again, but can we put it in cmd/main.go? That way when we try to run operator-sdk create it can find the main file
Can you update all of the deprecated fields in config/ ?
You should be able to find some examples here https://github.com/kubernetes-sigs/kubebuilder/tree/master/docs/book/src/getting-started/testdata/project
/retest
/test unit
sure , done .
/test ocp418-e2e-azure
/test ocp417-e2e-gcp
@AnnaZivkovic , All comments are addressed , Please review .
I noticed that when migrating the apis we changed from multi group to single group (apis/multiarch/v1beta1 -> api/v1beta1). Is there any reason for this change away from multi grouped (api/multiarch/v1beta1) ? If there is a good reason to keep single group then we need to remove multigroup: true from the PROJECT file
The project defines only _multiarch.openshift.io_ as its API group , if there a plan of adding additional groups (e.g., storage.openshift.io, networking.openshift.io), then the multiple API groups make sense .
Current structure: api/v1beta1/ is more straightforward and moreover Multi-group would add unnecessary nesting: api/multiarch/v1beta1/ and its easier navigation and maintenance.
Single-group layout is the default and recommended approach for projects with one API group.
Yes it's better to remove the multigroup: true from the PROJECT file.
@AnnaZivkovic , I just made multigroup: true to false .
/lgtm
/test ocp417-e2e-gcp
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: <a href="https://github.com/outrigger-project/multiarch-tuning-operator/pull/707#issuecomment-3672650174" title="LGTM">AnnaZivkovic</a>, <a href="https://github.com/outrigger-project/multiarch-tuning-operator/pull/707#" title="Author self-approved">pkenchap</a>
The full list of commands accepted by this bot can be found here.
The pull request process is described here
<details >
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
</details>
<!-- META={"approvers":[]} -->
/cherrypick v1.x
@AnnaZivkovic: #707 failed to apply on top of branch "v1.x":
Applying: MULTIARCH-5543: Migrate Operator SDK to minimum supported version 1.33
error: mode change for controllers/podplacementconfig/constant.go, which is not in current HEAD
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 MULTIARCH-5543: Migrate Operator SDK to minimum supported version 1.33
<details>
In response to this:
>/cherrypick v1.x
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-sigs/prow repository.
</details>
AnnaZivkovic
pkenchap
These are the migration todo checklist :