Skip to content

⚠️ Change default webhook port to 9443 #1076

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

Merged
merged 1 commit into from
Aug 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/builder/builder_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,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 @@ -133,14 +133,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