authentik: ClientIP session affinity on server service #410
Reference in New Issue
Block a user
Delete Branch "benvin/authentik-session-affinity"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Tofu applies against authentik hit a cross-replica read-back race: a create lands on one of the 3 server pods and the provider's immediate read-back hits another pod that returns stale data, failing the run with "inconsistent result after apply" (upstream bug goauthentik/terraform-provider-authentik#954, still open). ClientIP session affinity keeps a whole apply run on a single pod, sidestepping the race until the provider is fixed.
Changes
server.service.sessionAffinity: ClientIPwithsessionAffinityConfig.clientIP.timeoutSeconds: 60in the au-syd1 authentik overlay values (rendered by the vendored chart'stemplates/server/service.yaml)Tofu/terraform applies against authentik race across the 3 server replicas: a create on one pod followed by an immediate read-back on another returns stale data ("inconsistent result after apply", goauthentik/terraform-provider-authentik#954). ClientIP affinity pins an apply run to a single pod until the upstream bug is fixed. - Set server.service.sessionAffinity: ClientIP with clientIP.timeoutSeconds: 60 in the au-syd1 authentik overlay