Skip to content
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

Bind Proxmoxmachine Webhook #55

Merged
merged 1 commit into from
Jan 10, 2024
Merged

Bind Proxmoxmachine Webhook #55

merged 1 commit into from
Jan 10, 2024

Conversation

mcbenjemaa
Copy link
Member

@mcbenjemaa mcbenjemaa commented Jan 10, 2024

Summary:

In This PR #42, the machine webhook is introduced/

but the binding was not implemented.

Copy link
Collaborator

@65278 65278 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
edit: (on second thought, no)

Copy link
Collaborator

@65278 65278 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're aware that this is double pasted?
These code blocks are exactly the same.

if err = (&webhook.ProxmoxCluster{}).SetupWebhookWithManager(mgr); err != nil {

if err = (&webhook.ProxmoxMachine{}).SetupWebhookWithManager(mgr); err != nil {

@mcbenjemaa
Copy link
Member Author

What is that?

@mcbenjemaa
Copy link
Member Author

mcbenjemaa commented Jan 10, 2024

yeah, that's webhook for ProxmoxCluster and the other is for ProxmoxMachine

@65278
Copy link
Collaborator

65278 commented Jan 10, 2024

Lines 143 to 146 and Lines 147 to 150 are the exact same code block. To me it looks like you're just pasting the same block for no reason.

@mcbenjemaa
Copy link
Member Author

mcbenjemaa commented Jan 10, 2024

not exactly:
both types use the same function name, SetupWebhookWithManager()

(&webhook.ProxmoxCluster{})
(&webhook.ProxmoxMachine{}

Copy link
Collaborator

@65278 65278 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must be going blind.

@mcbenjemaa mcbenjemaa merged commit c70897f into main Jan 10, 2024
9 checks passed
@mcbenjemaa mcbenjemaa deleted the webhook branch January 10, 2024 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants