Secrets: Add single tenant SecureValueClient (#108099)
* Secrets: Add single tenant SecureValueClient * SecureValueClient: Rename file * SecureValueClient: Move original type to contracts package and export it by aliasing
This commit is contained in:
@@ -38,6 +38,13 @@ func (v *secureValueValidator) Validate(sv, oldSv *secretv1beta1.SecureValue, op
|
||||
}
|
||||
|
||||
// General validations.
|
||||
if sv.Name == "" {
|
||||
errs = append(errs, field.Required(field.NewPath("metadata", "name"), "a `name` is required"))
|
||||
}
|
||||
if sv.Namespace == "" {
|
||||
errs = append(errs, field.Required(field.NewPath("metadata", "namespace"), "a `namespace` is required"))
|
||||
}
|
||||
|
||||
if sv.Spec.Value != nil && len(*sv.Spec.Value) > contracts.SECURE_VALUE_RAW_INPUT_MAX_SIZE_BYTES {
|
||||
errs = append(
|
||||
errs,
|
||||
|
||||
Reference in New Issue
Block a user