Skip to content

Commit

Permalink
Merge pull request #272 from ichekrygin/boostrap-service-nil
Browse files Browse the repository at this point in the history
🐛 fix `nil` error when using `BootstrapOptions.Host`
  • Loading branch information
k8s-ci-robot committed Jan 7, 2019
2 parents 5aed6d6 + 01f78d9 commit 60b09a8
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 && len(s.Service.Namespace) > 0 {
wh.NamespaceSelector = &metav1.LabelSelector{
MatchExpressions: []metav1.LabelSelectorRequirement{
{
Expand Down

0 comments on commit 60b09a8

Please sign in to comment.