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:
Matheus Macabu
2025-07-17 10:56:49 +02:00
committed by GitHub
parent a0873736aa
commit 6c69ae244e
6 changed files with 376 additions and 33 deletions
@@ -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,