You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/05/23 09:41:26 UTC
[GitHub] [apisix-ingress-controller] lingsamuel opened a new pull request, #1037: feat: support gateway API HTTPRoute
lingsamuel opened a new pull request, #1037:
URL: https://github.com/apache/apisix-ingress-controller/pull/1037
Signed-off-by: Ling Samuel <li...@gmail.com>
### Type of change:
- [x] New feature provided
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] codecov-commenter commented on pull request #1037: feat: support gateway API HTTPRoute
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #1037:
URL: https://github.com/apache/apisix-ingress-controller/pull/1037#issuecomment-1138270054
# [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1037?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#1037](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1037?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (721d84e) into [master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/cd5063f04881248338595cb85100ef1009e75a80?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cd5063f) will **increase** coverage by `0.35%`.
> The diff coverage is `33.57%`.
```diff
@@ Coverage Diff @@
## master #1037 +/- ##
==========================================
+ Coverage 30.55% 30.90% +0.35%
==========================================
Files 74 76 +2
Lines 8320 8885 +565
==========================================
+ Hits 2542 2746 +204
- Misses 5502 5846 +344
- Partials 276 293 +17
```
| [Impacted Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1037?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [pkg/ingress/controller.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1037/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2luZ3Jlc3MvY29udHJvbGxlci5nbw==) | `0.86% <0.00%> (-0.04%)` | :arrow_down: |
| [pkg/ingress/gateway\_httproute.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1037/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2luZ3Jlc3MvZ2F0ZXdheV9odHRwcm91dGUuZ28=) | `0.00% <0.00%> (ø)` | |
| [pkg/types/event.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1037/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3R5cGVzL2V2ZW50Lmdv) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/gateway\_httproute.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1037/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vZ2F0ZXdheV9odHRwcm91dGUuZ28=) | `66.90% <66.90%> (ø)` | |
| [pkg/kube/translation/translator.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1037/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vdHJhbnNsYXRvci5nbw==) | `46.07% <100.00%> (ø)` | |
| [pkg/kube/translation/plugin.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1037/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vcGx1Z2luLmdv) | `70.29% <0.00%> (-29.71%)` | :arrow_down: |
| [pkg/kube/translation/apisix\_consumer.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1037/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYXBpc2l4X2NvbnN1bWVyLmdv) | `69.23% <0.00%> (-5.77%)` | :arrow_down: |
| [pkg/kube/translation/apisix\_route.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1037/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYXBpc2l4X3JvdXRlLmdv) | `20.87% <0.00%> (-0.56%)` | :arrow_down: |
| ... and [4 more](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1037/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1037?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1037?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [cd5063f...721d84e](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1037?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] tao12345666333 commented on pull request #1037: feat: support gateway API HTTPRoute
Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on PR #1037:
URL: https://github.com/apache/apisix-ingress-controller/pull/1037#issuecomment-1138654571
re-run all jobs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] tao12345666333 commented on a diff in pull request #1037: feat: support gateway API HTTPRoute
Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on code in PR #1037:
URL: https://github.com/apache/apisix-ingress-controller/pull/1037#discussion_r881330075
##########
pkg/kube/translation/gateway_httproute.go:
##########
@@ -0,0 +1,235 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+package translation
+
+import (
+ "fmt"
+ "strings"
+
+ "github.com/pkg/errors"
+ "go.uber.org/zap"
+ gatewayv1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
+
+ "github.com/apache/apisix-ingress-controller/pkg/id"
+ "github.com/apache/apisix-ingress-controller/pkg/log"
+ apisixv1 "github.com/apache/apisix-ingress-controller/pkg/types/apisix/v1"
+)
+
+func (t *translator) TranslateGatewayHTTPRouteV1Alpha2(httpRoute *gatewayv1alpha2.HTTPRoute) (*TranslateContext, error) {
+ ctx := defaultEmptyTranslateContext()
+
+ var hosts []string
+ for _, hostname := range httpRoute.Spec.Hostnames {
+ hosts = append(hosts, string(hostname))
+ }
+
+ rules := httpRoute.Spec.Rules
+
+ for i, rule := range rules {
+ backends := rule.BackendRefs
+ if len(backends) == 0 {
+ continue
+ }
+
+ var ruleUpstreams []*apisixv1.Upstream
+ var weightedUpstreams []apisixv1.TrafficSplitConfigRuleWeightedUpstream
+
+ for j, backend := range backends {
+ //TODO: Support filters
Review Comment:
We can implement some basic proxy capabilities first, and other extension capabilities can be placed in subsequent PRs
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] tao12345666333 merged pull request #1037: feat: support gateway API HTTPRoute
Posted by GitBox <gi...@apache.org>.
tao12345666333 merged PR #1037:
URL: https://github.com/apache/apisix-ingress-controller/pull/1037
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org