-
Notifications
You must be signed in to change notification settings - Fork 23
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
Create a webhook for volumereplication and volumereplicationclass #90
Conversation
operator-sdk alpha config-3alpha-to-3 WARN[0000] Config version 3-alpha has been stabilized as 3, and 3-alpha is no longer supported. Run `operator-sdk alpha config-3alpha-to-3` to upgrade your PROJECT config file to version 3 Signed-off-by: Nitin Goyal <[email protected]>
operator-sdk create webhook --group replication --version v1alpha1 \ --kind VolumeReplication --programmatic-validation --defaulting Signed-off-by: Nitin Goyal <[email protected]>
I have not tested this yet. Will give it a shot. |
Please provide the logs and output once you finish with the testing. |
VRC webhook results when I am trying to change anything in the spec
|
Signed-off-by: Nitin Goyal <[email protected]>
operator-sdk create webhook --group replication --version v1alpha1 \ --kind VolumeReplicationClass --programmatic-validation --defaulting Signed-off-by: Nitin Goyal <[email protected]>
Signed-off-by: Nitin Goyal <[email protected]>
Signed-off-by: Nitin Goyal <[email protected]>
VR webhook is not working as expected as of now will debug and update
|
Let me try this if it works operator-framework/operator-sdk#4602 |
Finally VR webhook is also working
|
resolve: operator-framework/operator-sdk#4602 Signed-off-by: Nitin Goyal <[email protected]>
Signed-off-by: Nitin Goyal <[email protected]>
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.
Update PROJECT config for 3alpha to 3
commit should be a separate PR as it is not specific to webhooks. This will help us track changes through PRs easily.
VolumeReplication
webhook scaffold and implementation should be a single commit. Same for VolumeReplicationClass
webhook scaffold and implementation.
Controller runtime update should be a separate PR. Sometimes it has breaking changes which needs explicit communication.
# TODO: remove --skip-files controllers/suite_test.go once logic is implemented | ||
args: -E gosec --timeout=6m --skip-files controllers/suite_test.go | ||
# TODO: remove --skip-files controllers/suite_test.go api/v1alpha1/webhook_suite_test.go once logic is implemented | ||
args: -E gosec --timeout=6m --skip-files controllers/suite_test.go,api/v1alpha1/webhook_suite_test.go |
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.
Why are we skipping tests instead of implementing it? At the every least we need to mark it as TODO and create a tracker issue.
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.
It already a TODO to remove these skip-files once we implement tests. We can create a issue.
This can be done. I faced this issue while creating scafolding for webhook that's why updated in this one itself
I would like to keep them as separate commits. It makes life easy to distinguish b/w generated code and implemented logic.
I still think that we should send with this PR itself, because new controller runtime has a fix for webhook itself. |
How to test: change the image to create a cert manager create certies, required service etc now you can test the webhook functionality |
This pull request now has conflicts with the target branch. Could you please resolve conflicts and force push the corrected changes? 🙏 |
Closing this PR as it is not required anymore. |
Fixes #88, #89
Signed-off-by: Nitin Goyal [email protected]