Fix: Set flyteadmin gRPC port to 80 in ingress if using TLS between load balancer and backend #3964
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe your changes
Flyte can be configured to use TLS between the ingress (or rather load balancer) and the flyteadmin backend.
This is required for instance in GKE clusters when using the GCE ingress controller (instead of nginx) since gRPC requires http2 and http2 between GCE load balancers and backends in GKE clusters requires TLS (source):
Whether flyteadmin uses TLS (and with which certificate) is controlled in the helm values file via:
(The certificate and key needs to be mounted into flyteadmin e.g. via a secret. Can be self-signed.)
However, in case TLS is enabled, flyteadmin doesn't seve the http server on port 80 and the gRPC server on port 81 but actually a single http(s) server that wraps both of them on port 80!
Details:
In flyteadmin's main
serve
entrypoint there is a decision gate whetherserverConfig.Security.Secure
.serveGatewayInsecure
serverConfig.Security.Secure
is true, we instead go intoserveGatewaySecure
In the second case, all requests for flyteadmin, including gRPC, have to be sent to port 80.
This is not accounted for in the ingress template of the helm chart. Activating TLS for flyteadmin, thus, breaks the deployment.
This PR fixes this.
Check all the applicable boxes