Copilot commented on code in PR #2647:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/2647#discussion_r2508454842


##########
docs/en/latest/reference/api-reference.md:
##########
@@ -229,6 +229,7 @@ ControlPlaneProvider defines configuration for control 
plane provider.
 
 | Field | Description |
 | --- | --- |
+| `mode` _string_ | Type specifies the mode of control plane provider. Can be 
`apisix` or `apisix-standalone`. |

Review Comment:
   The field description says "Type specifies the mode" but the field name is 
`mode`. This should be corrected to say "Mode specifies the mode of control 
plane provider."
   ```suggestion
   | `mode` _string_ | Mode specifies the mode of control plane provider. Can 
be `apisix` or `apisix-standalone`. |
   ```



##########
config/crd/bases/apisix.apache.org_gatewayproxies.yaml:
##########
@@ -127,6 +127,11 @@ spec:
                           type: string
                         minItems: 1
                         type: array
+                      mode:
+                        description: |-
+                          Type specifies the mode of control plane provider.

Review Comment:
   The CRD description says "Type specifies the mode" but the field name is 
`mode`. This should be corrected to say "Mode specifies the mode of control 
plane provider."
   ```suggestion
                             Mode specifies the mode of control plane provider.
   ```



##########
api/v1alpha1/gatewayproxy_types.go:
##########
@@ -119,7 +119,13 @@ type ControlPlaneAuth struct {
 
 // ControlPlaneProvider defines configuration for control plane provider.
 // +kubebuilder:validation:XValidation:rule="has(self.endpoints) != 
has(self.service)"
+// +kubebuilder:validation:XValidation:rule="oldSelf == null || 
(!has(self.mode) && !has(oldSelf.mode)) || self.mode == 
oldSelf.mode",message="mode is immutable"
 type ControlPlaneProvider struct {
+       // Type specifies the mode of control plane provider.

Review Comment:
   The comment says "Type specifies the mode" but the field name is `Mode`. 
This should be corrected to say "Mode specifies the mode of control plane 
provider."
   ```suggestion
        // Mode specifies the mode of control plane provider.
   ```



-- 
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