Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warning #50995

Merged
merged 2 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/config/analysis/msg/messages.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/config/analysis/msg/messages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ messages:
- name: "ServiceEntryAddressesRequired"
code: IST0134
level: Warning
description: "Virtual IP addresses are required for ports serving TCP (or unset) protocol"
description: "Virtual IP addresses are required for ports serving TCP (or unset) protocol when ISTIO_META_DNS_AUTO_ALLOCATE is not set on a proxy"
hanxiaop marked this conversation as resolved.
Show resolved Hide resolved
template: "ServiceEntry addresses are required for this protocol."

- name: "DeprecatedAnnotation"
Expand Down
3 changes: 2 additions & 1 deletion pkg/config/validation/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -2701,7 +2701,8 @@ var ValidateServiceEntry = RegisterValidateFunc("ValidateServiceEntry",
}
if len(serviceEntry.Addresses) == 0 {
if port.Protocol == "" || port.Protocol == "TCP" {
errs = AppendValidation(errs, WrapWarning(fmt.Errorf("addresses are required for ports serving TCP (or unset) protocol")))
errs = AppendValidation(errs, WrapWarning(fmt.Errorf("addresses are required for ports serving TCP (or unset) protocol "+
"when ISTIO_META_DNS_AUTO_ALLOCATE is not set on a proxy")))
}
}
errs = AppendValidation(errs,
Expand Down