I need to change the 'hosts' of the Istio ingressgateway (Gateway object) from default value '*' to 'whatever' during Istio installation. We are using the IstioOperator to make customizations for our installation. I think it should be done with k8s overlays
...
k8s:
overlays:
- kind: Gateway
name: istio-ingressgateway
patches:
- path: spec.servers.??????
value: whatever
...
What should be the expression for the path attribute ?
I found some info on https://github.com/istio/istio/blob/master/operator/pkg/patch/patch.go, but the case is not exactly the same.
So, the istio-gateway Gateway object in namespace istio-system should change from
spec:
servers:
- hosts:
- '*'
port:
name: http
number: 80
protocol: HTTP
to
spec:
servers:
- hosts:
- whatever
port:
name: http
number: 80
protocol: HTTP
We are using Istio 1.5.6
Thx !
UPDATE with a working example
Thx to @Jakub for pointing me to the right direction.
overlays:
- kind: Gateway
name: istio-ingressgateway
patches:
- path: spec.servers[0]
value:
hosts:
- whatever.dummy
port:
name: http
number: 80
protocol: HTTP