diff --git a/go.mod b/go.mod index 76f5f05e71..57865954c5 100644 --- a/go.mod +++ b/go.mod @@ -56,7 +56,7 @@ require ( k8s.io/client-go v0.28.3 k8s.io/component-base v0.28.3 sigs.k8s.io/controller-runtime v0.16.3 - sigs.k8s.io/gateway-api v1.0.0-rc2 + sigs.k8s.io/gateway-api v1.0.0-rc2.0.20231027061746-5fd8bec3bedc sigs.k8s.io/kustomize/api v0.15.0 sigs.k8s.io/kustomize/kyaml v0.15.0 sigs.k8s.io/yaml v1.4.0 @@ -114,12 +114,12 @@ require ( github.com/docker/go-connections v0.4.0 github.com/docker/go-units v0.5.0 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect - github.com/evanphx/json-patch v5.6.0+incompatible // indirect + github.com/evanphx/json-patch v5.7.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.7.0 // indirect github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect github.com/fatih/camelcase v1.0.0 // indirect github.com/fatih/color v1.15.0 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/fvbommel/sortorder v1.1.0 // indirect github.com/go-errors/errors v1.4.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect @@ -170,8 +170,8 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b // indirect - github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect - github.com/prometheus/procfs v0.11.1 // indirect + github.com/prometheus/client_model v0.5.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/shirou/gopsutil/v3 v3.23.9 // indirect github.com/shopspring/decimal v1.2.0 // indirect @@ -193,17 +193,17 @@ require ( go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.14.0 // indirect - golang.org/x/exp v0.0.0-20230905200255-921286631fa9 - golang.org/x/mod v0.12.0 // indirect + golang.org/x/exp v0.0.0-20231006140011-7918f672742d + golang.org/x/mod v0.13.0 // indirect golang.org/x/oauth2 v0.13.0 // indirect golang.org/x/sync v0.4.0 golang.org/x/sys v0.13.0 // indirect golang.org/x/term v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.13.0 // indirect + golang.org/x/tools v0.14.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/appengine v1.6.7 // indirect + google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97 // indirect google.golang.org/grpc v1.59.0 google.golang.org/protobuf v1.31.0 // indirect @@ -211,7 +211,7 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/cli-runtime v0.28.3 - k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f // indirect + k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect k8s.io/kubectl v0.28.3 k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect diff --git a/go.sum b/go.sum index 25eb2ca579..8dfcc8256a 100644 --- a/go.sum +++ b/go.sum @@ -101,6 +101,8 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v5.7.0+incompatible h1:vgGkfT/9f8zE6tvSCe74nfpAVDQ2tG6yudJd8LBksgI= +github.com/evanphx/json-patch v5.7.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0nW9SYGc= github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= @@ -118,6 +120,8 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fvbommel/sortorder v1.1.0 h1:fUmoe+HLsBTctBDoaBwpQo5N+nrCp8g/BjKb/6ZQmYw= github.com/fvbommel/sortorder v1.1.0/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= github.com/gammazero/deque v0.2.0 h1:SkieyNB4bg2/uZZLxvya0Pq6diUlwx7m2TeT7GAIWaA= @@ -167,6 +171,7 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= @@ -372,10 +377,14 @@ github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+L github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 h1:v7DLqVdK4VrYkVD5diGdl4sxJurKJEMnODWRJlxV9oM= github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= +github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/puzpuzpuz/xsync/v2 v2.5.1 h1:mVGYAvzDSu52+zaGyNjC+24Xw2bQi3kTr4QJ6N9pIIU= github.com/puzpuzpuz/xsync/v2 v2.5.1/go.mod h1:gD2H2krq/w52MfPLE+Uy64TzJDVY7lP2znR9qmR35kU= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= @@ -493,6 +502,8 @@ golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -503,6 +514,7 @@ golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -584,6 +596,7 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= @@ -602,6 +615,7 @@ golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -614,6 +628,8 @@ google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9Ywl google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= @@ -686,14 +702,20 @@ k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f h1:eeEUOoGYWhOz7EyXqhlR2zHKNw2mNJ9vzJmub6YN6kk= k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= k8s.io/kubectl v0.28.3 h1:H1Peu1O3EbN9zHkJCcvhiJ4NUj6lb88sGPO5wrWIM6k= k8s.io/kubectl v0.28.3/go.mod h1:RDAudrth/2wQ3Sg46fbKKl4/g+XImzvbsSRZdP2RiyE= k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigwG62c4= sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= +sigs.k8s.io/gateway-api v0.8.1 h1:Bo4NMAQFYkQZnHXOfufbYwbPW7b3Ic5NjpbeW6EJxuU= +sigs.k8s.io/gateway-api v0.8.1/go.mod h1:0PteDrsrgkRmr13nDqFWnev8tOysAVrwnvfFM55tSVg= sigs.k8s.io/gateway-api v1.0.0-rc2 h1:+7rq7j5fehUkMkgnJyL90mtXrVnz8aj5SXsRqIEW3Mk= sigs.k8s.io/gateway-api v1.0.0-rc2/go.mod h1:+QpYENjk9s31/abu2Pv5BpK2v88UQDK2aeQCwCvy6ck= +sigs.k8s.io/gateway-api v1.0.0-rc2.0.20231027061746-5fd8bec3bedc h1:GTQ0Bh6MycOUupSQVjFU9/4gu/IAE0qNg0d4Bb8hqRo= +sigs.k8s.io/gateway-api v1.0.0-rc2.0.20231027061746-5fd8bec3bedc/go.mod h1:4cUgr0Lnp5FZ0Cdq8FdRwCvpiWws7LVhLHGIudLlf4c= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/kind v0.20.0 h1:f0sc3v9mQbGnjBUaqSFST1dwIuiikKVGgoTwpoP33a8= diff --git a/internal/dataplane/parser/testdata/golden/grpcroute-example/expression-routes-on_golden.yaml b/internal/dataplane/parser/testdata/golden/grpcroute-example/expression-routes-on_golden.yaml index 39a5caf2ff..5c585b916a 100644 --- a/internal/dataplane/parser/testdata/golden/grpcroute-example/expression-routes-on_golden.yaml +++ b/internal/dataplane/parser/testdata/golden/grpcroute-example/expression-routes-on_golden.yaml @@ -18,7 +18,7 @@ services: id: b23f135f-8d7e-54cb-96eb-f2579ef1608b name: grpcroute.default.grpcbin.example.com.0.0 preserve_host: true - priority: 1713055227461631 + priority: 26766487929087 tags: - k8s-name:grpcbin - k8s-namespace:default diff --git a/internal/dataplane/parser/testdata/golden/httproute-example/expression-routes-on_golden.yaml b/internal/dataplane/parser/testdata/golden/httproute-example/expression-routes-on_golden.yaml index 7a24a31e4c..dcb6f90851 100644 --- a/internal/dataplane/parser/testdata/golden/httproute-example/expression-routes-on_golden.yaml +++ b/internal/dataplane/parser/testdata/golden/httproute-example/expression-routes-on_golden.yaml @@ -14,7 +14,7 @@ services: id: 91833860-2041-5eea-abf8-a1e85b7c64cf name: httproute.default.httproute-testing._.0.0 preserve_host: true - priority: 2251808940752895 + priority: 35184514699263 strip_path: true tags: - k8s-name:httproute-testing diff --git a/internal/dataplane/parser/testdata/golden/ingress-v1-empty-path/expression-routes-on_golden.yaml b/internal/dataplane/parser/testdata/golden/ingress-v1-empty-path/expression-routes-on_golden.yaml index 587d489adc..73f5991552 100644 --- a/internal/dataplane/parser/testdata/golden/ingress-v1-empty-path/expression-routes-on_golden.yaml +++ b/internal/dataplane/parser/testdata/golden/ingress-v1-empty-path/expression-routes-on_golden.yaml @@ -15,7 +15,7 @@ services: id: 3eee2c18-8fcc-5661-8f84-5c89adfa404f name: foo-namespace.foo.foo-svc.example.com.80 preserve_host: true - priority: 3382102062006273 + priority: 57178899611649 request_buffering: true response_buffering: true strip_path: false diff --git a/internal/dataplane/parser/testdata/golden/ingress-v1-multiple-ports-for-one-service/expression-routes-on_golden.yaml b/internal/dataplane/parser/testdata/golden/ingress-v1-multiple-ports-for-one-service/expression-routes-on_golden.yaml index 49dcc4f63c..adadd78f1a 100644 --- a/internal/dataplane/parser/testdata/golden/ingress-v1-multiple-ports-for-one-service/expression-routes-on_golden.yaml +++ b/internal/dataplane/parser/testdata/golden/ingress-v1-multiple-ports-for-one-service/expression-routes-on_golden.yaml @@ -15,7 +15,7 @@ services: id: 2bd1c902-4d3c-50ed-9a78-f698cfa0cf37 name: foo-namespace.foo.foo-svc.example.net.8000 preserve_host: true - priority: 3382102062006273 + priority: 57178899611649 request_buffering: true response_buffering: true strip_path: false @@ -48,7 +48,7 @@ services: id: 3eee2c18-8fcc-5661-8f84-5c89adfa404f name: foo-namespace.foo.foo-svc.example.com.80 preserve_host: true - priority: 3382102062006273 + priority: 57178899611649 request_buffering: true response_buffering: true strip_path: false diff --git a/internal/dataplane/parser/testdata/golden/ingress-v1-ports-defined-by-name/expression-routes-on_golden.yaml b/internal/dataplane/parser/testdata/golden/ingress-v1-ports-defined-by-name/expression-routes-on_golden.yaml index 9016750327..4bf47ec38a 100644 --- a/internal/dataplane/parser/testdata/golden/ingress-v1-ports-defined-by-name/expression-routes-on_golden.yaml +++ b/internal/dataplane/parser/testdata/golden/ingress-v1-ports-defined-by-name/expression-routes-on_golden.yaml @@ -15,7 +15,7 @@ services: id: 0673ae1f-4318-59dc-96e7-fc17c218022f name: foo-namespace.regex-prefix.foo-svc.example.com.http preserve_host: true - priority: 3382102062006273 + priority: 57178899611649 request_buffering: true response_buffering: true strip_path: false diff --git a/internal/dataplane/parser/testdata/golden/ingress-v1-regex-prefix-exact-rule/expression-routes-on_golden.yaml b/internal/dataplane/parser/testdata/golden/ingress-v1-regex-prefix-exact-rule/expression-routes-on_golden.yaml index 4c10d5d652..0aa89f9ff8 100644 --- a/internal/dataplane/parser/testdata/golden/ingress-v1-regex-prefix-exact-rule/expression-routes-on_golden.yaml +++ b/internal/dataplane/parser/testdata/golden/ingress-v1-regex-prefix-exact-rule/expression-routes-on_golden.yaml @@ -15,7 +15,7 @@ services: id: 3eee2c18-8fcc-5661-8f84-5c89adfa404f name: foo-namespace.foo.foo-svc.example.com.80 preserve_host: true - priority: 3382102062071817 + priority: 57178899677193 request_buffering: true response_buffering: true strip_path: false diff --git a/internal/dataplane/parser/testdata/golden/ingress-v1-regex-prefixed-path/expression-routes-on_golden.yaml b/internal/dataplane/parser/testdata/golden/ingress-v1-regex-prefixed-path/expression-routes-on_golden.yaml index 1dabe3b27f..64b609a8f7 100644 --- a/internal/dataplane/parser/testdata/golden/ingress-v1-regex-prefixed-path/expression-routes-on_golden.yaml +++ b/internal/dataplane/parser/testdata/golden/ingress-v1-regex-prefixed-path/expression-routes-on_golden.yaml @@ -15,7 +15,7 @@ services: id: 45f1e9e4-8096-5cf7-b8e0-c42f8b9b81a0 name: foo-namespace.regex-prefix.foo-svc.example.com.80 preserve_host: true - priority: 3382102062071818 + priority: 57178899677194 request_buffering: true response_buffering: true strip_path: false diff --git a/internal/dataplane/parser/testdata/golden/ingress-v1-rule-with-tls/expression-routes-on_golden.yaml b/internal/dataplane/parser/testdata/golden/ingress-v1-rule-with-tls/expression-routes-on_golden.yaml index 4a71ef703e..3959234416 100644 --- a/internal/dataplane/parser/testdata/golden/ingress-v1-rule-with-tls/expression-routes-on_golden.yaml +++ b/internal/dataplane/parser/testdata/golden/ingress-v1-rule-with-tls/expression-routes-on_golden.yaml @@ -82,7 +82,7 @@ services: id: fc9a8135-0253-5631-b1e0-8712f796a4e2 name: bar-namespace.ing-with-tls.foo-svc.example.com.80 preserve_host: true - priority: 3382102062071809 + priority: 57178899677185 request_buffering: true response_buffering: true strip_path: false diff --git a/internal/dataplane/parser/testdata/golden/ingress-v1-single-service-in-multiple-ingresses/expression-routes-on_golden.yaml b/internal/dataplane/parser/testdata/golden/ingress-v1-single-service-in-multiple-ingresses/expression-routes-on_golden.yaml index 34fc4dfa12..364d354e49 100644 --- a/internal/dataplane/parser/testdata/golden/ingress-v1-single-service-in-multiple-ingresses/expression-routes-on_golden.yaml +++ b/internal/dataplane/parser/testdata/golden/ingress-v1-single-service-in-multiple-ingresses/expression-routes-on_golden.yaml @@ -15,7 +15,7 @@ services: id: 3eee2c18-8fcc-5661-8f84-5c89adfa404f name: foo-namespace.foo.foo-svc.example.com.80 preserve_host: true - priority: 3382102062071809 + priority: 57178899677185 request_buffering: true response_buffering: true strip_path: false @@ -30,7 +30,7 @@ services: id: ab6b1505-ec86-5b04-9d39-a95a711564cc name: foo-namespace.foo-2.foo-svc.example.com.80 preserve_host: true - priority: 3382102062071809 + priority: 57178899677185 request_buffering: true response_buffering: true strip_path: false diff --git a/internal/dataplane/parser/testdata/golden/ingress-v1-with-acme-like-path/expression-routes-on_golden.yaml b/internal/dataplane/parser/testdata/golden/ingress-v1-with-acme-like-path/expression-routes-on_golden.yaml index ef5d135dad..83d338b291 100644 --- a/internal/dataplane/parser/testdata/golden/ingress-v1-with-acme-like-path/expression-routes-on_golden.yaml +++ b/internal/dataplane/parser/testdata/golden/ingress-v1-with-acme-like-path/expression-routes-on_golden.yaml @@ -15,7 +15,7 @@ services: id: bba23c8e-3f3c-55dc-bfca-2fe19de118d1 name: foo-namespace.foo.cert-manager-solver-pod.example.com.80 preserve_host: true - priority: 3382102062006304 + priority: 57178899611680 request_buffering: true response_buffering: true strip_path: false diff --git a/internal/dataplane/parser/testdata/golden/ingress-v1-with-default-backend/expression-routes-on_golden.yaml b/internal/dataplane/parser/testdata/golden/ingress-v1-with-default-backend/expression-routes-on_golden.yaml index 3c94000120..e8eeda84e8 100644 --- a/internal/dataplane/parser/testdata/golden/ingress-v1-with-default-backend/expression-routes-on_golden.yaml +++ b/internal/dataplane/parser/testdata/golden/ingress-v1-with-default-backend/expression-routes-on_golden.yaml @@ -15,7 +15,7 @@ services: id: 3eee2c18-8fcc-5661-8f84-5c89adfa404f name: foo-namespace.foo.foo-svc.example.com.80 preserve_host: true - priority: 3382102062071809 + priority: 57178899677185 request_buffering: true response_buffering: true strip_path: false diff --git a/internal/dataplane/parser/translators/atc_utils.go b/internal/dataplane/parser/translators/atc_utils.go index 16608d0bc5..61f34bb820 100644 --- a/internal/dataplane/parser/translators/atc_utils.go +++ b/internal/dataplane/parser/translators/atc_utils.go @@ -7,12 +7,12 @@ import ( ) const ( - // FromResourceKindPriorityShiftBits is the highest 2 bits 51-50 used in priority field of Kong route + // FromResourceKindPriorityShiftBits is the highest 2 bits 45-44 used in priority field of Kong route // to note the kind of the resource from which the route is translated. // 11 - routes from Ingress. // 10 - routes from HTTPRoute. // 01 - routes from GRPCRoute. - FromResourceKindPriorityShiftBits = 50 + FromResourceKindPriorityShiftBits = 44 // ResourceKindBitsIngress is the value of highest 2 bits for routes from ingresses. ResourceKindBitsIngress = 3 // ResourceKindBitsHTTPRoute is the value of highest 2 bits for routes from HTTPRoutes. diff --git a/internal/dataplane/parser/translators/grpcroute_atc.go b/internal/dataplane/parser/translators/grpcroute_atc.go index 8a95177771..c4bb3f7687 100644 --- a/internal/dataplane/parser/translators/grpcroute_atc.go +++ b/internal/dataplane/parser/translators/grpcroute_atc.go @@ -285,11 +285,11 @@ func CalculateGRCPRouteMatchPriorityTraits(match SplitGRPCRouteMatch) GRPCRouteP // EncodeToPriority turns GRPCRoute priority traits into the integer expressed priority. // -// 4 3 2 1 -// 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 -// +-+---------------+---------------------+---------------------+---------+---------------------------+ -// |P| host len | GRPC service length | GRPC method length |Header No| relative order | -// +-+---------------+---------------------+---------------------+---------+---------------------------+ +// 4 3 2 1 +// 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 +// +-+---------------+---------------------+---------------------+---------+----------------+ +// |P| host len | GRPC service length | GRPC method length |Header No| relative order | +// +-+---------------+---------------------+---------------------+---------+----------------+ // // Where: // P: set to 1 if the hostname is non-wildcard. @@ -303,17 +303,17 @@ func CalculateGRCPRouteMatchPriorityTraits(match SplitGRPCRouteMatch) GRPCRouteP // to assign higher priority for method match with `Exact` match? func (t GRPCRoutePriorityTraits) EncodeToPriority() int { const ( - // PreciseHostnameShiftBits assigns bit 49 for marking if the hostname is non-wildcard. - PreciseHostnameShiftBits = 49 - // HostnameLengthShiftBits assigns bits 41-48 for the length of hostname. - HostnameLengthShiftBits = 41 - // ServiceLengthShiftBits assigns bits 30-40 for the length of `Service` in method match. - ServiceLengthShiftBits = 30 - // MethodLengthShiftBits assigns bits 19-29 for the length of `Method` in method match. - MethodLengthShiftBits = 19 - // HeaderCountShiftBits assigns bits 14-18 for the number of header matches. - HeaderCountShiftBits = 14 - // bits 0-13 are used for relative order of creation timestamp, namespace/name, and internal order of rules and matches. + // PreciseHostnameShiftBits assigns bit 43 for marking if the hostname is non-wildcard. + PreciseHostnameShiftBits = 43 + // HostnameLengthShiftBits assigns bits 35-42 for the length of hostname. + HostnameLengthShiftBits = 35 + // ServiceLengthShiftBits assigns bits 24-34 for the length of `Service` in method match. + ServiceLengthShiftBits = 24 + // MethodLengthShiftBits assigns bits 13-23 for the length of `Method` in method match. + MethodLengthShiftBits = 13 + // HeaderCountShiftBits assigns bits 8-12 for the number of header matches. + HeaderCountShiftBits = 8 + // bits 0-7 are used for relative order of creation timestamp, namespace/name, and internal order of rules and matches. // the bits are calculated by sorting GRPCRoutes with the same priority calculated from the fields above // and start from all 1s, then decrease by one for each GRPCRoute. ) @@ -365,11 +365,11 @@ func AssignRoutePriorityToSplitGRPCRouteMatches( splitGRPCRoutesToPriority := make([]SplitGRPCRouteMatchToPriority, 0, len(splitGRPCouteMatches)) - // Bits 0-13 (14 bits) are assigned for relative order of GRPCRoutes. + // Bits 0-7 (8 bits) are assigned for relative order of GRPCRoutes. // If multiple GRPCRoutes are assigned to the same priority in the previous step, - // sort them then starts with 2^14 -1 and decrease by one for each GRPCRoute; + // sort them then starts with 2^8 -1 and decrease by one for each GRPCRoute; // If only one GRPCRoute occupies the priority, fill the relative order bits with all 1s. - const relativeOrderAssignedBits = 14 + const relativeOrderAssignedBits = 8 const defaultRelativeOrderPriorityBits = (1 << relativeOrderAssignedBits) - 1 for priority, matches := range priorityToSplitGRPCRouteMatches { @@ -388,9 +388,8 @@ func AssignRoutePriorityToSplitGRPCRouteMatches( for i, match := range matches { relativeOrderBits := defaultRelativeOrderPriorityBits - i - // Although it is very unlikely that there are 2^14 = 16384 GRPCRoutes - // should be given priority by their relative order, here we limit the - // relativeOrderBits to be at least 0. + // Here we limit the relativeOrderBits to be at least 0 + // if priorities of more than 2^8 = 256 GRPCRoute to be decided by relative orders. if relativeOrderBits <= 0 { relativeOrderBits = 0 } @@ -400,9 +399,9 @@ func AssignRoutePriorityToSplitGRPCRouteMatches( }) } - // Just in case, log a very unlikely scenario where we have more than 2^14 routes with the same base + // Just in case, log a very unlikely scenario where we have more than 2^8 routes with the same base // priority and we have no bit space for them to be deterministically ordered. - if len(matches) > (1 << 14) { + if len(matches) > (1 << 8) { logger.Error(nil, "Too many GRPCRoute matches to be deterministically ordered", "grpcroute_number", len(matches)) } } diff --git a/internal/dataplane/parser/translators/grpcroute_atc_test.go b/internal/dataplane/parser/translators/grpcroute_atc_test.go index bde07b44d5..d297a4092b 100644 --- a/internal/dataplane/parser/translators/grpcroute_atc_test.go +++ b/internal/dataplane/parser/translators/grpcroute_atc_test.go @@ -613,7 +613,7 @@ func TestGRPCRouteTraitsEncodeToPriority(t *testing.T) { HostnameLength: 15, ServiceLength: 7, }, - exprectedPriority: (1 << 50) | (1 << 49) | (15 << 41) | (7 << 30), + exprectedPriority: (1 << 44) | (1 << 43) | (15 << 35) | (7 << 24), }, { name: "non precise hostname", @@ -624,7 +624,7 @@ func TestGRPCRouteTraitsEncodeToPriority(t *testing.T) { MethodLength: 7, HeaderCount: 3, }, - exprectedPriority: (1 << 50) | (15 << 41) | (7 << 30) | (7 << 19) | (3 << 14), + exprectedPriority: (1 << 44) | (15 << 35) | (7 << 24) | (7 << 13) | (3 << 8), }, } @@ -647,7 +647,7 @@ func TestAssignRoutePriorityToSplitGRPCRouteMatches(t *testing.T) { matchIndex int } now := time.Now() - const maxRelativeOrderPriorityBits = (1 << 14) - 1 + const maxRelativeOrderPriorityBits = (1 << 8) - 1 testCases := []struct { name string diff --git a/internal/dataplane/parser/translators/httproute_atc.go b/internal/dataplane/parser/translators/httproute_atc.go index ef1a109e24..f2dcdb1819 100644 --- a/internal/dataplane/parser/translators/httproute_atc.go +++ b/internal/dataplane/parser/translators/httproute_atc.go @@ -380,11 +380,11 @@ func CalculateHTTPRouteMatchPriorityTraits(match SplitHTTPRouteMatch) HTTPRouteP // EncodeToPriority turns HTTPRoute priority traits into the integer expressed priority. // -// 4 3 2 1 -// 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 -// +-+---------------+-+-+-------------------+-+---------+---------+-----------------------------------+ -// |P| host len |E|R| Path length |M|Header No|Query No.| relative order | -// +-+---------------+-+-+-------------------+-+---------+-------- +-----------------------------------+ +// 4 3 2 1 +// 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 +// +-+---------------+-+-+-------------------+-+---------+---------+-----------------------+ +// |P| host len |E|R| Path length |M|Header No|Query No.| relative order | +// +-+---------------+-+-+-------------------+-+---------+-------- +-----------------------+ // // Where: // P: set to 1 if the hostname is non-wildcard. @@ -398,23 +398,23 @@ func CalculateHTTPRouteMatchPriorityTraits(match SplitHTTPRouteMatch) HTTPRouteP // relative order: relative order of creation timestamp, namespace and name and internal rule/match order between different (split) HTTPRoutes. func (t HTTPRoutePriorityTraits) EncodeToPriority() int { const ( - // PreciseHostnameShiftBits assigns bit 49 for marking if the hostname is non-wildcard. - PreciseHostnameShiftBits = 49 - // HostnameLengthShiftBits assigns bits 41-48 for the length of hostname. - HostnameLengthShiftBits = 41 - // ExactPathShiftBits assigns bit 40 to mark if the match is exact path match. - ExactPathShiftBits = 40 - // RegularExpressionPathShiftBits assigns bit 39 to mark if the match is regex path match. - RegularExpressionPathShiftBits = 39 - // PathLengthShiftBits assigns bits 29-38 to path length. (max length = 1024, but must start with /) - PathLengthShiftBits = 29 - // MethodMatchShiftBits assigns bit 28 to mark if method is specified. - MethodMatchShiftBits = 28 - // HeaderNumberShiftBits assign bits 23-27 to number of headers. (max number of headers = 16) - HeaderNumberShiftBits = 23 - // QueryParamNumberShiftBits makes bits 18-22 used for number of query params (max number of query params = 16) - QueryParamNumberShiftBits = 18 - // bits 0-17 are used for relative order of creation timestamp, namespace/name, and internal order of rules and matches. + // PreciseHostnameShiftBits assigns bit 43 for marking if the hostname is non-wildcard. + PreciseHostnameShiftBits = 43 + // HostnameLengthShiftBits assigns bits 35-42 for the length of hostname. + HostnameLengthShiftBits = 35 + // ExactPathShiftBits assigns bit 34 to mark if the match is exact path match. + ExactPathShiftBits = 34 + // RegularExpressionPathShiftBits assigns bit 33 to mark if the match is regex path match. + RegularExpressionPathShiftBits = 33 + // PathLengthShiftBits assigns bits 23-32 to path length. (max length = 1024, but must start with /) + PathLengthShiftBits = 23 + // MethodMatchShiftBits assigns bit 22 to mark if method is specified. + MethodMatchShiftBits = 22 + // HeaderNumberShiftBits assign bits 17-21 to number of headers. (max number of headers = 16) + HeaderNumberShiftBits = 17 + // QueryParamNumberShiftBits makes bits 12-16 used for number of query params (max number of query params = 16) + QueryParamNumberShiftBits = 12 + // bits 0-11 are used for relative order of creation timestamp, namespace/name, and internal order of rules and matches. // the bits are calculated by sorting HTTPRoutes with the same priority calculated from the fields above // and start from all 1s, then decrease by one for each HTTPRoute. ) @@ -467,11 +467,11 @@ func AssignRoutePriorityToSplitHTTPRouteMatches( httpRouteMatchesToPriorities := make([]SplitHTTPRouteMatchToKongRoutePriority, 0, len(splitHTTPRouteMatches)) - // Bits 0-17 (18 bits) are assigned for relative order of matches. + // Bits 0-11 (12 bits) are assigned for relative order of matches. // If multiple matches are assigned to the same priority in the previous step, - // sort them then starts with 2^18 -1 and decrease by one for each HTTPRoute; + // sort them then starts with 2^12 -1 and decrease by one for each HTTPRoute; // If only one match occupies the priority, fill the relative order bits with all 1s. - const RelativeOrderAssignedBits = 18 + const RelativeOrderAssignedBits = 12 const defaultRelativeOrderPriorityBits = (1 << RelativeOrderAssignedBits) - 1 for priority, matches := range priorityToSplitHTTPRouteMatches { if len(matches) == 1 { @@ -488,7 +488,7 @@ func AssignRoutePriorityToSplitHTTPRouteMatches( for i, match := range matches { relativeOrderBits := defaultRelativeOrderPriorityBits - i - // Although it is very unlikely that there are 2^18 = 262144 HTTPRoutes + // Although it is very unlikely that there are 2^12 = 4096 HTTPRoutes // should be given priority by their relative order, here we limit the // relativeOrderBits to be at least 0. if relativeOrderBits <= 0 { @@ -499,9 +499,9 @@ func AssignRoutePriorityToSplitHTTPRouteMatches( Priority: priority + relativeOrderBits, }) } - // Just in case, log a very unlikely scenario where we have more than 2^18 matches with the same base + // Just in case, log a very unlikely scenario where we have more than 2^12 matches with the same base // priority and we have no bit space for them to be deterministically ordered. - if len(matches) > (1 << 18) { + if len(matches) > (1 << 12) { logger.Error(nil, "Too many HTTPRoute matches to be deterministically ordered", "match_number", len(matches)) } } diff --git a/internal/dataplane/parser/translators/httproute_atc_test.go b/internal/dataplane/parser/translators/httproute_atc_test.go index 14c927ca2d..9f3253e313 100644 --- a/internal/dataplane/parser/translators/httproute_atc_test.go +++ b/internal/dataplane/parser/translators/httproute_atc_test.go @@ -483,7 +483,7 @@ func TestEncodeHTTPRoutePriorityFromTraits(t *testing.T) { PathType: gatewayapi.PathMatchExact, PathLength: 4, }, - expectedPriority: (2 << 50) | (1 << 49) | (7 << 41) | (1 << 40) | (3 << 29), + expectedPriority: (2 << 44) | (1 << 43) | (7 << 35) | (1 << 34) | (3 << 23), }, { name: "wildcard hostname and prefix path", @@ -493,7 +493,7 @@ func TestEncodeHTTPRoutePriorityFromTraits(t *testing.T) { PathType: gatewayapi.PathMatchPathPrefix, PathLength: 5, }, - expectedPriority: (2 << 50) | (7 << 41) | (4 << 29), + expectedPriority: (2 << 44) | (7 << 35) | (4 << 23), }, { name: "no hostname and regex path, with header matches", @@ -502,7 +502,7 @@ func TestEncodeHTTPRoutePriorityFromTraits(t *testing.T) { PathLength: 5, HeaderCount: 2, }, - expectedPriority: (2 << 50) | (1 << 39) | (4 << 29) | (2 << 23), + expectedPriority: (2 << 44) | (1 << 33) | (4 << 23) | (2 << 17), }, { name: "no hostname and exact path, with method match and query parameter matches", @@ -512,7 +512,7 @@ func TestEncodeHTTPRoutePriorityFromTraits(t *testing.T) { HasMethodMatch: true, QueryParamCount: 1, }, - expectedPriority: (2 << 50) | (1 << 40) | (4 << 29) | (1 << 28) | (1 << 18), + expectedPriority: (2 << 44) | (1 << 34) | (4 << 23) | (1 << 22) | (1 << 12), }, } @@ -733,7 +733,7 @@ func TestAssignRoutePriorityToSplitHTTPRouteMatches(t *testing.T) { matchIndex int } now := time.Now() - const maxRelativeOrderPriorityBits = (1 << 18) - 1 + const maxRelativeOrderPriorityBits = (1 << 12) - 1 testCases := []struct { name string diff --git a/internal/dataplane/parser/translators/ingress_atc_test.go b/internal/dataplane/parser/translators/ingress_atc_test.go index 30310874e8..fa4e284abc 100644 --- a/internal/dataplane/parser/translators/ingress_atc_test.go +++ b/internal/dataplane/parser/translators/ingress_atc_test.go @@ -430,7 +430,7 @@ func TestEncodeIngressRoutePriorityFromTraits(t *testing.T) { MaxPathLength: 5, HasRegexPath: false, }, - expectedPriority: (3 << 50) | (2 << 41) | (1 << 32) | 5, + expectedPriority: (3 << 44) | (2 << 41) | (1 << 32) | 5, }, { name: "plain host false regex path true", @@ -441,7 +441,7 @@ func TestEncodeIngressRoutePriorityFromTraits(t *testing.T) { MaxPathLength: 5, HasRegexPath: true, }, - expectedPriority: (3 << 50) | (2 << 41) | (2 << 33) | (1 << 16) | 5, + expectedPriority: (3 << 44) | (2 << 41) | (2 << 33) | (1 << 16) | 5, }, { name: "header number exceed limit", @@ -452,7 +452,7 @@ func TestEncodeIngressRoutePriorityFromTraits(t *testing.T) { MaxPathLength: 5, HasRegexPath: true, }, - expectedPriority: (3 << 50) | (2 << 41) | (255 << 33) | (1 << 16) | 5, + expectedPriority: (3 << 44) | (2 << 41) | (255 << 33) | (1 << 16) | 5, }, { name: "path length exceed limit", @@ -461,7 +461,7 @@ func TestEncodeIngressRoutePriorityFromTraits(t *testing.T) { PlainHostOnly: true, MaxPathLength: 100000, }, - expectedPriority: (3 << 50) | (2 << 41) | (1 << 32) | 65535, + expectedPriority: (3 << 44) | (2 << 41) | (1 << 32) | 65535, }, }