You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "tao12345666333 (via GitHub)" <gi...@apache.org> on 2023/04/11 01:08:40 UTC

[GitHub] [apisix-ingress-controller] tao12345666333 commented on a diff in pull request #1728: feat: CRDs ingressClassName field cannot be modified

tao12345666333 commented on code in PR #1728:
URL: https://github.com/apache/apisix-ingress-controller/pull/1728#discussion_r1162201280


##########
pkg/api/validation/utils.go:
##########
@@ -117,3 +117,10 @@ func ValidatePlugin(client apisix.Schema, pluginName string, pluginConfig interf
 
 	return
 }
+
+func validateIngressClassName(oldIngressClassName, newIngressClass string) (bool, error) {
+	if oldIngressClassName != "" && oldIngressClassName != newIngressClass {
+		return false, fmt.Errorf("ingressClassName is not allowed to be modified")

Review Comment:
   ```suggestion
   		return false, fmt.Errorf("The ingressClassName field is not allowed to be modified.")
   ```



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