Skip to content

Commit 7ea2220

Browse files
Md. Emruz Hossaintamalsaha
authored andcommitted
Replace initializers with mutation webhook for workloads (#363)
1 parent 2770e6b commit 7ea2220

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

root.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616
"github.com/spf13/pflag"
1717
genericapiserver "k8s.io/apiserver/pkg/server"
1818
clientsetscheme "k8s.io/client-go/kubernetes/scheme"
19+
"k8s.io/kubernetes/pkg/api/legacyscheme"
1920
)
2021

2122
const (
@@ -41,6 +42,7 @@ func NewRootCmd() *cobra.Command {
4142
}
4243
}
4344
scheme.AddToScheme(clientsetscheme.Scheme)
45+
scheme.AddToScheme(legacyscheme.Scheme)
4446
util.LoggerOptions = golog.ParseFlags(c.Flags())
4547
},
4648
}

server/options.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ import (
66

77
stringz "github.com/appscode/go/strings"
88
v "github.com/appscode/go/version"
9-
hookapi "github.com/appscode/kutil/admission/api"
109
cs "github.com/appscode/stash/client/clientset/versioned"
11-
"github.com/appscode/stash/pkg/admission/plugin"
1210
"github.com/appscode/stash/pkg/controller"
1311
"github.com/appscode/stash/pkg/docker"
1412
"github.com/spf13/pflag"
@@ -74,7 +72,5 @@ func (s *ControllerOptions) ApplyTo(cfg *controller.ControllerConfig) error {
7472
if cfg.CRDClient, err = crd_cs.NewForConfig(cfg.ClientConfig); err != nil {
7573
return err
7674
}
77-
cfg.AdmissionHooks = []hookapi.AdmissionHook{&plugin.CRDValidator{}}
78-
7975
return nil
8076
}

0 commit comments

Comments
 (0)