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
Adding secretef Webhook For Backingstore and Namespacestore #930
Adding secretef Webhook For Backingstore and Namespacestore #930
Conversation
@dannyzaken @kfir-payne please take a look. |
9e26122
to
e79b7dc
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.
I think it would be easier to address those comments after a rebase because the structure of calling the validation had changed.
Also tests are missing.
@@ -92,6 +92,10 @@ func (nsv *ResourceValidator) ValidateUpdateNS() { | |||
nsv.SetValidationResult(false, err.Error()) | |||
return | |||
} | |||
if err := validations.ValidateNamespacestoreSecretRefNamespace(*ns); err != nil && util.IsValidationError(err) { |
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.
I think that the call for ValidateNamespacestoreSecretRefNamespace
should be inside ValidateNamespaceStore
function, that way this validation will be checked in creation ops as well.
func ValidateBackingstoreSecretRefNamespace(bs nbv1.BackingStore) error{ | ||
secretRef, err := util.GetBackingStoreSecretByType(&bs); | ||
if err != nil { | ||
return util.ValidationError{ |
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 not a validation error, it's an error in the retrieval of the Backingstore secret reference.
same goes for Namespacestore.
- Adding secretef Webhook For Backingstore and Namespacestore to validate that it have namespace in it. Signed-off-by: liranmauda <liran.mauda@gmail.com>
e79b7dc
to
d9fead1
Compare
@liranmauda I think that for now we can skip the webhook validation for that. let's close |
Closing. |
Explain the changes
Closing the gap from #914
Signed-off-by: liranmauda liran.mauda@gmail.com
Issues:
Testing Instructions: