From de42fc10b54c0a664903a7ac56e16c1d283c0f0d Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Wed, 29 Apr 2020 17:10:05 +0200 Subject: [PATCH] fix: cookie documentation. --- .../content/reference/dynamic-configuration/docker-labels.yml | 2 +- .../reference/dynamic-configuration/marathon-labels.json | 1 + docs/content/routing/providers/docker.md | 4 ++-- docs/content/routing/providers/kv.md | 4 ++-- docs/content/routing/providers/marathon.md | 4 ++-- docs/content/routing/providers/rancher.md | 4 ++-- pkg/config/dynamic/http_config.go | 2 +- .../ingress/fixtures/Ingress-with-annotations_service.yml | 2 +- 8 files changed, 12 insertions(+), 11 deletions(-) diff --git a/docs/content/reference/dynamic-configuration/docker-labels.yml b/docs/content/reference/dynamic-configuration/docker-labels.yml index 7965ff1a5..6a02d09e5 100644 --- a/docs/content/reference/dynamic-configuration/docker-labels.yml +++ b/docs/content/reference/dynamic-configuration/docker-labels.yml @@ -147,7 +147,7 @@ - "traefik.http.services.service01.loadbalancer.healthcheck.followredirects=true" - "traefik.http.services.service01.loadbalancer.passhostheader=true" - "traefik.http.services.service01.loadbalancer.responseforwarding.flushinterval=foobar" -- "traefik.http.services.service01.loadbalancer.sticky=true" +- "traefik.http.services.service01.loadbalancer.sticky.cookie=true" - "traefik.http.services.service01.loadbalancer.sticky.cookie.httponly=true" - "traefik.http.services.service01.loadbalancer.sticky.cookie.name=foobar" - "traefik.http.services.service01.loadbalancer.sticky.cookie.secure=true" diff --git a/docs/content/reference/dynamic-configuration/marathon-labels.json b/docs/content/reference/dynamic-configuration/marathon-labels.json index a6765cd25..f869a0099 100644 --- a/docs/content/reference/dynamic-configuration/marathon-labels.json +++ b/docs/content/reference/dynamic-configuration/marathon-labels.json @@ -145,6 +145,7 @@ "traefik.http.services.service01.loadbalancer.healthcheck.followredirects": "true", "traefik.http.services.service01.loadbalancer.passhostheader": "true", "traefik.http.services.service01.loadbalancer.responseforwarding.flushinterval": "foobar", +"traefik.http.services.service01.loadbalancer.sticky.cookie": "true", "traefik.http.services.service01.loadbalancer.sticky.cookie.httponly": "true", "traefik.http.services.service01.loadbalancer.sticky.cookie.name": "foobar", "traefik.http.services.service01.loadbalancer.sticky.cookie.secure": "true", diff --git a/docs/content/routing/providers/docker.md b/docs/content/routing/providers/docker.md index 44e183c63..46fa35f66 100644 --- a/docs/content/routing/providers/docker.md +++ b/docs/content/routing/providers/docker.md @@ -334,12 +334,12 @@ you'd add the label `traefik.http.services..loadbalancer.pa - "traefik.http.services.myservice.loadbalancer.healthcheck.followredirects=true" ``` -??? info "`traefik.http.services..loadbalancer.sticky`" +??? info "`traefik.http.services..loadbalancer.sticky.cookie`" See [sticky sessions](../services/index.md#sticky-sessions) for more information. ```yaml - - "traefik.http.services.myservice.loadbalancer.sticky=true" + - "traefik.http.services.myservice.loadbalancer.sticky.cookie=true" ``` ??? info "`traefik.http.services..loadbalancer.sticky.cookie.httponly`" diff --git a/docs/content/routing/providers/kv.md b/docs/content/routing/providers/kv.md index 17eacafbe..c3bd4cdac 100644 --- a/docs/content/routing/providers/kv.md +++ b/docs/content/routing/providers/kv.md @@ -106,8 +106,8 @@ A Story of key & values See [servers](../services/index.md#servers) for more information. - | Key (Path) | Value -------------------------- | - |-----------------------------------------------------------------|---------------------------------------------------------| + | Key (Path) | Value | + |-----------------------------------------------------------------|-----------------------------------------| | `traefik/http/services/myservice/loadbalancer/servers/0/url` | `http://:/` | ??? info "`traefik/http/services//loadbalancer/passhostheader`" diff --git a/docs/content/routing/providers/marathon.md b/docs/content/routing/providers/marathon.md index 9fbb04c7b..ccb0a068e 100644 --- a/docs/content/routing/providers/marathon.md +++ b/docs/content/routing/providers/marathon.md @@ -232,12 +232,12 @@ For example, to change the passHostHeader behavior, you'd add the label `"traefi "traefik.http.services.myservice.loadbalancer.healthcheck.followredirects": "true" ``` -??? info "`traefik.http.services..loadbalancer.sticky`" +??? info "`traefik.http.services..loadbalancer.sticky.cookie`" See [sticky sessions](../services/index.md#sticky-sessions) for more information. ```json - "traefik.http.services.myservice.loadbalancer.sticky": "true" + "traefik.http.services.myservice.loadbalancer.sticky.cookie": "true" ``` ??? info "`traefik.http.services..loadbalancer.sticky.cookie.httponly`" diff --git a/docs/content/routing/providers/rancher.md b/docs/content/routing/providers/rancher.md index 66d66cf5d..377856115 100644 --- a/docs/content/routing/providers/rancher.md +++ b/docs/content/routing/providers/rancher.md @@ -238,12 +238,12 @@ you'd add the label `traefik.http.services.{name-of-your-choice}.loadbalancer.pa - "traefik.http.services.myservice.loadbalancer.healthcheck.followredirects=true" ``` -??? info "`traefik.http.services..loadbalancer.sticky`" +??? info "`traefik.http.services..loadbalancer.sticky.cookie`" See [sticky sessions](../services/index.md#sticky-sessions) for more information. ```yaml - - "traefik.http.services.myservice.loadbalancer.sticky=true" + - "traefik.http.services.myservice.loadbalancer.sticky.cookie=true" ``` ??? info "`traefik.http.services..loadbalancer.sticky.cookie.httponly`" diff --git a/pkg/config/dynamic/http_config.go b/pkg/config/dynamic/http_config.go index 9261fe637..d422797d5 100644 --- a/pkg/config/dynamic/http_config.go +++ b/pkg/config/dynamic/http_config.go @@ -103,7 +103,7 @@ func (w *WRRService) SetDefaults() { // Sticky holds the sticky configuration. type Sticky struct { - Cookie *Cookie `json:"cookie,omitempty" toml:"cookie,omitempty" yaml:"cookie,omitempty"` + Cookie *Cookie `json:"cookie,omitempty" toml:"cookie,omitempty" yaml:"cookie,omitempty" label:"allowEmpty"` } // +k8s:deepcopy-gen=true diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-annotations_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-annotations_service.yml index e0de9f321..c3eaf80d3 100644 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-annotations_service.yml +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-annotations_service.yml @@ -9,7 +9,7 @@ metadata: traefik.ingress.kubernetes.io/foo: bar traefik.ingress.kubernetes.io/service.serversscheme: protocol traefik.ingress.kubernetes.io/service.passhostheader: "true" - traefik.ingress.kubernetes.io/service.sticky: "true" + traefik.ingress.kubernetes.io/service.sticky.cookie: "true" traefik.ingress.kubernetes.io/service.sticky.cookie.httponly: "true" traefik.ingress.kubernetes.io/service.sticky.cookie.name: foobar traefik.ingress.kubernetes.io/service.sticky.cookie.secure: "true"