tokers commented on a change in pull request #689:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/689#discussion_r714493943



##########
File path: pkg/kube/apisix/apis/config/v2beta1/types.go
##########
@@ -197,3 +197,35 @@ type ApisixRouteList struct {
        metav1.ListMeta `json:"metadata" yaml:"metadata"`
        Items           []ApisixRoute `json:"items,omitempty" 
yaml:"items,omitempty"`
 }
+
+// +genclient
+// +genclient:nonNamespaced

Review comment:
       IMHO it should be a namespaced resource.

##########
File path: pkg/kube/apisix/apis/config/v2beta1/types.go
##########
@@ -197,3 +197,35 @@ type ApisixRouteList struct {
        metav1.ListMeta `json:"metadata" yaml:"metadata"`
        Items           []ApisixRoute `json:"items,omitempty" 
yaml:"items,omitempty"`
 }
+
+// +genclient
+// +genclient:nonNamespaced
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +kubebuilder:subresource:status
+
+// ApisixPluginConfig is the Schema for the ApisixPluginConfig resource.
+// An ApisixPluginConfig is used to support a group of plugin configs
+type ApisixPluginConfig struct {
+       metav1.TypeMeta   `json:",inline" yaml:",inline"`
+       metav1.ObjectMeta `json:"metadata" yaml:"metadata"`
+
+       // Spec defines the desired state of ApisixPluginConfigSpec.
+       Spec   ApisixPluginConfigSpec `json:"spec" yaml:"spec"`
+       Status ApisixStatus           `json:"status,omitempty" 
yaml:"status,omitempty"`
+}
+
+// ApisixPluginConfigSpec defines the desired state of ApisixPluginConfigSpec.
+type ApisixPluginConfigSpec struct {
+       Desc string `json:"desc,omitempty" yaml:"desc,omitempty"`

Review comment:
       We may add more constraints for this structure. See the JSON schema for 
it: https://github.com/apache/apisix/blob/master/apisix/schema_def.lua#L830

##########
File path: pkg/kube/apisix/apis/config/v2beta1/types.go
##########
@@ -197,3 +197,35 @@ type ApisixRouteList struct {
        metav1.ListMeta `json:"metadata" yaml:"metadata"`
        Items           []ApisixRoute `json:"items,omitempty" 
yaml:"items,omitempty"`
 }
+
+// +genclient
+// +genclient:nonNamespaced
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +kubebuilder:subresource:status
+
+// ApisixPluginConfig is the Schema for the ApisixPluginConfig resource.
+// An ApisixPluginConfig is used to support a group of plugin configs
+type ApisixPluginConfig struct {
+       metav1.TypeMeta   `json:",inline" yaml:",inline"`
+       metav1.ObjectMeta `json:"metadata" yaml:"metadata"`
+
+       // Spec defines the desired state of ApisixPluginConfigSpec.
+       Spec   ApisixPluginConfigSpec `json:"spec" yaml:"spec"`
+       Status ApisixStatus           `json:"status,omitempty" 
yaml:"status,omitempty"`
+}
+
+// ApisixPluginConfigSpec defines the desired state of ApisixPluginConfigSpec.
+type ApisixPluginConfigSpec struct {
+       Desc string `json:"desc,omitempty" yaml:"desc,omitempty"`
+       // Plugins contains a list of ApisixRouteHTTPPluginConfig
+       Plugins []ApisixRouteHTTPPluginConfig `json:"plugins,omitempty" 
yaml:"plugins,omitempty"`
+}
+
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+
+// ApisixPluginConfigList contains a list of ApisixPluginConfig.
+type ApisixPluginConfigList struct {

Review comment:
       Is this no longer used? Or how do we list ApisixPluginConfig?

##########
File path: samples/deploy/crd/v1beta1/ApisixPluginConfig.yaml
##########
@@ -0,0 +1,64 @@
+#

Review comment:
       Is this generated by `make codegen`?




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to