Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed registration of the BanFlunder admission plugin #68417

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 6 additions & 3 deletions staging/src/k8s.io/sample-apiserver/pkg/cmd/server/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,16 @@ func (o WardleServerOptions) Validate(args []string) error {
}

func (o *WardleServerOptions) Complete() error {
// register admission plugins
banflunder.Register(o.RecommendedOptions.Admission.Plugins)

// add admisison plugins to the RecommendedPluginOrder
o.RecommendedOptions.Admission.RecommendedPluginOrder = append(o.RecommendedOptions.Admission.RecommendedPluginOrder, "BanFlunder")

return nil
}

func (o *WardleServerOptions) Config() (*apiserver.Config, error) {
// register admission plugins
banflunder.Register(o.RecommendedOptions.Admission.Plugins)

// TODO have a "real" external address
if err := o.RecommendedOptions.SecureServing.MaybeDefaultWithSelfSignedCerts("localhost", nil, []net.IP{net.ParseIP("127.0.0.1")}); err != nil {
return nil, fmt.Errorf("error creating self-signed certificates: %v", err)
Expand Down