datawire / ambassador-chart

Helm Chart for Installing Ambassador
42 stars 60 forks source link

Add support for the service session affinity #147

Closed MateuszCzubak closed 3 years ago

MateuszCzubak commented 3 years ago

This PR adds support for setting service.sessionAffinity and service.sessionAffinityConfig. From docs:

If you want to make sure that connections from a particular client are passed to the same Pod each time, you can select the session affinity based on the client's IP addresses by setting service.spec.sessionAffinity to "ClientIP" (the default is "None"). You can also set the maximum session sticky time by setting service.spec.sessionAffinityConfig.clientIP.timeoutSeconds appropriately. (the default value is 10800, which works out to be 3 hours).

Example configuration, that will set the session sticky time to 100 seconds:

service:
  sessionAffinity: ClientIP
  sessionAffinityConfig:
    clientIP:
      timeoutSeconds: 100