@@ -16,8 +16,9 @@ type Consumer struct {
1616}
1717
1818type ConsumerSpec struct {
19- GatewayRef GatewayRef `json:"gatewayRef,omitempty"`
20- Credentials []CredentialSpec `json:"credentials,omitempty"`
19+ GatewayRef GatewayRef `json:"gatewayRef,omitempty"`
20+ Credentials []Credential `json:"credentials,omitempty"`
21+ Plugins []Plugin `json:"plugins,omitempty"`
2122}
2223
2324type GatewayRef struct {
@@ -27,8 +28,8 @@ type GatewayRef struct {
2728 Namespace * string `json:"namespace,omitempty"`
2829}
2930
30- // +kubebuilder:validation:XValidation:rule="has(self.config) != has(self.secretRef)"
31- type CredentialSpec struct {
31+ type Credential struct {
32+ // +kubebuilder:validation:Required
3233 // +kubebuilder:validation:Enum=jwt-auth;basic-auth;key-auth;hmac-auth;
3334 Type string `json:"type"`
3435 Config apiextensionsv1.JSON `json:"config,omitempty"`
@@ -37,8 +38,8 @@ type CredentialSpec struct {
3738}
3839
3940type SecretReference struct {
40- Name string `json:"name"`
41- Namespace string `json:"namespace,omitempty"`
41+ Name string `json:"name"`
42+ Namespace * string `json:"namespace,omitempty"`
4243}
4344
4445type Status struct {
0 commit comments