Skip to content

Commit

Permalink
Replace initializers with mutation webhook for workloads (#363)
Browse files Browse the repository at this point in the history
  • Loading branch information
Md. Emruz Hossain authored and tamalsaha committed Mar 21, 2018
1 parent 2770e6b commit 7ea2220
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 2 additions & 0 deletions root.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"github.com/spf13/pflag"
genericapiserver "k8s.io/apiserver/pkg/server"
clientsetscheme "k8s.io/client-go/kubernetes/scheme"
"k8s.io/kubernetes/pkg/api/legacyscheme"
)

const (
Expand All @@ -41,6 +42,7 @@ func NewRootCmd() *cobra.Command {
}
}
scheme.AddToScheme(clientsetscheme.Scheme)
scheme.AddToScheme(legacyscheme.Scheme)
util.LoggerOptions = golog.ParseFlags(c.Flags())
},
}
Expand Down
4 changes: 0 additions & 4 deletions server/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ import (

stringz "github.com/appscode/go/strings"
v "github.com/appscode/go/version"
hookapi "github.com/appscode/kutil/admission/api"
cs "github.com/appscode/stash/client/clientset/versioned"
"github.com/appscode/stash/pkg/admission/plugin"
"github.com/appscode/stash/pkg/controller"
"github.com/appscode/stash/pkg/docker"
"github.com/spf13/pflag"
Expand Down Expand Up @@ -74,7 +72,5 @@ func (s *ControllerOptions) ApplyTo(cfg *controller.ControllerConfig) error {
if cfg.CRDClient, err = crd_cs.NewForConfig(cfg.ClientConfig); err != nil {
return err
}
cfg.AdmissionHooks = []hookapi.AdmissionHook{&plugin.CRDValidator{}}

return nil
}

0 comments on commit 7ea2220

Please sign in to comment.