Fix `NullPointerException` in Istio ServiceEntry registry (#12087)
This commit is contained in:
parent
bbbed44863
commit
f5cd798185
|
|
@ -93,6 +93,7 @@
|
|||
- API `/api/v1/labels` and `/api/v1/label/<label_name>/values` support return matched metrics labels.
|
||||
- OAL:
|
||||
- Deprecate `percentile` function and introduce `percentile2` function instead.
|
||||
* Fix `NullPointerException` in Istio ServiceEntry registry.
|
||||
|
||||
#### UI
|
||||
|
||||
|
|
|
|||
|
|
@ -74,6 +74,10 @@ public class IstioServiceEntryRegistry {
|
|||
.filter(se -> !ignoredNamespaces.contains(se.getMetadata().getNamespace()))
|
||||
.filter(se -> {
|
||||
final var spec = se.getSpec();
|
||||
if (spec.getResolution() == null) {
|
||||
log.debug("Unsupported service entry resolution: {}", spec.getResolution());
|
||||
return false;
|
||||
}
|
||||
switch (spec.getResolution()) {
|
||||
case STATIC:
|
||||
return spec
|
||||
|
|
|
|||
Loading…
Reference in New Issue