Commit 67e36131 authored by Brad Davidson's avatar Brad Davidson Committed by Brad Davidson

Make apiserver egress args conditional on egress-selector-mode

Only configure enable-aggregator-routing and egress-selector-config-file if required by egress-selector-mode. Signed-off-by: 's avatarBrad Davidson <brad.davidson@rancher.com> (cherry picked from commit f21ae1d9) Signed-off-by: 's avatarBrad Davidson <brad.davidson@rancher.com>
parent 51227002
...@@ -174,8 +174,10 @@ func apiServer(ctx context.Context, cfg *config.Control) error { ...@@ -174,8 +174,10 @@ func apiServer(ctx context.Context, cfg *config.Control) error {
} else { } else {
argsMap["bind-address"] = cfg.APIServerBindAddress argsMap["bind-address"] = cfg.APIServerBindAddress
} }
argsMap["enable-aggregator-routing"] = "true" if cfg.EgressSelectorMode != config.EgressSelectorModeDisabled {
argsMap["egress-selector-config-file"] = runtime.EgressSelectorConfig argsMap["enable-aggregator-routing"] = "true"
argsMap["egress-selector-config-file"] = runtime.EgressSelectorConfig
}
argsMap["tls-cert-file"] = runtime.ServingKubeAPICert argsMap["tls-cert-file"] = runtime.ServingKubeAPICert
argsMap["tls-private-key-file"] = runtime.ServingKubeAPIKey argsMap["tls-private-key-file"] = runtime.ServingKubeAPIKey
argsMap["service-account-key-file"] = runtime.ServiceKey argsMap["service-account-key-file"] = runtime.ServiceKey
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment