apisix-ingress-controller icon indicating copy to clipboard operation
apisix-ingress-controller copied to clipboard

bug: secretRef not working for proxy-rewrite

Open josemrs opened this issue 1 year ago • 0 comments

Current Behavior

Setting the proxy-rewrite config in the Route like this works:

      plugins:
        - name: proxy-rewrite
          enable: true
          config:
            headers:
              set: 
                Authorization: 'Basic Token'

Setting it like this does not work, the field is not configured:

apiVersion: v1
kind: Secret
metadata:
  name: prometheus-auth-header
  namespace: testing-apisix
data:
  headers.set.Authorization: base64AuthHeader
      plugins:
        - name: proxy-rewrite
          enable: true
          secretRef: prometheus-auth-header 

Expected Behavior

The plugins is configured according to the secret when using secretRef

Error Logs

No errors found

Steps to Reproduce

Set up a Route using proxy-rewrite and config the plugin to set a header using secretRef.

Environment

Kubernetes 1.30 Apisix Helm chart 2.8.1

josemrs avatar Sep 12 '24 15:09 josemrs