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

Supports canary routing with multiple values for one header #36

Closed
lianglli opened this issue Aug 4, 2023 · 1 comment · Fixed by #72
Closed

Supports canary routing with multiple values for one header #36

lianglli opened this issue Aug 4, 2023 · 1 comment · Fixed by #72
Labels
enhancement New feature or request
Milestone

Comments

@lianglli
Copy link
Member

lianglli commented Aug 4, 2023

nginx.ingress.kubernetes.io/canary-by-header-value

@lianglli lianglli added the enhancement New feature or request label Aug 4, 2023
@lianglli lianglli added this to the 1.0.1 milestone Aug 4, 2023
@lianglli lianglli changed the title Supports canary routing of canary-by-header-value with multi header values Supports canary routing of canary-by-header-value with multiple values for one header Aug 4, 2023
@lianglli lianglli changed the title Supports canary routing of canary-by-header-value with multiple values for one header Supports canary routing with multiple values for one header Aug 4, 2023
@lianglli
Copy link
Member Author

lianglli commented Nov 1, 2023

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    nginx.ingress.kubernetes.io/canary: "true"
    nginx.ingress.kubernetes.io/canary-by-header: x-open
    nginx.ingress.kubernetes.io/canary-by-header-value: test1||test2
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
  creationTimestamp: "2023-10-30T09:03:04Z"
  generation: 1
  name: tengine-ingress-hello-header-ing
  namespace: default
  resourceVersion: "28147345"
  uid: 7a5d1c7e-3da6-46f7-81a3-8182e1b420d1
spec:
  ingressClassName: opensource-ingress
  rules:
  - host: echo.w1.com
    http:
      paths:
      - backend:
          service:
            name: tengine-ingress-hello-service
            port:
              number: 80
        path: /
        pathType: Prefix
  tls:
  - hosts:
    - echo.w1.com
    secretName: https-server-1
status:
  loadBalancer:
    ingress:
    - {}

............................................................................

$ curl -i -k -H "x-open: test2" https://echo.w1.com
HTTP/2 200 
server: Tengine/3.1.0
date: Wed, 01 Nov 2023 08:43:46 GMT
content-type: text/html
content-length: 139
last-modified: Mon, 30 Oct 2023 08:15:02 GMT
strict-transport-security: max-age=0
ups-target-key: default-tengine-ingress-hello-service-80
x-protocol: HTTP/2.0
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000

<html><head><title>HTTP Hello World</title></head><body><h1>Hello from tengine-ingress-hello-deployment-5f7699f65b-jt4kc</h1></body></html>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant