Skip to content

Commit 97cfffd

Browse files
authored
Merge pull request #1076 from jiachengxu/webhook-port
⚠️ Change default webhook port to 9443
2 parents 5f112fb + 8a26689 commit 97cfffd

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

pkg/builder/builder_suite_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ var _ = AfterSuite(func() {
7474
metrics.DefaultBindAddress = ":8080"
7575

7676
// Change the webhook.DefaultPort back to the original default.
77-
webhook.DefaultPort = 443
77+
webhook.DefaultPort = 9443
7878
})
7979

8080
func addCRDToEnvironment(env *envtest.Environment, gvks ...schema.GroupVersionKind) {

pkg/manager/manager_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,14 @@ var _ = Describe("manger.Manager", func() {
135135

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

142142
By("checking options are passed to the webhook server")
143143
svr := m.GetWebhookServer()
144144
Expect(svr).NotTo(BeNil())
145-
Expect(svr.Port).To(Equal(9443))
145+
Expect(svr.Port).To(Equal(9440))
146146
Expect(svr.Host).To(Equal("foo.com"))
147147

148148
close(done)

pkg/webhook/server.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import (
3737
)
3838

3939
// DefaultPort is the default port that the webhook server serves.
40-
var DefaultPort = 443
40+
var DefaultPort = 9443
4141

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

4949
// Port is the port number that the server will serve.
50-
// It will be defaulted to 443 if unspecified.
50+
// It will be defaulted to 9443 if unspecified.
5151
Port int
5252

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

0 commit comments

Comments
 (0)