Skip to content

Supports canary routing of modulo operation (mod) based on value of query param  #50

Closed

Description

@lianglli
No description provided.

Activity

  1. added
    enhancement
    on Aug 4, 2023
  2. added this to the 1.0.1 milestone on Aug 4, 2023
  3. self-assigned this
    on Aug 4, 2023
  4. lianglli commented on Nov 1, 2023

    @lianglli
    MemberAuthor
    apiVersion: networking.k8s.io/v1
    kind: Ingress
    metadata:
      annotations:
        nginx.ingress.kubernetes.io/canary: "true"
        nginx.ingress.kubernetes.io/canary-by-query: test4
        nginx.ingress.kubernetes.io/canary-mod-divisor: "100"
        nginx.ingress.kubernetes.io/canary-mod-relational-operator: <
        nginx.ingress.kubernetes.io/canary-mod-remainder: "8"
        nginx.ingress.kubernetes.io/ssl-redirect: "true"
      creationTimestamp: "2023-11-01T09:42:20Z"
      generation: 2
      name: tengine-ingress-hello-query-mod-ing
      namespace: default
      resourceVersion: "28560903"
      uid: 689b085e-cd54-4549-9580-c9b578a54e9a
    spec:
      ingressClassName: opensource-ingress
      rules:
      - host: echo.w1.com
        http:
          paths:
          - backend:
              service:
                name: tengine-ingress-hello4-service
                port:
                  number: 80
            path: /
            pathType: Prefix
      tls:
      - hosts:
        - echo.w1.com
        secretName: https-server-1
    status:
      loadBalancer:
        ingress:
        - {}
    

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

    $ curl -i -k https://echo.w1.com/?test4=1007
    HTTP/2 301 
    server: Tengine/3.1.0
    date: Wed, 01 Nov 2023 10:19:23 GMT
    location: /?test4=1007/
    strict-transport-security: max-age=0
    ups-target-key: default-tengine-ingress-hello4-service-80
    x-protocol: HTTP/2.0
    alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
    
    $ curl -i -k https://echo.w1.com/?test4=1008
    HTTP/2 200 
    server: Tengine/3.1.0
    date: Wed, 01 Nov 2023 10:19:44 GMT
    content-type: text/plain; charset=utf-8
    content-length: 7
    strict-transport-security: max-age=0
    ups-target-key: default-tengine-ingress-echo-service-80
    x-protocol: HTTP/2.0
    alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
    
    echo ok
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions