istio/istio · error

webhook URL %s is malformed

Error message

webhook URL %s is malformed

What it means

Error "webhook URL %s is malformed" thrown in istio/istio.

Source

Thrown at istioctl/pkg/multixds/google.go:40

func isMCPAddr(u *url.URL) bool {
	return strings.HasSuffix(u.Host, ".googleapis.com") || strings.HasSuffix(u.Host, ".googleapis.com:443")
}

func parseMCPAddr(u *url.URL) (*xdsAddr, error) {
	ret := &xdsAddr{host: u.Host}
	if !strings.HasSuffix(ret.host, ":443") {
		ret.host += ":443"
	}
	const projSeg = "/projects/"
	i := strings.Index(u.Path, projSeg)
	if i == -1 {
		return nil, fmt.Errorf("webhook URL %s doesn't contain the projects segment", u)
	}
	i += len(projSeg)
	j := strings.IndexByte(u.Path[i:], '/')
	if j == -1 {
		return nil, fmt.Errorf("webhook URL %s is malformed", u)
	}
	ret.gcpProject = u.Path[i : i+j]

	const crSeg = "/ISTIO_META_CLOUDRUN_ADDR/"
	i += j
	j = strings.Index(u.Path[i:], crSeg)
	if j == -1 {
		return nil, fmt.Errorf("webhook URL %s is missing %s", u, crSeg)
	}
	ret.istiod = u.Path[i+j+len(crSeg):]

	return ret, nil
}

View on GitHub (pinned to 8dc789c5cf)

When it happens

Trigger: Thrown at istioctl/pkg/multixds/google.go:40 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of istio/istio@8dc789c5cf (2026-08-15). Data as JSON: /api/errors/f78bf620e61bf534. Report an issue: GitHub.