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

Apache APISIX SetHeader Support #2668

Closed
shareinto opened this issue Mar 21, 2023 · 1 comment · Fixed by #2678
Closed

Apache APISIX SetHeader Support #2668

shareinto opened this issue Mar 21, 2023 · 1 comment · Fixed by #2678
Labels
enhancement New feature or request

Comments

@shareinto
Copy link
Contributor

Summary

When I use apisix as the ingress controller, I found that SetHeader is not supported when using canary traffic management

Use Cases

When using APISIX as your ingress controller,
As described in the following yaml file

apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
  name: rollout-apisix-canary
spec:
  replicas: 5
  strategy:
    canary:
      canaryService: rollout-apisix-canary-canary
      stableService: rollout-apisix-canary-stable
      trafficRouting:
        managedRoutes:
          - name: set-header-1
        apisix:
          route:
            name: rollouts-apisix-route
            rules:
              - rollouts-apisix
      steps:
        - setWeight: 20
        - setHeaderRoute:
            name: set-header-1
            match:
            - headerName: agent
              headerValue:
                regex: firefox(.*)
        - pause: { }
        - setHeaderRoute:
            name: set-header-1
            match:
            - headerName: agent
              headerValue:
                regex: chrome(.*)
        - pause: { }
        - setWeight: 40
        - setHeaderRoute:
            name: set-header-1
        - pause: {}
  revisionHistoryLimit: 2
  selector:
    matchLabels:
      app: rollout-apisix-canary
  template:
    metadata:
      labels:
        app: rollout-apisix-canary
    spec:
      containers:
        - name: rollouts-demo
          image: argoproj/rollouts-demo:blue
          ports:
            - name: http
              containerPort: 8080
              protocol: TCP
          resources:
            requests:
              memory: 32Mi
              cpu: 5m


Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritize the issues with the most 👍.

@shareinto shareinto added the enhancement New feature or request label Mar 21, 2023
@shareinto
Copy link
Contributor Author

Maybe I can try to make it happen.

zachaller pushed a commit that referenced this issue Mar 24, 2023
* feat/apisixSetHeader

Signed-off-by: shareinto <[email protected]>

* chore: code coverage

Signed-off-by: shareinto <[email protected]>

* fix: apisix setweight check back

Signed-off-by: shareinto <[email protected]>

* chore: update readme

Signed-off-by: shareinto <[email protected]>

* fix: typo  processSetWeightRoutes

Signed-off-by: shareinto <[email protected]>

---------

Signed-off-by: shareinto <[email protected]>
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