Skip to content

Commit

Permalink
Fix Istio Ingress Gateway Service setting
Browse files Browse the repository at this point in the history
  • Loading branch information
Gyorgy Nadaban committed May 15, 2020
1 parent 2ef1503 commit a4914aa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/apis/externaldns/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,9 @@ func (cfg *Config) ParseFlags(args []string) error {
app.Flag("cf-username", "The username to log into the cloud foundry API").Default(defaultConfig.CFUsername).StringVar(&cfg.CFUsername)
app.Flag("cf-password", "The password to log into the cloud foundry API").Default(defaultConfig.CFPassword).StringVar(&cfg.CFPassword)

// Istio IngressGateway
app.Flag("istio-ingress-gateway", "The Istio Ingress gateway (default: istio-system/istio-ingressgateway)").Default("istio-system/istio-ingressgateway").StringsVar(&cfg.IstioIngressGatewayServices)

// Flags related to Contour
app.Flag("contour-load-balancer", "The fully-qualified name of the Contour load balancer service. (default: heptio-contour/contour)").Default("heptio-contour/contour").StringVar(&cfg.ContourLoadBalancerService)

Expand Down
4 changes: 4 additions & 0 deletions pkg/apis/externaldns/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ var (
RcodezeroTXTEncrypt: false,
TransIPAccountName: "",
TransIPPrivateKeyFile: "",
IstioIngressGatewayServices: []string{"istio-system/istio-ingressgateway"},
}

overriddenConfig = &Config{
Expand Down Expand Up @@ -177,6 +178,7 @@ var (
NS1IgnoreSSL: true,
TransIPAccountName: "transip",
TransIPPrivateKeyFile: "/path/to/transip.key",
IstioIngressGatewayServices: []string{"istio-system/my-istio-ingressgateway"},
}
)

Expand Down Expand Up @@ -207,6 +209,7 @@ func TestParseFlags(t *testing.T) {
"--source=service",
"--source=ingress",
"--source=connector",
"--istio-ingress-gateway=istio-system/my-istio-ingressgateway",
"--namespace=namespace",
"--fqdn-template={{.Name}}.service.example.com",
"--ignore-hostname-annotation",
Expand Down Expand Up @@ -364,6 +367,7 @@ func TestParseFlags(t *testing.T) {
"EXTERNAL_DNS_NS1_IGNORESSL": "1",
"EXTERNAL_DNS_TRANSIP_ACCOUNT": "transip",
"EXTERNAL_DNS_TRANSIP_KEYFILE": "/path/to/transip.key",
"EXTERNAL_DNS_ISTIO_INGRESS_GATEWAY": "istio-system/my-istio-ingressgateway",
},
expected: overriddenConfig,
},
Expand Down

0 comments on commit a4914aa

Please sign in to comment.