-
Notifications
You must be signed in to change notification settings - Fork 346
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
feat: add v2beta1 structure for ApisixRoute #572
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #572 +/- ##
==========================================
- Coverage 35.04% 34.86% -0.18%
==========================================
Files 55 55
Lines 4557 4557
==========================================
- Hits 1597 1589 -8
- Misses 2742 2747 +5
- Partials 218 221 +3 ☔ View full report in Codecov by Sentry. |
@gxthrj Please settle the CI problems. |
type ApisixRoute struct { | ||
metav1.TypeMeta `json:",inline" yaml:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"` | ||
Spec *ApisixRouteSpec `json:"spec,omitempty" yaml:"spec,omitempty"` |
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.
We may don't need the pointer.
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 just copy the other fields from v2alpha1, Perhaps we can change these fields, do not use pointer since v2beta1.
type ApisixRoute struct { | ||
metav1.TypeMeta `json:",inline" yaml:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"` | ||
Spec *ApisixRouteSpec `json:"spec,omitempty" yaml:"spec,omitempty"` |
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.
We may don't need the pointer.
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
|
||
// ApisixStatus is the status report for Apisix ingress Resources | ||
type ApisixStatus struct { | ||
Conditions *[]metav1.Condition `json:"conditions,omitempty" yaml:"conditions,omitempty"` |
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 a slice is enough, why we need a pointer which points to a slice.
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
- name: v2alpha1 | ||
served: true | ||
storage: false |
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.
We may still keep the v2alpha1
as the storage version, once the v2beta1 logic are completed, we can migrate from v2alpha1 to v2beta1.
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.
OK
type: string | ||
required: | ||
- serviceName | ||
- servicePort |
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.
EOL missing.
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.
Done
pkg/kube/apisix_route.go
Outdated
@@ -28,6 +29,8 @@ const ( | |||
ApisixRouteV1 = "apisix.apache.org/v1" | |||
// ApisixRouteV2alpha1 represents the APisixRoute in apisix.apache.org/v2alpha1 group version | |||
ApisixRouteV2alpha1 = "apisix.apache.org/v2alpha1" | |||
// ApisixRouteV2beta1 represents the APisixRoute in apisix.apache.org/v2beta1 group 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.
// ApisixRouteV2beta1 represents the APisixRoute in apisix.apache.org/v2beta1 group version | |
// ApisixRouteV2beta1 represents the ApisixRoute in apisix.apache.org/v2beta1 group 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.
done
* feat: add v2beta1 version for ApisixRoute * fix: crd versions * fix: storage version
Please answer these questions before submitting a pull request
Why submit this pull request?
Bugfix
New feature provided
Improve performance
Backport patches
Related issues
feat: Support UDP definition #116 feat: support udp route #396