-
Notifications
You must be signed in to change notification settings - Fork 68
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
WINC-751: Upgrade sdk-operator to 1.32.0 #1912
Conversation
@alinaryan: This pull request references WINC-751 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. |
Skipping CI for Draft Pull Request. |
4c374d5
to
e737cad
Compare
576026a
to
03db602
Compare
/test build |
/test aws-e2e-operator |
@alinaryan: This pull request references WINC-751 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. |
@alinaryan: This pull request references WINC-751 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. |
@alinaryan: This pull request references WINC-751 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. |
@alinaryan: This pull request references WINC-751 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. |
@alinaryan: This pull request references WINC-751 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. |
/test images |
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.
I did not do a full review but noticed that you missed updating get_operator_sdk(). Please fix and kick off an e2e that exercises that function.
hack/pre-release.sh
Outdated
@@ -227,7 +227,7 @@ github_update() { | |||
|
|||
# remove make bundle artifacts | |||
sed -i 's/REPLACE_IMAGE:latest/REPLACE_IMAGE/' bundle/manifests/windows-machine-config-operator.clusterserviceversion.yaml | |||
sed -i 's/operator-sdk-v1.14.0+git/operator-sdk-v1.15.0+git/' bundle/manifests/windows-machine-config-operator.clusterserviceversion.yaml | |||
sed -i 's/operator-sdk-v1.14.0+git/operator-sdk-v1.32.0+git/' bundle/manifests/windows-machine-config-operator.clusterserviceversion.yaml |
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.
Please use the OPERATOR_SDK_VERSION
variable here so that we don't need to update this line for future SKD version changes
@alinaryan consider mentioning explicitly the version you are updating to i.e. |
@@ -47,6 +47,7 @@ else | |||
GOBIN=$(shell go env GOBIN) | |||
endif | |||
|
|||
.PHONY: all |
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.
Are these changes required for the sdk-operator upgrade? If so, please mention why in the commit message; otherwise, I recommend moving them to a separate PR.
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.
Yes, they are required as part of the OSDK upgrade. See https://sdk.operatorframework.io/docs/upgrading-sdk-version/v1.16.0/#add-phony-targets-to-makefile
It does not specify why the change is needed so I'm not sure what I'd put in the commit message other than "required by OSDK upgrade" which feels redundant since that's the purpose of almost all the commits in the PR.
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.
Please add such links to your commit message. This will explain WHY you are making the change.
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.
Will add links to this and the rest of the commits
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.
Thanks for doing this, just a few minor comments
Makefile
Outdated
@@ -108,6 +108,9 @@ build-daemon: | |||
run: manifests generate fmt vet ## Run a controller from your host. | |||
go run cmd/operator/main.go | |||
|
|||
ifndef ignore-not-found | |||
ignore-not-found = false |
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.
consider making this all caps like out other make constants
@@ -15,7 +15,7 @@ spec: | |||
- "--secure-listen-address=0.0.0.0:8443" | |||
- "--upstream=http://127.0.0.1:8080/" | |||
- "--logtostderr=true" | |||
- "--v=10" | |||
- "--v=0" |
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.
did they give any reason why this change is recommended?
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.
No, but I'll add the link to the doc in commit message
# You can enable this value if you would like to use SHA Based Digests | ||
# To enable set flag to true |
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.
IMO this should go in the commit message to explain why this change is made
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.
Added
KUSTOMIZE_VERSION ?= v4.5.5 | ||
CONTROLLER_TOOLS_VERSION ?= v0.10.0 |
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.
since these were introduced in the last commit, I recommend squashing this commit
@@ -154,17 +154,17 @@ KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/k | |||
.PHONY: kustomize | |||
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. | |||
$(KUSTOMIZE): $(LOCALBIN) | |||
curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN) | |||
test -s $(LOCALBIN)/kustomize || { curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN); } |
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.
Same as previous comment, I recommend squashing this commit into [build] Replace go-get with go-install
Reduces the debug log level for the sidecar container kube-rbac-proxy from 10 to 0. https://sdk.operatorframework.io/docs/upgrading-sdk-version/v1.17.0/#reduce-debug-log-level-for-the-sidecar-container-kube-rbac-proxy-from-10-to-0 Signed-off-by: Alina Ryan <aliryan@redhat.com>
Adds resource requests and limits to kube-rbac-proxy. https://sdk.operatorframework.io/docs/upgrading-sdk-version/v1.17.0/#add-resource-requests-and-limits-to-kube-rbac-proxy Signed-off-by: Alina Ryan <aliryan@redhat.com>
https://sdk.operatorframework.io/docs/upgrading-sdk-version/v1.18.0/#support-image-digests-instead-of-tags Signed-off-by: Alina Ryan <aliryan@redhat.com>
This commit updates the Makefile with the changed targets: kustomize, controller-gen, and envtest. https://sdk.operatorframework.io/docs/upgrading-sdk-version/v1.21.0/#for-golang-based-operators--change-makefile-targets-to-replace-go-get-with-go-install https://sdk.operatorframework.io/docs/upgrading-sdk-version/v1.23.0/#gov3-update-controller-tools-from-090-to-092 https://sdk.operatorframework.io/docs/upgrading-sdk-version/v1.23.0/#gov3-fix-makefile-targets-to-not-download-binaries-when-they-are-found-already Signed-off-by: Alina Ryan <aliryan@redhat.com>
Bumps OPM version from 1.19.1 to 1.23.0. https://sdk.operatorframework.io/docs/upgrading-sdk-version/v1.22.0/#for-go-gov3-gov2-ansible-ansiblev1-helm-helmv1-and-helm-hybrid-hybridhelmv1-alpha-language-based-operators---bump-opm-version-from-v1191-to-v1230-more-infohttpsgithubcomoperator-frameworkoperator-registryreleases Signed-off-by: Alina Ryan <aliryan@redhat.com>
https://sdk.operatorframework.io/docs/upgrading-sdk-version/v1.23.0/#ansiblev1helmv1-upgrade-kustomize-versions-from-v387-to-v455 Signed-off-by: Alina Ryan <aliryan@redhat.com>
When using a custom ServiceAccount for deployment, the watch role is now required. https://sdk.operatorframework.io/docs/upgrading-sdk-version/v1.31.0/#require-watch-on-secrets Manually added ServiceAccount permissions to cmd/operator/main.go Ran: 'make bundle' Removed: 'latest:' tag from REPLACE_IMAGE Added back required LABELS in the bundle.Dockerfile that were removed when 'make bundle' was run. Added back 'com.redhat.openshift.versions:' line to bundle/metadata/annotations.yaml Signed-off-by: Alina Ryan <aliryan@redhat.com>
Updates the OSDK version from 1.15.0 to 1.32.0 in common.sh and pre-release.sh Signed-off-by: Alina Ryan <aliryan@redhat.com>
Adjusts the recommended OSDK install version from 1.15.0 to 1.32.0 in the prerequisites. Signed-off-by: Alina Ryan <aliryan@redhat.com>
The controller gen tool considers every file in the directory tree by default when generating CRDs and RBAC. This caused an issue when running 'make bundle' with the new OSDK version as the CONTROLLER_GEN tool was also generating files for our submodules. This commit fixes the problem by only specifying the cmd, controllers, and pkg paths in the 'make manifests' and 'make generate' commands. Signed-off-by: Alina Ryan <aliryan@redhat.com>
2306266
to
82c730e
Compare
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alinaryan, sebsoto 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 |
/test remaining-required |
/test aws-e2e-upgrade |
/override ci/prow/nutanix-e2e-operator |
@sebsoto: Overrode contexts on behalf of sebsoto: ci/prow/nutanix-e2e-operator 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. |
@alinaryan: 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. |
Updates the OSDK version to latest v1.32.0.
Added updates required for Golang/v3 based operators following https://sdk.operatorframework.io/docs/upgrading-sdk-version/ starting from version 1.16.0 to latest 1.32.0.
Updates the OSDK version in our pre-release.sh script and the hacking script.
Skipped anything that did not apply to our operator (helm/ansible/non-Go-v3 based operators)