Skip to content

Commit 5ef3486

Browse files
committed
add warn log
1 parent 1974988 commit 5ef3486

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/controlplane/controlplane.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"github.com/api7/api7-ingress-controller/internal/controller/config"
1111
"github.com/api7/api7-ingress-controller/internal/controlplane/translator"
1212
"github.com/api7/api7-ingress-controller/pkg/dashboard"
13+
"github.com/api7/gopkg/pkg/log"
1314
)
1415

1516
type Controlplane interface {
@@ -72,7 +73,7 @@ func (d *dashboardClient) Update(ctx context.Context, tctx *translator.Translate
7273
// to avoid duplication
7374
ssl.Snis = arrayUniqueElements(ssl.Snis, []string{})
7475
if len(ssl.Snis) == 1 && ssl.Snis[0] == "*" {
75-
// skip creating ssl without throwing error
76+
log.Warnf("wildcard hostname is not allowed in ssl object. Skipping SSL creation for %s: %s", obj.GetObjectKind().GroupVersionKind().Kind, obj.GetName())
7677
return nil
7778
}
7879
ssl.Snis = removeWildcard(ssl.Snis)

0 commit comments

Comments
 (0)