Custom readiness probe for user gateways

we deploy custom (user) g/w in addition to the default, the user g/w has readiness probe hardcoded to envoy’s health check uri, ref: https://github.com/istio/istio/blob/a36e5d7e82ae85bf260719abb33649e8f302cdef/install/kubernetes/helm/istio/charts/gateways/templates/deployment.yaml#L189

is there an easy way to change this readiness probe to our application health check? this way k8 won’t add the custom g/w into service unless the app health check is passed.

currently I am thinking to edit the helm chart and change the hardcoded readiness probe and then deploy user g/w.

is there better option to achieve this?

i fixed this by adding applicationPorts helm variable as per https://github.com/istio/istio/blob/35eb9dc7c6e78dac5bd8c3d142bc2a4601616932/install/kubernetes/helm/istio/charts/gateways/templates/deployment.yaml#L183

this is config snippet if anyone comes here with the same problem:

gateways:
  enabled: true
  istio-ingressgateway:
    enabled: false
  custom-gateway:
    applicationPorts: 10002,10003,10004
    enabled: true