-
Notifications
You must be signed in to change notification settings - Fork 335
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
feat(platform): support skip validate item #2179
Conversation
if isNeedValidateForDynamicItem(AnywhereValidateItemSelinux, cls) { | ||
selinuxErrs = ValidateSelinux(fldPath, masters) | ||
selinuxResult.Checked = true | ||
log.Infof("cls %s's %s is validated", cls.Spec.DisplayName, AnywhereValidateItemSelinux) |
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.
这个日志再加一个 cls 的 name 吧,后台查的时候displayname好像不展示
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.
before cls created, cls doesn't have name.
@@ -30,6 +30,8 @@ const ( | |||
AnywhereValidateItemFirewall = "Firewall" | |||
AnywhereValidateItemSelinux = "Selinux" | |||
AnywhereValidateItemStorage = "Storage" | |||
// validate all items | |||
AnywhereValidateItemAll = "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.
再加点前缀吧,其余的check项名字还比较有辨识度,这个all容易和别的anno冲突
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.
this is anno value, not key.
if validateMachine { | ||
allErrs = append(allErrs, ValidateClusterMachines(cls, fldPath.Child("machines"))...) | ||
if isNeedValidateForDynamicItem(AnywhereValidateItemStorage, cls) { |
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.
这个方法要不也挪validateClusterMachines里面?
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.
validateStorage方法
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.
storage info is not in spec.machines, so we not set storage validate in machine. And storage validate just run once to check storage service, even the number of masters is 3, this is different with all items in machine validate.
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.
主要是你把这个放到 validateMachine==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.
since if we dosen't have machines, we dosen't have any machine to ssh to validate storage service. So I set storage validate after machine validate.
What type of PR is this?
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: