Skip to content

Commit

Permalink
Fix nil error when using BootstrapOptions.Host
Browse files Browse the repository at this point in the history
Signed-off-by: ichekrygin <illya.chekrygin@gmail.com>
  • Loading branch information
ichekrygin committed Jan 1, 2019
1 parent 4c0ea9d commit 6cb24d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/webhook/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ func (s *Server) validatingWHConfigs() (runtime.Object, error) {
}

func (s *Server) admissionWebhook(path string, wh *admission.Webhook) (*admissionregistration.Webhook, error) {
if wh.NamespaceSelector == nil && len(s.Service.Namespace) > 0 {
if wh.NamespaceSelector == nil && (s.Service == nil || s.Service.Namespace == "") {
wh.NamespaceSelector = &metav1.LabelSelector{
MatchExpressions: []metav1.LabelSelectorRequirement{
{
Expand Down

0 comments on commit 6cb24d8

Please sign in to comment.