Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: ApisixUpstream v2 #1141

Merged
merged 11 commits into from
Jul 11, 2022
Merged

chore: ApisixUpstream v2 #1141

merged 11 commits into from
Jul 11, 2022

Conversation

AlinsRan
Copy link
Contributor

@AlinsRan AlinsRan commented Jul 8, 2022

Type of change:

  • Bugfix
  • New feature provided
  • Improve performance
  • Backport patches

What this PR does / why we need it:

Pre-submission checklist:

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

tao12345666333 and others added 2 commits July 6, 2022 18:01
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
@codecov-commenter
Copy link

Codecov Report

Merging #1141 (abbb767) into master (62e0ea2) will increase coverage by 0.46%.
The diff coverage is 36.23%.

@@            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 Coverage Δ
pkg/ingress/apisix_upstream.go 0.00% <0.00%> (ø)
pkg/ingress/controller.go 0.37% <0.00%> (-0.03%) ⬇️
pkg/ingress/status.go 0.00% <0.00%> (ø)
pkg/kube/translation/translator.go 34.28% <23.68%> (-8.06%) ⬇️
pkg/kube/translation/apisix_upstream.go 82.54% <82.79%> (-0.41%) ⬇️
cmd/ingress/ingress.go 79.81% <100.00%> (+0.37%) ⬆️
pkg/config/config.go 66.98% <100.00%> (+0.63%) ⬆️
pkg/kube/translation/ingress.go 65.81% <0.00%> (-2.85%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 62e0ea2...abbb767. Read the comment docs.

@AlinsRan AlinsRan marked this pull request as ready for review July 11, 2022 03:03
@@ -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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to name it api_version or cr_api_version

@@ -67,6 +67,8 @@ const (
ControllerName = "apisix.apache.org/gateway-controller"
)

type ApisxiVersion string

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// DefaultApiVersion refers to the default resource version
// DefaultAPIVersion refers to the default resource version

@@ -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"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest change it to APIVersion

@tao12345666333 tao12345666333 merged commit a649751 into apache:master Jul 11, 2022
@tao12345666333 tao12345666333 added this to the 1.5.0 milestone Jul 11, 2022
AlinsRan added a commit to AlinsRan/apisix-ingress-controller that referenced this pull request Jul 12, 2022
AlinsRan added a commit to AlinsRan/apisix-ingress-controller that referenced this pull request Jul 12, 2022
@tao12345666333 tao12345666333 linked an issue Jul 13, 2022 that may be closed by this pull request
16 tasks
@AlinsRan AlinsRan deleted the au-v2 branch July 29, 2022 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

feat: Add v2 API version support for all resources
4 participants