opt:relax dns service domain validation (#2661)

This commit is contained in:
澄潭
2025-07-25 20:15:54 +08:00
committed by GitHub
parent f826d79109
commit 39dd4538c9

View File

@@ -129,7 +129,7 @@ func (w *watcher) Stop() {
w.Ready(false)
}
var domainRegex = regexp.MustCompile(`^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$`)
var domainRegex = regexp.MustCompile(`^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$`)
func (w *watcher) generateServiceEntry(host string) *v1alpha3.ServiceEntry {
endpoints := make([]*v1alpha3.WorkloadEntry, 0)