Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: v.oleynikov <vasily.oleynikov@flant.com>
  • Loading branch information
duckhawk committed Mar 22, 2024
1 parent bca0fb1 commit 8f90cdc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions images/webhooks/src/validators/storageClassUpdate.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package validators

import (
"context"
"errors"
"webhooks/v1alpha1"

"github.com/slok/kubewebhook/v2/pkg/model"
Expand All @@ -44,8 +43,8 @@ func StorageClassUpdate(ctx context.Context, _ *model.AdmissionReview, obj metav
}

if thickExists == true && thinExists == true {
return &kwhvalidating.ValidatorResult{Valid: false},
errors.New("there must be only thin or thick pools simultaneously")
return &kwhvalidating.ValidatorResult{Valid: false, Message: "there must be only thin or thick pools simultaneously"},
nil
} else {
return &kwhvalidating.ValidatorResult{Valid: true},
nil
Expand Down

0 comments on commit 8f90cdc

Please sign in to comment.