Skip to content

Commit 4a18e0b

Browse files
committed
allow to enable or disabled the ingress default
1 parent ca5167f commit 4a18e0b

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

cmd/app.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ import (
2222
)
2323

2424
var (
25-
flagV int
26-
enableLogDump bool
27-
logDumpDir string
28-
enableLBPortMapping bool
29-
gatewayChannel string
25+
flagV int
26+
enableLogDump bool
27+
logDumpDir string
28+
enableLBPortMapping bool
29+
gatewayChannel string
30+
enableDefaultIngress bool
3031
)
3132

3233
func init() {
@@ -39,6 +40,7 @@ func init() {
3940
flag.StringVar(&logDumpDir, "logs-dir", "", "store logs to the specified directory")
4041
flag.BoolVar(&enableLBPortMapping, "enable-lb-port-mapping", false, "enable port-mapping on the load balancer ports")
4142
flag.StringVar(&gatewayChannel, "gateway-channel", "standard", "define the gateway API release channel to be used (standard,experimental), by default is standard")
43+
flag.BoolVar(&enableDefaultIngress, "enable-default-ingress", true, "enable default ingress for the cloud provider kind ingress")
4244

4345
flag.Usage = func() {
4446
fmt.Fprint(os.Stderr, "Usage: cloud-provider-kind [subcommand] [options]\n\n")
@@ -115,6 +117,8 @@ func Main() {
115117
logger.Errorf("error setting klog verbosity to %d : %v", flagV, err)
116118
}
117119

120+
config.DefaultConfig.IngressDefault = enableDefaultIngress
121+
118122
if config.GatewayReleaseChannel(gatewayChannel) == "" {
119123
klog.Fatalf("Unknown Gateway API release channel %s", gatewayChannel)
120124
}

0 commit comments

Comments
 (0)