Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: v.oleynikov <[email protected]>
  • Loading branch information
duckhawk committed Apr 17, 2024
1 parent 8d6f120 commit c1ef7cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions images/webhooks/src/validators/mcValidator.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package validators
import (
"context"
"encoding/json"
"fmt"
"github.com/go-logr/logr"
"k8s.io/api/admission/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -62,10 +61,11 @@ func MCValidate(w http.ResponseWriter, r *http.Request) {
mcJson := mc{}
klog.Infof("Retrieving MC object %v", json.Unmarshal(raw, &mcJson))

klog.Infof(fmt.Sprintf("%v", mcJson))
klog.Infof("%v", mcJson.Spec)

if (mcJson.Metadata.Name == "sds-replicated-volume" || mcJson.Metadata.Name == "sds-local-volume") &&
mcJson.Spec.Settings.EnableThinProvisioning == true {
klog.Infof("in module %s enabled thin provisioning", mcJson.Metadata.Name)
config, err := rest.InClusterConfig()
if err != nil {
klog.Fatal(err.Error())
Expand Down

0 comments on commit c1ef7cf

Please sign in to comment.