ServiceEntryAddressesRequired

このメッセージは、`protocol` フィールドが設定されていないか、`TCP` に設定された `ServiceEntry` に `addresses` が定義されていない場合に発生します。

このメッセージが表示されるのは

Warning [IST0134] (ServiceEntry service-entry.default serviceentry.yaml:13) ServiceEntry addresses are required for this protocol.

クラスターに、`protocol` が設定されておらず、`addresses` が欠落している次の `ServiceEntry` がある場合

apiVersion: networking.istio.io/v1
kind: ServiceEntry
metadata:
  name: service-entry
  namespace: default
spec:
  hosts:
    - 'istio.io'
  exportTo:
    - "."
  ports:
    - number: 443
      name: https
  location: MESH_EXTERNAL
  resolution: DNS

このアナライザーの別の例は、`protocol: TCP` を持ち、`addresses` が欠落している `ServiceEntry` がある場合です。

apiVersion: networking.istio.io/v1
kind: ServiceEntry
metadata:
  name: service-entry
  namespace: default
spec:
  hosts:
    - 'istio.io'
  exportTo:
    - "."
  ports:
    - number: 443
      name: https
      protocol: TCP
  location: MESH_EXTERNAL
  resolution: DNS

解決方法

`protocol` が設定されていないか、TCPに設定されている場合は、`ServiceEntry` で `addresses` を設定するようにしてください。`addresses` が設定されていない場合、`ServiceEntry` で定義されたポート上のすべてのトラフィックが、ホストに関係なく一致します。