Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

Commit

Permalink
allow to customize healthz & webhook-server port
Browse files Browse the repository at this point in the history
  • Loading branch information
ggpaue committed May 11, 2022
1 parent bd22dcc commit 67840fd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
5 changes: 4 additions & 1 deletion addons/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ func parseAddonFlags(addonFlags *addonFlags) {
}

func main() {
var webhookServerPort int
flag.IntVar(&webhookServerPort, "webhook-server-port", 9865, "The port that the webhook server serves at.")

// parse flags
flags := &addonFlags{}
parseAddonFlags(flags)
Expand Down Expand Up @@ -165,7 +168,7 @@ func main() {
mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
Scheme: scheme,
MetricsBindAddress: flags.metricsAddr,
Port: 9865,
Port: webhookServerPort,
CertDir: constants.WebhookCertDir,
LeaderElection: flags.enableLeaderElection,
LeaderElectionID: "5832a104.run.tanzu.addons",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,10 @@ spec:
cpu: 100m
memory: 40Mi
ports:
- containerPort: 9865
- containerPort: #@ data.values.tanzuAddonsManager.webhookServerPort
name: webhook-server
protocol: TCP
- containerPort: 18316
- containerPort: #@ data.values.tanzuAddonsManager.healthzPort
name: healthz
protocol: TCP
readinessProbe:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ tanzuAddonsManager:
priorityClassName: null
nodeSelector: null
tolerations: []
webhookServerPort: 9865
healthzPort: 18316
featureGates:
clusterBootstrapController: false

0 comments on commit 67840fd

Please # to comment.