Skip to content

Commit

Permalink
Merge pull request #1076 from jiachengxu/webhook-port
Browse files Browse the repository at this point in the history
⚠️ Change default webhook port to 9443
  • Loading branch information
k8s-ci-robot authored Aug 5, 2020
2 parents 5f112fb + 8a26689 commit 97cfffd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/builder/builder_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ var _ = AfterSuite(func() {
metrics.DefaultBindAddress = ":8080"

// Change the webhook.DefaultPort back to the original default.
webhook.DefaultPort = 443
webhook.DefaultPort = 9443
})

func addCRDToEnvironment(env *envtest.Environment, gvks ...schema.GroupVersionKind) {
Expand Down
4 changes: 2 additions & 2 deletions pkg/manager/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,14 @@ var _ = Describe("manger.Manager", func() {

It("should lazily initialize a webhook server if needed", func(done Done) {
By("creating a manager with options")
m, err := New(cfg, Options{Port: 9443, Host: "foo.com"})
m, err := New(cfg, Options{Port: 9440, Host: "foo.com"})
Expect(err).NotTo(HaveOccurred())
Expect(m).NotTo(BeNil())

By("checking options are passed to the webhook server")
svr := m.GetWebhookServer()
Expect(svr).NotTo(BeNil())
Expect(svr.Port).To(Equal(9443))
Expect(svr.Port).To(Equal(9440))
Expect(svr.Host).To(Equal("foo.com"))

close(done)
Expand Down
4 changes: 2 additions & 2 deletions pkg/webhook/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
)

// DefaultPort is the default port that the webhook server serves.
var DefaultPort = 443
var DefaultPort = 9443

// Server is an admission webhook server that can serve traffic and
// generates related k8s resources for deploying.
Expand All @@ -47,7 +47,7 @@ type Server struct {
Host string

// Port is the port number that the server will serve.
// It will be defaulted to 443 if unspecified.
// It will be defaulted to 9443 if unspecified.
Port int

// CertDir is the directory that contains the server key and certificate. The
Expand Down

0 comments on commit 97cfffd

Please sign in to comment.