Exposing the webhook receiver using GCE Ingress #4912
Unanswered
valorl
asked this question in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Since Flux notification-controller serves the webhook and health/readiness endpoints on different ports (
9292
and9440
respectively), GCE Ingress requires a custom configuration.BackendConfig
An Ingress rule handled by the GKE-native ingress-gce controller translates into a load balancer backend service. Each of these needs to have a health check (i.e. a GCP-side health check, separate from standard K8S probes) configured.
By default there's no need to configure this explicitly, the health path will be inferred from the K8S native readiness probe in the serving Pod's spec (assuming it has been defined). However, this is only inferred if the probe is defined with the same port as the port being served. Since this is not the case for the notification controller, the resulting backend service health check will be defaulted to
/
on the serving port (9292
in this case). Since the webhook port does not respond 200 on/
, the backend will never become healthy.To fix this, we can apply a
BackendConfig
specifying the health check port:The
BackendConfig
needs to be explicitly tied to the Service being exposed on the Ingress, e.g. via a kustomize patch:Ingress definition, for completeness:
Network Policy
In a default flux installation, the network policy (
allow-webhooks
) to allow ingress to the notification controller only allows traffic from other Pods but not from outside the cluster. This needs to be changed to allow traffic from Google LB probe ranges.Beta Was this translation helpful? Give feedback.
All reactions