You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/09/26 01:27:10 UTC

[GitHub] [apisix-ingress-controller] lingsamuel commented on a change in pull request #689: feat: init ApisixPluginConfig crd (#638)

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



##########
File path: pkg/kube/apisix/apis/config/v2beta1/types.go
##########
@@ -197,3 +197,46 @@ type ApisixRouteList struct {
 	metav1.ListMeta `json:"metadata" yaml:"metadata"`
 	Items           []ApisixRoute `json:"items,omitempty" yaml:"items,omitempty"`
 }
+
+// +genclient
+// +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"`
+}
+
+// ApisixPluginConfigLabels was key/value pairs to specify attributes
+// and the maxProperties could only be 16.
+type ApisixPluginConfigLabels map[string]string
+
+// ApisixPluginConfigSpec defines the desired state of ApisixPluginConfigSpec.
+type ApisixPluginConfigSpec struct {
+	// Id must be required.
+	Id int32 `json:"id" yaml:"id"`
+	// Labels use ApisixPluginConfigLabels
+	Labels ApisixPluginConfigLabels `json:"labels,omitempty" yaml:"labels,omitempty"`
+	Desc   string                   `json:"desc,omitempty" yaml:"desc,omitempty"`
+	// Plugins contains a list of ApisixRouteHTTPPluginConfig
+	// Must be required.

Review comment:
       We could use `+required` annotation.




-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org