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

init cluster webhook #172

Merged
merged 1 commit into from Mar 1, 2023
Merged

init cluster webhook #172

merged 1 commit into from Mar 1, 2023

Conversation

zirain
Copy link
Contributor

@zirain zirain commented Feb 27, 2023

What type of PR is this?

/kind feature

What this PR does / why we need it:

add webhook for Kurator Cluster API

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

add webhook for Kurator Cluster API

@netlify
Copy link

netlify bot commented Feb 27, 2023

Deploy Preview for preliminary-kurator canceled.

Name Link
🔨 Latest commit 4508947
🔍 Latest deploy log https://app.netlify.com/sites/preliminary-kurator/deploys/63ff07978d09f40007f9d8fd

return allErrs
}

func validateCIDR(cidr string, fldPath *field.Path) field.ErrorList {
Copy link
Member

Choose a reason for hiding this comment

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

duplicate with validateCIDRBlocks?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

difference between []string and string

var allErrs field.ErrorList

// The Cluste name is used as a label value, so it must be a valid label value.
if errs := validation.IsValidLabelValue(in.Name); len(errs) > 0 {
Copy link
Member

Choose a reason for hiding this comment

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

I think this is not user friendly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cluster API require this, we can do some conversion?

@zirain zirain force-pushed the webhook branch 2 times, most recently from 3868aef to 1413eb0 Compare February 28, 2023 03:19
@zirain zirain changed the title cluster api:init webhook init cluster webhook Feb 28, 2023
@zirain zirain force-pushed the webhook branch 7 times, most recently from f19ce8d to 0223cdc Compare March 1, 2023 07:49
Signed-off-by: hejianpeng <hejianpeng2@huawei.com>
Copy link
Member

@hzxuzhonghu hzxuzhonghu left a comment

Choose a reason for hiding this comment

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

/lgtm

@kurator-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hzxuzhonghu

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants