-
Notifications
You must be signed in to change notification settings - Fork 338
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: init ApisixPluginConfig crd #4 (#638) #694
Conversation
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
// +kubebuilder:subresource:status | ||
// +kubebuilder:object:generate=true | ||
// +kubebuilder:printcolumn:name="Id",type="date",JSONPath=".metadata.namespace" |
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.
the type is incorrect
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.
hi, i'm busy now just after the national vocation -,-.
i will update my code latter.
@neverCase any update? |
# Conflicts: # samples/deploy/crd/v1/ApisixPluginConfig.yaml
@tao12345666333 hi, i'm back. |
cool! |
@tao12345666333 Error: pkg/kube/apisix/apis/config/v1alpha1/register.go:42: File is not `gofmt`-ed with `-s` (gofmt)
scheme.AddKnownTypes(SchemeGroupVersion,
//&ApisixPluginConfig{},
//&ApisixPluginConfigList{},
)
Error: Process completed with exit code 1. I had annotated the |
Just run make codegen |
@tao12345666333 hi, i had run the |
I had add client implementation in the early commit. |
… ApisixPluginConfig crd (apache#638)
Codecov Report
@@ Coverage Diff @@
## master #694 +/- ##
==========================================
- Coverage 32.59% 32.58% -0.01%
==========================================
Files 66 65 -1
Lines 6780 6779 -1
==========================================
- Hits 2210 2209 -1
Misses 4321 4321
Partials 249 249
Continue to review full report at Codecov.
|
I forgot the license header, lol. |
@tao12345666333 |
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.
The CRD api-version should be upgrade.
# limitations under the License. | ||
# | ||
|
||
apiVersion: apiextensions.k8s.io/v1beta1 |
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 have upgraded its version to v1, please upgrade it. #693
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 have upgraded its version to v1, please upgrade it. #693
ok
In #707, we discussed that we want to use a unified version for all resource management, so here could you add it to the v2beta2 version? I'm sorry that this is inconsistent with our initial expectations. |
Never mind. |
@tao12345666333 |
// ApisixPluginConfigSpec defines the desired state of ApisixPluginConfigSpec. | ||
type ApisixPluginConfigSpec struct { | ||
// +kubebuilder:validation:MinLength=1 | ||
Desc string `json:"desc,omitempty" yaml:"desc,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.
Is this necessary? The Desc
for the underlying plugin_config
object is used for the management purpose, I think it's not useful for users, they can add descriptions from the annotations.
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 we can keep it like this
Is this necessary? The
Desc
for the underlyingplugin_config
object is used for the management purpose, I think it's not useful for users, they can add descriptions from the annotations.
I think we can keep it like this.
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.
But we don't have such field for other objects, and so far no users report such demands, so I doubt the necessity of it.
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.
If we look at it from the point of view of consistency with other resources, we really don’t need to keep it.
@neverCase could you please remove this field?
@tao12345666333 |
#746 is deleting v1 and v2alpha1, so we don't need to keep these two versions in the CRD definition. In addition, please fix the lint error. Thanks! |
@tao12345666333 golangci-lint run
pkg/kube/apisix/apis/config/v2beta2/types.go:211: File is not `gofmt`-ed with `-s` (gofmt)
Status ApisixStatus `json:"status,omitempty" yaml:"status,omitempty"`
pkg/apisix/plugin_test.go:25: File is not `goimports`-ed with -local github.com/apache/apisix-ingress-controller (goimports)
"github.com/apache/apisix-ingress-controller/pkg/metrics"
pkg/apisix/schema_test.go:24: File is not `goimports`-ed with -local github.com/apache/apisix-ingress-controller (goimports)
"github.com/apache/apisix-ingress-controller/pkg/metrics" But there were still some errors left: golangci-lint run
pkg/apisix/plugin_test.go:25: File is not `goimports`-ed with -local github.com/apache/apisix-ingress-controller (goimports)
"github.com/apache/apisix-ingress-controller/pkg/metrics"
pkg/apisix/schema_test.go:24: File is not `goimports`-ed with -local github.com/apache/apisix-ingress-controller (goimports)
"github.com/apache/apisix-ingress-controller/pkg/metrics" Maybe this caused by my latest golangci-lint |
If it's reported by the lint tool, let's fix it. |
@tao12345666333 @tokers |
ping @gxthrj |
required: | ||
- plugins | ||
properties: | ||
desc: |
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.
And remove this one.
@neverCase There is no problem overall, please delete the desc field and run |
@tao12345666333 |
@tao12345666333 |
wait for CI |
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.
Thanks!
Please answer these questions before submitting a pull request
Why submit this pull request?
Bugfix
New feature provided
Improve performance
Backport patches
Related issues
proposal: Add CRD ApisixPluginConfig support plugin configs #638
feat: init ApisixPluginConfig crd (#638) #689
Bugfix
Description
How to fix?
New feature or improvement
Backport patches
Why need to backport?
Source branch
Related commits and pull requests
Target branch