From 610121b1152b06b42e749bfd6c39a9490f6e1fb4 Mon Sep 17 00:00:00 2001 From: Pawan Pinjarkar Date: Mon, 26 Aug 2024 23:45:56 -0400 Subject: [PATCH] OCPBUGS-33308: IngressController subnet selection in AWS Add a warning that public subnets can not be set when publish is set to internal --- pkg/asset/installconfig/aws/validation.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/asset/installconfig/aws/validation.go b/pkg/asset/installconfig/aws/validation.go index 2eb1858bb3..cdfba5f033 100644 --- a/pkg/asset/installconfig/aws/validation.go +++ b/pkg/asset/installconfig/aws/validation.go @@ -203,6 +203,9 @@ func validateSubnets(ctx context.Context, meta *Metadata, fldPath *field.Path, s if err != nil { return append(allErrs, field.Invalid(fldPath, subnets, err.Error())) } + if publish == types.InternalPublishingStrategy && len(publicSubnets) > 0 { + logrus.Warnf("Public subnets should not be provided when publish is set to %s", types.InternalPublishingStrategy) + } publicSubnetsIdx := map[string]int{} for idx, id := range subnets { if _, ok := publicSubnets[id]; ok {