Skip to content

Commit

Permalink
Merge branch 'main' into feat/sentinel-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
WeixinX committed Oct 21, 2024
2 parents 555d08d + f4b50ca commit f7a93c0
Show file tree
Hide file tree
Showing 11 changed files with 178 additions and 675 deletions.
14 changes: 4 additions & 10 deletions api/pkg/filtermanager/filtermanager_dev.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,11 @@ func (m *filterManager) OnLog(reqHdr capi.RequestHeaderMap, reqTrailer capi.Requ
return
}

m.hdrLock.Lock()
if m.reqHdr == nil {
m.reqHdr = &filterManagerRequestHeaderMap{
RequestHeaderMap: reqHdr,
}
} else {
// In our benchmark BenchmarkFilterManagerRegular, reuse the request header wrapper is 5% faster than create a new one,
// even the reusage requires holding the lock though it is running on fast path.
h, _ := m.reqHdr.(*filterManagerRequestHeaderMap)
h.RequestHeaderMap = reqHdr
wrappedReqHdr := &filterManagerRequestHeaderMap{
RequestHeaderMap: reqHdr,
}
m.hdrLock.Lock()
m.reqHdr = wrappedReqHdr
m.hdrLock.Unlock()
m.runOnLogPhase(m.reqHdr, reqTrailer, rspHdr, rspTrailer)
}
Expand Down
4 changes: 2 additions & 2 deletions controller/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ require (
k8s.io/api v0.29.3
k8s.io/apimachinery v0.29.3
k8s.io/client-go v0.29.3
mosn.io/htnn/api v0.4.0
mosn.io/htnn/types v0.4.0
mosn.io/htnn/api v0.4.1
mosn.io/htnn/types v0.4.1
sigs.k8s.io/controller-runtime v0.17.3
sigs.k8s.io/gateway-api v1.0.0
sigs.k8s.io/yaml v1.4.0
Expand Down
8 changes: 4 additions & 4 deletions controller/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -587,10 +587,10 @@ k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/A
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA=
k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI=
k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
mosn.io/htnn/api v0.4.0 h1:LAvDpTQlBQWX+O/hpYex5wcZeem5AZVD8ceAywUPG/Y=
mosn.io/htnn/api v0.4.0/go.mod h1:LuQVGTOQos5tOLl7c+z4ukFO1eOfm/Q3GNQ+8OnlIhE=
mosn.io/htnn/types v0.4.0 h1:HM/Oc0UTr18X9nbu2bY3+KJ7otY4OYMo6uMnTZOqo/0=
mosn.io/htnn/types v0.4.0/go.mod h1:YOL3isYyKslxC4h5JDwaWt6E504Q9gKITfJP3NMm7ls=
mosn.io/htnn/api v0.4.1 h1:8WJWk4u384wwDN8C49AKyqAZmp4isxhnnbiF9y9SJgs=
mosn.io/htnn/api v0.4.1/go.mod h1:LuQVGTOQos5tOLl7c+z4ukFO1eOfm/Q3GNQ+8OnlIhE=
mosn.io/htnn/types v0.4.1 h1:16UWyECDM7cIi4rBlBSYAtud/HSN4WYVPmL3fNYqmFc=
mosn.io/htnn/types v0.4.1/go.mod h1:MOXUQ/TfUrrgrPsfrXapyxwJ3nonhVeXRiXKgqU7a6s=
sigs.k8s.io/controller-runtime v0.17.3 h1:65QmN7r3FWgTxDMz9fvGnO1kbf2nu+acg9p2R9oYYYk=
sigs.k8s.io/controller-runtime v0.17.3/go.mod h1:N0jpP5Lo7lMTF9aL56Z/B2oWBJjey6StQM0jRbKQXtY=
sigs.k8s.io/gateway-api v1.0.0 h1:iPTStSv41+d9p0xFydll6d7f7MOBGuqXM6p2/zVYMAs=
Expand Down
6 changes: 3 additions & 3 deletions e2e/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ require (
k8s.io/api v0.29.3
k8s.io/apimachinery v0.29.3
k8s.io/client-go v0.29.3
mosn.io/htnn/controller v0.4.0
mosn.io/htnn/types v0.4.0
mosn.io/htnn/controller v0.4.1
mosn.io/htnn/types v0.4.1
sigs.k8s.io/controller-runtime v0.17.3
sigs.k8s.io/gateway-api v1.0.0
)
Expand Down Expand Up @@ -75,7 +75,7 @@ require (
k8s.io/klog/v2 v2.110.1 // indirect
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
mosn.io/htnn/api v0.4.0 // indirect
mosn.io/htnn/api v0.4.1 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
Expand Down
12 changes: 6 additions & 6 deletions e2e/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,12 @@ k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/A
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA=
k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI=
k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
mosn.io/htnn/api v0.4.0 h1:LAvDpTQlBQWX+O/hpYex5wcZeem5AZVD8ceAywUPG/Y=
mosn.io/htnn/api v0.4.0/go.mod h1:LuQVGTOQos5tOLl7c+z4ukFO1eOfm/Q3GNQ+8OnlIhE=
mosn.io/htnn/controller v0.4.0 h1:XlVAgrhiIciWD+E4gTxexE6tMBrJp5y5Bd5oTbq4ThI=
mosn.io/htnn/controller v0.4.0/go.mod h1:U5LwSarrwoYl6gN8LmXs3ogUpGFfdO32dcfV+Quoy9A=
mosn.io/htnn/types v0.4.0 h1:HM/Oc0UTr18X9nbu2bY3+KJ7otY4OYMo6uMnTZOqo/0=
mosn.io/htnn/types v0.4.0/go.mod h1:YOL3isYyKslxC4h5JDwaWt6E504Q9gKITfJP3NMm7ls=
mosn.io/htnn/api v0.4.1 h1:8WJWk4u384wwDN8C49AKyqAZmp4isxhnnbiF9y9SJgs=
mosn.io/htnn/api v0.4.1/go.mod h1:LuQVGTOQos5tOLl7c+z4ukFO1eOfm/Q3GNQ+8OnlIhE=
mosn.io/htnn/controller v0.4.1 h1:WN5j4VVxOUG9PBUhCpIX3SJuRLSKnEKpDvt/WF29YjQ=
mosn.io/htnn/controller v0.4.1/go.mod h1:4za5ACW1PZJw+Ovhkzx2tBQbTqxUKi7HVgnz4imIyhk=
mosn.io/htnn/types v0.4.1 h1:16UWyECDM7cIi4rBlBSYAtud/HSN4WYVPmL3fNYqmFc=
mosn.io/htnn/types v0.4.1/go.mod h1:MOXUQ/TfUrrgrPsfrXapyxwJ3nonhVeXRiXKgqU7a6s=
sigs.k8s.io/controller-runtime v0.17.3 h1:65QmN7r3FWgTxDMz9fvGnO1kbf2nu+acg9p2R9oYYYk=
sigs.k8s.io/controller-runtime v0.17.3/go.mod h1:N0jpP5Lo7lMTF9aL56Z/B2oWBJjey6StQM0jRbKQXtY=
sigs.k8s.io/gateway-api v1.0.0 h1:iPTStSv41+d9p0xFydll6d7f7MOBGuqXM6p2/zVYMAs=
Expand Down
4 changes: 2 additions & 2 deletions plugins/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ require (
golang.org/x/oauth2 v0.21.0
golang.org/x/time v0.6.0
google.golang.org/protobuf v1.34.2
mosn.io/htnn/api v0.4.0
mosn.io/htnn/types v0.4.0
mosn.io/htnn/api v0.4.1
mosn.io/htnn/types v0.4.1
)

require (
Expand Down
Loading

0 comments on commit f7a93c0

Please sign in to comment.