Skip to content

Latest commit

 

History

History
100 lines (70 loc) · 6.36 KB

annotations.md

File metadata and controls

100 lines (70 loc) · 6.36 KB

Annotation Indexes

Specifying Ingress class

Annotation Name Function Value
kubernetes.io/ingress.class Specify Ingress class fixed bfe

Routing

Annotation Name Function Value
bfe.ingress.kubernetes.io/router.cookie Cookie condition (exact match) for all routers in current ingress resource key-value pair separated by :. i.e. key:value
bfe.ingress.kubernetes.io/router.header Header condition (exact match) for all routers in current ingress resource key-value pair separated by :. i.e. Key:value

Load Balancing

Annotation Name Function Value
bfe.ingress.kubernetes.io/balance.weight Configure load balancing between multiple services JSON string, i.e. {"svc": {"sub-svc1":80, "sub-svc2":20}}

Redirect

Response Location

Annotation Name Function Value
bfe.ingress.kubernetes.io/redirect.url-set Redirect to specified URL String. i.e. https://www.baidu.com
bfe.ingress.kubernetes.io/redirect.url-from-query Redirect to URL parsed from specified query in request String. The key of the query.
bfe.ingress.kubernetes.io/redirect.url-prefix-add Redirect to URL concatenated by specified prefix and the original URL String. i.e. https://www.baidu.com?prefixPath
bfe.ingress.kubernetes.io/redirect.scheme-set Redirect to the original URL but with scheme changed. supported scheme: http https

Response Status Code

Annotation Name Function Value
bfe.ingress.kubernetes.io/redirect.response-status (Optional) Set the Status Code of the Redirect Response Number String. Optional 301302303307308,default is 302

Rewrite URL

Host

Annotation Name Function Value
bfe.ingress.kubernetes.io/rewrite-url.host Set the host to specified value. JSON string. i.e. [{"params": "baidu.com"}]
bfe.ingress.kubernetes.io/rewrite-url.host-from-path-prefix Set host to specified path prefix. JSON string. i.e. [{"params": true}]

Path

Annotation Name Function Value
bfe.ingress.kubernetes.io/rewrite-url.path Set path to specified value. JSON string. i.e. [{"params": "/foo/bar"}]
bfe.ingress.kubernetes.io/rewrite-url.path-prefix-add Add prefix to original path. JSON string. i.e. [{"params": "/bar"}]
bfe.ingress.kubernetes.io/rewrite-url.path-prefix-trim Trim prefix from original path. JSON string. i.e. [{"params": "/bar"}]
bfe.ingress.kubernetes.io/rewrite-url.path-prefix-strip Strip the indicated number of prefix segments from original path. JSON string. i.e. [{"params": 1}]

Query

Annotation Name Function Value
bfe.ingress.kubernetes.io/rewrite-url.query-add Add query. JSON string. i.e. [{"params": {"name": "alice"}}]
bfe.ingress.kubernetes.io/rewrite-url.query-delete Delete query. JSON string. i.e. [{"params": ["name"]}]
bfe.ingress.kubernetes.io/rewrite-url.query-rename Rename query. JSON string. i.e. [{"params": {"name": "user"} }]
bfe.ingress.kubernetes.io/rewrite-url.query-delete-all-except Delete all queries except specified query. JSON string. i.e. [{"params": "name"}]

BFE-Reserved

Annotation Name Function Value
bfe.ingress.kubernetes.io/bfe-ingress-status Feedback ingress status Read-only JSON string, which contains ingress status, error message