Skip to content

Commit 79800a1

Browse files
committed
Merge branch '2.0.x_dev' into opt/tenant
2 parents bec0927 + a468414 commit 79800a1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

api/v1alpha1/obtenant_webhook.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,13 @@ func (r *OBTenant) ValidateUpdate(old runtime.Object) (admission.Warnings, error
9393
func (r *OBTenant) validateMutation() error {
9494
var allErrs field.ErrorList
9595

96+
if r.Spec.Credentials.Root == "" {
97+
allErrs = append(allErrs, field.Invalid(field.NewPath("spec").Child("credentials").Child("root"), r.Spec.Credentials.Root, "Root password user secretref must be set"))
98+
}
99+
if r.Spec.Credentials.StandbyRO == "" {
100+
allErrs = append(allErrs, field.Invalid(field.NewPath("spec").Child("credentials").Child("standbyRo"), r.Spec.Credentials.StandbyRO, "Standby read-only user password secretref must be set"))
101+
}
102+
96103
// 1. Standby tenant must have a source
97104
if r.Spec.TenantRole == constants.TenantRoleStandby {
98105
if r.Spec.Source == nil {

0 commit comments

Comments
 (0)