@@ -50,13 +50,21 @@ pub mod versioned {
5050 #[ serde( default ) ]
5151 pub service_annotations : BTreeMap < String , String > ,
5252
53- /// `externalTrafficPolicy` that should be set on the created [` Service`] objects.
53+ /// `externalTrafficPolicy` that should be set on the created Service objects.
5454 ///
55- /// The default is `Local` (in contrast to `Cluster`), as we aim to direct traffic to a node running the workload
56- /// and we should keep testing that as the primary configuration. Cluster is a fallback option for providers that
57- /// break Local mode (IONOS so far).
58- #[ serde( default = "ListenerClassSpec::default_service_external_traffic_policy" ) ]
59- pub service_external_traffic_policy : core_v1alpha1:: KubernetesTrafficPolicy ,
55+ /// It is a Kubernetes feature that controls how external traffic is routed to a Kubernetes
56+ /// Service.
57+ ///
58+ /// * `Cluster`: Kubernetes defaults to `Cluster`, which means that traffic is routed to any
59+ /// node in the Kubernetes cluster that has a pod running the service.
60+ /// * `Local`: Means that traffic is only routed to pods running on the same node as the
61+ /// Service.
62+ ///
63+ /// `Local` has a better performance as it avoids a network hop, but requires a "clever"
64+ /// LoadBalancer, that respects what Pods run on which nodes and routes traffic only to that
65+ /// nodes accordingly. Some cloud providers (such as IONOS) or bare metal installations
66+ /// don't have such features, so the default is `Cluster` to work everywhere.
67+ pub service_external_traffic_policy : Option < core_v1alpha1:: KubernetesTrafficPolicy > ,
6068
6169 /// Whether addresses should prefer using the IP address (`IP`) or the hostname (`Hostname`).
6270 /// Can also be set to `HostnameConservative`, which will use `IP` for `NodePort` service types, but `Hostname` for everything else.
0 commit comments