Configure the servers for istio gateways (#4957)

* Configure the servers for istio gateways

* Fix the formatting
This commit is contained in:
Vincent 2022-05-11 10:31:34 -04:00 committed by GitHub
parent bfb8de9e96
commit cbe0097711
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 32 additions and 0 deletions

View File

@ -9,6 +9,7 @@ You can configure Knative Serving with the following options:
- [Replace the default istio-ingressgateway service](#replace-the-default-istio-ingressgateway-service)
- [Replace the knative-ingress-gateway gateway](#replace-the-knative-ingress-gateway-gateway)
- [Cluster local gateway](#configuration-of-cluster-local-gateway)
- [Servers configuration for Istio gateways](#servers-configuration-for-istio-gateways)
- [High availability](#high-availability)
- [System resource settings](#system-resource-settings)
- [Override system deployments](#override-system-deployments)
@ -383,6 +384,37 @@ spec:
local-gateway.knative-serving.knative-local-gateway: "custom-local-gateway.istio-system.svc.cluster.local"
```
## Servers configuration for Istio gateways:
You can leverage the KnativeServing CR to configure the hosts and port of the servers stanzas for `knative-local-gateway`
or `knative-ingress-gateway` gateways. For example, you would like to specify the host into `<test-ip>` and configure the
port with `number: 443`, `name: https`, `protocol: HTTPS`, and `target_port: 8443` for `knative-local-gateway`,
apply the following yaml content:
```yaml
apiVersion: operator.knative.dev/v1beta1
kind: KnativeServing
metadata:
name: knative-serving
namespace: knative-serving
spec:
ingress:
istio:
enabled: true
knative-local-gateway:
servers:
- port:
number: 443
name: https
protocol: HTTPS
target_port: 8443
hosts:
- <test-ip>
config:
istio:
local-gateway.knative-serving.knative-local-gateway: "custom-local-gateway.istio-system.svc.cluster.local"
```
## High availability
By default, Knative Serving runs a single instance of each deployment. The `spec.high-availability` field allows you to configure the number of replicas for all deployments managed by the operator.