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/04/28 08:45:03 UTC

[GitHub] [apisix-ingress-controller] lingsamuel opened a new pull request, #989: feat: support ApisixConsumer v2

lingsamuel opened a new pull request, #989:
URL: https://github.com/apache/apisix-ingress-controller/pull/989

   Signed-off-by: Ling Samuel <li...@gmail.com>
   
   <!-- Please answer these questions before submitting a pull request -->
   
   ### 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] tao12345666333 commented on pull request #989: feat: support ApisixConsumer v2

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on PR #989:
URL: https://github.com/apache/apisix-ingress-controller/pull/989#issuecomment-1134332866

   Thanks! Let's wait for CI 


-- 
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 #989: feat: support ApisixConsumer v2

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #989:
URL: https://github.com/apache/apisix-ingress-controller/pull/989#issuecomment-1111956656

   # [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/989?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 [#989](https://codecov.io/gh/apache/apisix-ingress-controller/pull/989?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c96c364) into [master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/0f4391a87a38ae9a2c61a0cea717cb831fc55506?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0f4391a) will **decrease** coverage by `0.50%`.
   > The diff coverage is `20.63%`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #989      +/-   ##
   ==========================================
   - Coverage   31.91%   31.40%   -0.51%     
   ==========================================
     Files          73       73              
     Lines        7953     8087     +134     
   ==========================================
   + Hits         2538     2540       +2     
   - Misses       5139     5271     +132     
     Partials      276      276              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/989?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/apisix\_consumer.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/989/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-cGtnL2luZ3Jlc3MvYXBpc2l4X2NvbnN1bWVyLmdv) | `0.00% <0.00%> (ø)` | |
   | [pkg/ingress/compare.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/989/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-cGtnL2luZ3Jlc3MvY29tcGFyZS5nbw==) | `0.00% <0.00%> (ø)` | |
   | [pkg/ingress/controller.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/989/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.92% <0.00%> (-0.02%)` | :arrow_down: |
   | [pkg/ingress/status.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/989/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-cGtnL2luZ3Jlc3Mvc3RhdHVzLmdv) | `0.00% <0.00%> (ø)` | |
   | [pkg/kube/translation/translator.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/989/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% <ø> (ø)` | |
   | [pkg/kube/translation/apisix\_consumer.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/989/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) | `37.50% <42.10%> (-37.50%)` | :arrow_down: |
   | [pkg/kube/translation/plugin.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/989/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) | `66.27% <64.51%> (-33.73%)` | :arrow_down: |
   | [cmd/ingress/ingress.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/989/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-Y21kL2luZ3Jlc3MvaW5ncmVzcy5nbw==) | `78.64% <100.00%> (+0.20%)` | :arrow_up: |
   | [pkg/config/config.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/989/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-cGtnL2NvbmZpZy9jb25maWcuZ28=) | `65.00% <100.00%> (+0.35%)` | :arrow_up: |
   | ... and [1 more](https://codecov.io/gh/apache/apisix-ingress-controller/pull/989/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/989?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/989?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 [0f4391a...c96c364](https://codecov.io/gh/apache/apisix-ingress-controller/pull/989?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 merged pull request #989: feat: support ApisixConsumer v2

Posted by GitBox <gi...@apache.org>.
tao12345666333 merged PR #989:
URL: https://github.com/apache/apisix-ingress-controller/pull/989


-- 
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 #989: feat: support ApisixConsumer v2

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on code in PR #989:
URL: https://github.com/apache/apisix-ingress-controller/pull/989#discussion_r871919984


##########
pkg/kube/apisix_consumer.go:
##########
@@ -0,0 +1,169 @@
+// 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 kube
+
+import (
+	"errors"
+
+	"github.com/apache/apisix-ingress-controller/pkg/config"
+	configv2 "github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2"
+	configv2beta3 "github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2beta3"
+	listersv2 "github.com/apache/apisix-ingress-controller/pkg/kube/apisix/client/listers/config/v2"
+	listersv2beta3 "github.com/apache/apisix-ingress-controller/pkg/kube/apisix/client/listers/config/v2beta3"
+)
+
+// ApisixConsumerLister is an encapsulation for the lister of ApisixConsumer,
+// it aims at to be compatible with different ApisixConsumer versions.
+type ApisixConsumerLister interface {
+	// V2beta3 gets the ApisixConsumer in apisix.apache.org/v2beta3.
+	V2beta3(string, string) (ApisixConsumer, error)
+	// V2 gets the ApisixConsumer in apisix.apache.org/v2.
+	V2(string, string) (ApisixConsumer, error)
+}
+
+// ApisixConsumerInformer is an encapsulation for the informer of ApisixConsumer,
+// it aims at to be compatible with different ApisixConsumer versions.
+type ApisixConsumerInformer interface {
+	Run(chan struct{})
+}
+
+// ApisixConsumer is an encapsulation for ApisixConsumer resource with different
+// versions, for now, they are apisix.apache.org/v1 and apisix.apache.org/v2alpha1

Review Comment:
   v2beta3 and v2



-- 
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