-
Notifications
You must be signed in to change notification settings - Fork 10
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
MULTIARCH-4304: Add validation for the name of the PodPlacementConfig… #72
MULTIARCH-4304: Add validation for the name of the PodPlacementConfig… #72
Conversation
@AnnaZivkovic: This pull request references MULTIARCH-4304 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.16.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 openshift-eng/jira-lifecycle-plugin repository. |
The error doesn't look so bad to me and the solution is quick enough to cover the problem for now. The alternative is to hack the Makefile target so that the CRD yaml is patched after all the other steps execute: we're needing it in https://github.com/openshift/multiarch-tuning-operator/pull/70/files#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52R291 (as per suggestions in some operator-framework threads internally), but I like that even less. What's the |
@AnnaZivkovic, remember that we also have to remove any previous code that was checking the name in the pod placement config controller. Also, let's check the integration test cases, patch any that were already verifying the previous work, or add at least one integration/unit test that verifies CR with a wrong name cannot be created |
6968310
to
f1ec914
Compare
@aleskandro are you talking about removing the logic here and the stuff below it? |
From line 100 in particular. But yes, we could even delete that if statement that you linked as we can assume the name of the object will always be the correct one |
8049645
to
5fa6d5b
Compare
5fa6d5b
to
590fb53
Compare
/retest-required |
28f24bf
to
1ec0d70
Compare
/retest-required |
1ec0d70
to
e7a42e9
Compare
/retest-required |
e7a42e9
to
a7bd992
Compare
/retest |
/test vendor |
a7bd992
to
6990fe2
Compare
… using JSON patches
5060a3e
to
2cf18b9
Compare
controllers/operator/clusterpodplacementconfig_controller_test.go
Outdated
Show resolved
Hide resolved
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.
Hey @AnnaZivkovic thanks!
Leaving some comments. In general, it looks good to me. I wonder if we can simplify the kustomize to buffer process by using resMap (see suggestions).
2cf18b9
to
56a6e61
Compare
56a6e61
to
20ae98b
Compare
@AnnaZivkovic: 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-sigs/prow repository. I understand the commands that are listed here. |
/lgtm Thanks @AnnaZivkovic |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aleskandro 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 |
… so there can only be one cluster
Unfortunately, make manifests overrides manually adding validation (example here) in multiarch.openshift.io_podplacementconfigs.yaml.
The only issue with using +kubebuilder:validation:XValidation:rule is the error message is not as nicely formatted as shown