-
Notifications
You must be signed in to change notification settings - Fork 336
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
chore: ApisixUpstream v2 #1141
Conversation
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
conf/config-default.yaml
Outdated
@@ -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" |
There was a problem hiding this comment.
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 | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
pkg/config/config.go
Outdated
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// DefaultApiVersion refers to the default resource version | |
// DefaultAPIVersion refers to the default resource version |
pkg/config/config.go
Outdated
@@ -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"` |
There was a problem hiding this comment.
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
Type of change:
What this PR does / why we need it:
Pre-submission checklist: