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

feat(lb): add support for http_header_match #1950

Merged
merged 4 commits into from
Jul 7, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ require (
github.com/karrick/tparse v2.4.2+incompatible
github.com/mattn/go-colorable v0.1.8
github.com/mattn/go-isatty v0.0.13
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210510090404-0b46577f308f
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210707121459-c4899e298c98
github.com/sergi/go-diff v1.1.0 // indirect
github.com/spf13/cobra v1.2.1
github.com/spf13/pflag v1.0.5
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210510090404-0b46577f308f h1:AkxRIEQ413mDXYlXFQ317j2JjIQaBIVhJbMgm4CRsL8=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210510090404-0b46577f308f/go.mod h1:CJJ5VAbozOl0yEw7nHB9+7BXTJbIn6h7W+f6Gau5IP8=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210707121459-c4899e298c98 h1:2VLw+nHp0U3R1VQApoDRUY45f+o4Knu9CMk/0hgSy+k=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210707121459-c4899e298c98/go.mod h1:CJJ5VAbozOl0yEw7nHB9+7BXTJbIn6h7W+f6Gau5IP8=
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
Expand Down
18 changes: 16 additions & 2 deletions internal/namespaces/lb/v1/lb_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -1649,7 +1649,7 @@ func lbACLCreate() *core.Command {
Required: false,
Deprecated: false,
Positional: false,
EnumValues: []string{"acl_http_filter_none", "path_begin", "path_end", "regex"},
EnumValues: []string{"acl_http_filter_none", "path_begin", "path_end", "regex", "http_header_match"},
},
{
Name: "match.http-filter-value.{index}",
Expand All @@ -1658,6 +1658,13 @@ func lbACLCreate() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "match.http-filter-option",
Short: `A exra parameter. You can use this field with http_header_match acl type to set the header name to filter`,
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "match.invert",
Short: `If set to ` + "`" + `true` + "`" + `, the ACL matching condition will be of type "UNLESS"`,
Expand Down Expand Up @@ -1760,7 +1767,7 @@ func lbACLUpdate() *core.Command {
Required: false,
Deprecated: false,
Positional: false,
EnumValues: []string{"acl_http_filter_none", "path_begin", "path_end", "regex"},
EnumValues: []string{"acl_http_filter_none", "path_begin", "path_end", "regex", "http_header_match"},
},
{
Name: "match.http-filter-value.{index}",
Expand All @@ -1769,6 +1776,13 @@ func lbACLUpdate() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "match.http-filter-option",
Short: `A exra parameter. You can use this field with http_header_match acl type to set the header name to filter`,
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "match.invert",
Short: `If set to ` + "`" + `true` + "`" + `, the ACL matching condition will be of type "UNLESS"`,
Expand Down