nic-6443 commented on code in PR #2810:
URL:
https://github.com/apache/apisix-ingress-controller/pull/2810#discussion_r3700912435
##########
internal/webhook/v1/apisixtls_webhook.go:
##########
@@ -74,16 +74,17 @@ func (v *ApisixTlsCustomValidator) ValidateCreate(ctx
context.Context, obj runti
}
detector := sslvalidator.NewConflictDetector(v.Client)
- conflicts := detector.DetectConflicts(ctx, tls)
- if len(conflicts) > 0 {
- return nil, fmt.Errorf("%s",
sslvalidator.FormatConflicts(conflicts))
- }
-
warnings := v.collectWarnings(ctx, tls)
+ // Overlapping SSL config is advisory: APISIX serves overlapping
objects and
+ // resolves by SNI, so warn instead of denying.
+ skipADCValidation := v.initErr != nil || len(warnings) > 0
+ if conflicts := detector.DetectConflicts(ctx, tls); len(conflicts) > 0 {
Review Comment:
[P1] Apply the warning behavior to `ValidateUpdate` too. This hunk changes
only create; the update path still returns a hard error for the same conflict.
An existing ApisixTls in an overlapping setup therefore still cannot be edited,
which is one of the cases this PR says the warning conversion fixes. Please
mirror this flow in `ValidateUpdate` and add an update regression test.
--
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]