-
Notifications
You must be signed in to change notification settings - Fork 48
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
🌱 Allow imported and registered VMs to skip image validation checks on Create/Update #814
🌱 Allow imported and registered VMs to skip image validation checks on Create/Update #814
Conversation
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.
Looks good; left a few comments.
4d5df56
to
0d43914
Compare
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.
Left a few comments. Also, where are we restricting setting the new annotations to privileged users?
0d43914
to
24e7329
Compare
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.
Thanks for your patience Arunesh!
…create/update VMs that are imported, or registered already have the virtual machine created on the infrastructure. As such, we don't need to apply the same strict validations for them such as making sure the image is not null / valid. To that end, this change introduces annotations that will be applied on the Imported, and Registered VMs. This will allow our webhooks to skip these checks if the annotation is present. For now, maintain the existing mechanism which allows _all_ VM creations to be imageless if the import or the incremental restore feature is enabled. Once this change is merged, we will yank out that code to make that check stricter (only annotation based).
24e7329
to
d1b3d66
Compare
Minimum allowed line rate is |
What does this PR do, and why is it needed?
VMs that are imported, or registered already have the virtual machine created on the infrastructure. As such, we don't need to apply the same strict validations for them such as making sure the image is not null / valid. To that end, this change introduces an annotation that will be applied on the Imported, or Registered VMs. This will allow our webhooks to skip these checks if the annotation is present.
For now, maintain the existing mechanism which allows all VM creations to be imageless if the import or the incremental restore feature is enabled. Once this change is merged, we will yank out that code to make that check stricter (only annotation based).
Are there any special notes for your reviewer:
There;s also a change to the UT method that validates messages. Instead of splitting that into a string array and matching elements, we are now comparing substrings. This is because the comma delimiter used to split the reasons results in false splits when a reason contains an object.
Please add a release note if necessary: