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/07/08 02:21:23 UTC

[GitHub] [apisix-ingress-controller] AlinsRan opened a new pull request, #1141: chore: ApisixUpstream v2

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

   Signed-off-by: Jintao Zhang <zh...@gmail.com>
   
   <!-- Please answer these questions before submitting a pull request -->
   
   ### Type of change:
   
   <!-- Please delete options that are not relevant. -->
   
   - [ ] Bugfix
   - [ ] New feature provided
   - [ ] Improve performance
   - [ ] Backport patches
   
   ### What this PR does / why we need it:
   <!--- Why is this change required? What problem does it solve? -->
   <!--- If it fixes an open issue, please link to the issue here. -->
   
   ### Pre-submission checklist:
   
   <!--
   Please follow the requirements:
   1. Use Draft if the PR is not ready to be reviewed
   2. Test is required for the feat/fix PR, unless you have a good reason
   3. Doc is required for the feat PR
   4. Use a new commit to resolve review instead of `push -f`
   5. Use "request review" to notify the reviewer once you have resolved the review
   -->
   
   * [ ] Did you explain what problem does this PR solve? Or what new features have been added?
   * [ ] Have you added corresponding test cases?
   * [ ] Have you modified the corresponding document?
   * [ ] Is this PR backward compatible? **If it is not backward compatible, please discuss on the [mailing list](https://github.com/apache/apisix-ingress-controller#community) first**
   


-- 
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 #1141: chore: ApisixUpstream v2

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

   # [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1141?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 [#1141](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1141?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (abbb767) into [master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/62e0ea20031ebfa664af5b0d5ab2e76336bac107?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (62e0ea2) will **increase** coverage by `0.46%`.
   > The diff coverage is `36.23%`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #1141      +/-   ##
   ==========================================
   + Coverage   30.24%   30.70%   +0.46%     
   ==========================================
     Files          81       81              
     Lines        9453     9887     +434     
   ==========================================
   + Hits         2859     3036     +177     
   - Misses       6279     6527     +248     
   - Partials      315      324       +9     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1141?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\_upstream.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1141/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-cGtnL2luZ3Jlc3MvYXBpc2l4X3Vwc3RyZWFtLmdv) | `0.00% <0.00%> (ø)` | |
   | [pkg/ingress/controller.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1141/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.37% <0.00%> (-0.03%)` | :arrow_down: |
   | [pkg/ingress/status.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1141/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/1141/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==) | `34.28% <23.68%> (-8.06%)` | :arrow_down: |
   | [pkg/kube/translation/apisix\_upstream.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1141/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-cGtnL2t1YmUvdHJhbnNsYXRpb24vYXBpc2l4X3Vwc3RyZWFtLmdv) | `82.54% <82.79%> (-0.41%)` | :arrow_down: |
   | [cmd/ingress/ingress.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1141/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==) | `79.81% <100.00%> (+0.37%)` | :arrow_up: |
   | [pkg/config/config.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1141/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=) | `66.98% <100.00%> (+0.63%)` | :arrow_up: |
   | [pkg/kube/translation/ingress.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1141/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-cGtnL2t1YmUvdHJhbnNsYXRpb24vaW5ncmVzcy5nbw==) | `65.81% <0.00%> (-2.85%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1141?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/1141?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 [62e0ea2...abbb767](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1141?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 a diff in pull request #1141: chore: ApisixUpstream v2

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


##########
pkg/config/config.go:
##########
@@ -67,6 +67,8 @@ const (
 	ControllerName = "apisix.apache.org/gateway-controller"
 )
 
+type ApisxiVersion string
+

Review Comment:
   ditto



##########
conf/config-default.yaml:
##########
@@ -77,6 +77,7 @@ kubernetes:
                                        # Note: This feature is currently under development and may not work as expected. 
                                        # It is not recommended to use it in a production environment.
                                        # Before we announce support for it to reach Beta level or GA.
+  apisix_version: apisix.apache.org/v2beta3 #the api group version default "apisix.apache.org/v2beta3", can be "apisix.apache.org/v2beta3" or "apisix.apache.org/v2"

Review Comment:
   I think it would be better to name it api_version or cr_api_version



-- 
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] AlinsRan commented on a diff in pull request #1141: chore: ApisixUpstream v2

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


##########
cmd/ingress/ingress.go:
##########
@@ -166,6 +166,7 @@ For example, no available LB exists in the bare metal environment.`)
 	cmd.PersistentFlags().StringVar(&cfg.Kubernetes.ApisixTlsVersion, "apisix-tls-version", config.ApisixV2beta3, "the supported apisixtls api group version, can be \"apisix.apache.org/v2beta3\" or \"apisix.apache.org/v2\"")
 	cmd.PersistentFlags().StringVar(&cfg.Kubernetes.ApisixClusterConfigVersion, "apisix-cluster-config-version", config.ApisixV2beta3, "the supported ApisixClusterConfig api group version, can be \"apisix.apache.org/v2beta3\" or \"apisix.apache.org/v2\"")
 	cmd.PersistentFlags().StringVar(&cfg.Kubernetes.ApisixConsumerVersion, "apisix-consumer-version", config.ApisixV2beta3, "the supported ApisixConsumer api group version, can be \"apisix.apache.org/v2beta3\" or \"apisix.apache.org/v2\"")
+	cmd.PersistentFlags().StringVar(&cfg.Kubernetes.ApiVersion, "api-version", config.DefaultApisixVersion, config.ApisixVersionDescribe)

Review Comment:
   Sure!



-- 
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 #1141: chore: ApisixUpstream v2

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


##########
cmd/ingress/ingress.go:
##########
@@ -166,6 +166,7 @@ For example, no available LB exists in the bare metal environment.`)
 	cmd.PersistentFlags().StringVar(&cfg.Kubernetes.ApisixTlsVersion, "apisix-tls-version", config.ApisixV2beta3, "the supported apisixtls api group version, can be \"apisix.apache.org/v2beta3\" or \"apisix.apache.org/v2\"")
 	cmd.PersistentFlags().StringVar(&cfg.Kubernetes.ApisixClusterConfigVersion, "apisix-cluster-config-version", config.ApisixV2beta3, "the supported ApisixClusterConfig api group version, can be \"apisix.apache.org/v2beta3\" or \"apisix.apache.org/v2\"")
 	cmd.PersistentFlags().StringVar(&cfg.Kubernetes.ApisixConsumerVersion, "apisix-consumer-version", config.ApisixV2beta3, "the supported ApisixConsumer api group version, can be \"apisix.apache.org/v2beta3\" or \"apisix.apache.org/v2\"")
+	cmd.PersistentFlags().StringVar(&cfg.Kubernetes.ApiVersion, "api-version", config.DefaultApisixVersion, config.ApisixVersionDescribe)

Review Comment:
   Can you replace these `ApisixVersion` with `APIVersion`?  
   
   We don’t need keep the name `config.ApisixVersion` `config.DefaultApisixVersion` etc.



-- 
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 #1141: chore: ApisixUpstream v2

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


-- 
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 #1141: chore: ApisixUpstream v2

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


##########
pkg/config/config.go:
##########
@@ -99,6 +104,7 @@ type KubernetesConfig struct {
 	ApisixConsumerVersion      string             `json:"apisix_consumer_version" yaml:"apisix_consumer_version"`
 	ApisixTlsVersion           string             `json:"apisix_tls_version" yaml:"apisix_tls_version"`
 	ApisixClusterConfigVersion string             `json:"apisix_cluster_config_version" yaml:"apisix_cluster_config_version"`
+	ApiVersion                 string             `json:"api_version" yaml:"api_version"`

Review Comment:
   I suggest change it to `APIVersion` 



##########
pkg/config/config.go:
##########
@@ -57,8 +57,8 @@ const (
 	ApisixV2beta3 = "apisix.apache.org/v2beta3"
 	// ApisixV2 represents apisix.apache.org/v2
 	ApisixV2 = "apisix.apache.org/v2"
-	// DefaultApisixVersion refers to the default resource version
-	DefaultApisixVersion = ApisixV2beta3
+	// DefaultApiVersion refers to the default resource version

Review Comment:
   ```suggestion
   	// DefaultAPIVersion refers to the default resource version
   ```



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