Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve "Sticky session" docs #3841

Merged

Conversation

niklashigi
Copy link
Contributor

@niklashigi niklashigi commented Mar 4, 2019

What this PR does / why we need it:

This PR makes it easier for people who want to set up sticky sessions to find the information they need.

Changes:

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 4, 2019
@aledbf
Copy link
Member

aledbf commented Mar 9, 2019

@shroudedcode please rebase and squash the commits

@niklashigi niklashigi force-pushed the improve-sticky-session-docs branch from 688a620 to fb55864 Compare March 9, 2019 13:19
@ElvinEfendi
Copy link
Member

make table more readable by removing prefix from table cells

while I agree this is more readable but IMO it's less useful - users usually don't want to read the whole document and just copy paste - having the prefix together with annotation name is useful. Also this is the set standard everywhere else in the user guide. I'd rather not change that.

@niklashigi niklashigi force-pushed the improve-sticky-session-docs branch from 0165fe6 to ec72470 Compare March 18, 2019 21:32
@ElvinEfendi
Copy link
Member

@shroudedcode thanks a lot!

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 27, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ElvinEfendi, shroudedcode

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 27, 2019
@k8s-ci-robot k8s-ci-robot merged commit f66902d into kubernetes:master Mar 27, 2019
@niklashigi niklashigi deleted the improve-sticky-session-docs branch March 28, 2019 05:10
@WStasW
Copy link

WStasW commented May 7, 2019

I think it needs to have better docs for sticky session, was just about to make a thread regarding the issue. Im not sure on how to write cookie path, i use regular expression but the example provided there dismisses it, and just shows how to configure all of them except cookie path.

@niklashigi
Copy link
Contributor Author

@WStasW The session-cookie-path annotation corresponds to the Path directive on the cookie. In most cases you want this to be / so that the cookie works across your entire domain.

Here's an example using Path=/:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: example
  annotations:
    nginx.ingress.kubernetes.io/affinity: cookie
    nginx.ingress.kubernetes.io/session-cookie-path: /
    nginx.ingress.kubernetes.io/rewrite-target: /$1
spec:
  rules:
    - host: example.com
      http:
        paths:
          - path: /(.*)
            backend:
              serviceName: example
              servicePort: 80

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants