Skip to content

Commit

Permalink
Update net-istio configuration format
Browse files Browse the repository at this point in the history
  • Loading branch information
pastequo committed Feb 9, 2024
1 parent de4f35f commit 5bb2795
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 20 deletions.
7 changes: 5 additions & 2 deletions docs/install/installing-istio.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,14 @@ need to update gateway configmap `config-istio` under the `knative-serving` name
kubectl edit configmap config-istio -n knative-serving
```

2. Replace the `local-gateway.knative-serving.knative-local-gateway` field with the custom service. As an example, if you name both
2. Replace the `local-gateways` field with the custom service. As an example, if you name both
the service and deployment `custom-local-gateway` under the namespace `istio-system`, it should be updated to:

```
custom-local-gateway.istio-system.svc.cluster.local
local-gateways: |
- name: knative-local-gateway
namespace: knative-serving
service: custom-local-gateway.istio-system.svc.cluster.local
```

As an example, if both the custom service and deployment are labeled with `custom: custom-local-gateway`, not the default
Expand Down
36 changes: 30 additions & 6 deletions docs/install/operator/configuring-serving-cr.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,10 +312,19 @@ spec:
istio: ingressgateway
config:
istio:
gateway.knative-serving.knative-ingress-gateway: "custom-ingressgateway.custom-ns.svc.cluster.local"
external-gateways: |
- name: knative-ingress-gateway
namespace: knative-serving
service: custom-ingressgateway.custom-ns.svc.cluster.local
```

The key in `spec.config.istio` is in the format of `gateway.<gateway_namespace>.<gateway_name>`.
The key in `spec.config.istio` is in the format of
```
external-gateways: |
- name: <gateway_name>
namespace: <gateway_namespace>
service: istio-ingressgateway.istio-system.svc.cluster.local
```

## Replace the ingress gateway

Expand All @@ -332,10 +341,19 @@ spec:
spec:
config:
istio:
gateway.custom-ns.knative-custom-gateway: "istio-ingressgateway.istio-system.svc.cluster.local"
external-gateways: |
- name: knative-custom-gateway
namespace: custom-ns
service: istio-ingressgateway.istio-system.svc.cluster.local
```

The key in `spec.config.istio` is in the format of `gateway.<gateway_namespace>.<gateway_name>`.
The key in `spec.config.istio` is in the format of
```
external-gateways: |
- name: <gateway_name>
namespace: <gateway_namespace>
service: istio-ingressgateway.istio-system.svc.cluster.local
```

## Configuration of cluster local gateway

Expand Down Expand Up @@ -369,7 +387,10 @@ spec:
custom: custom-local-gateway
config:
istio:
local-gateway.knative-serving.knative-local-gateway: "custom-local-gateway.istio-system.svc.cluster.local"
local-gateways: |
- name: knative-local-gateway
namespace: knative-serving
service: custom-local-gateway.istio-system.svc.cluster.local
```

## Servers configuration for Istio gateways:
Expand Down Expand Up @@ -400,7 +421,10 @@ spec:
- <test-ip>
config:
istio:
local-gateway.knative-serving.knative-local-gateway: "custom-local-gateway.istio-system.svc.cluster.local"
local-gateways: |
- name: knative-local-gateway
namespace: knative-serving
service: custom-local-gateway.istio-system.svc.cluster.local
```

## Customize kourier-bootstrap for Kourier gateways:
Expand Down
5 changes: 4 additions & 1 deletion docs/install/operator/knative-with-operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,10 @@ Knative Serving with different ingresses:
# ...
config:
istio:
local-gateway.<local-gateway-namespace>.knative-local-gateway: "knative-local-gateway.<istio-namespace>.svc.cluster.local"
local-gateways: |
- name: knative-local-gateway
namespace: <local-gateway-namespace>
service: knative-local-gateway.<istio-namespace>.svc.cluster.local
```
Where:
Expand Down
36 changes: 25 additions & 11 deletions docs/serving/setting-up-custom-ingress-gateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,22 @@ namespace:
# #
################################
# ...
gateway.knative-serving.knative-ingress-gateway: "istio-ingressgateway.istio-system.svc.cluster.local"
external-gateways: |
- name: knative-ingress-gateway
namespace: knative-serving
service: istio-ingressgateway.istio-system.svc.cluster.local
```

1. Edit the file to add the `gateway.knative-serving.knative-ingress-gateway: <ingress_name>.<ingress_namespace>.svc.cluster.local` field with
the fully qualified url of your service.
1. Edit the file to add the `external-gateways` field with the fully qualified url of your service.
For the example `custom-ingressgateway` service mentioned earlier, it should be updated to:

```yaml
apiVersion: v1
data:
gateway.knative-serving.knative-ingress-gateway: custom-ingressgateway.custom-ns.svc.cluster.local
external-gateways: |
- name: knative-ingress-gateway
namespace: knative-serving
service: custom-ingressgateway.custom-ns.svc.cluster.local
kind: ConfigMap
[...]
```
Expand Down Expand Up @@ -147,21 +152,30 @@ namespace:
# #
################################
# ...
gateway.knative-serving.knative-ingress-gateway: "istio-ingressgateway.istio-system.svc.cluster.local"
external-gateways: |
- name: knative-ingress-gateway
namespace: knative-serving
service: istio-ingressgateway.istio-system.svc.cluster.local
```

1. Edit the file to add the `gateway.<gateway-namespace>.<gateway-name>: istio-ingressgateway.istio-system.svc.cluster.local` field with
the customized gateway.
1. Edit the file to add the `external-gateways` field with the customized gateway.
For the example `knative-custom-gateway` mentioned earlier, it should be updated to:

```yaml
apiVersion: v1
data:
gateway.custom-ns.knative-custom-gateway: "istio-ingressgateway.istio-system.svc.cluster.local"
external-gateways: |
- name: knative-custom-gateway
namespace: custom-ns
service: istio-ingressgateway.istio-system.svc.cluster.local
kind: ConfigMap
[...]
```

The configuration format should be `gateway.<gateway-namespace>.<gateway-name>`.
`<gateway-namespace>` is optional. When it is omitted, the system searches for
the gateway in the serving system namespace `knative-serving`.
The configuration format should be
```
external-gateways: |
- name: <gateway-name>
namespace: <gateway-namespace>
service: <fully-qualified-url-of-istio-ingress-service>
```

0 comments on commit 5bb2795

Please sign in to comment.