TIS0602 - Port appProtocol
Must Follow the 'protocol'[-suffix]
Format
The port appProtocol
must follow the 'protocol'[-suffix]
format.
appProtocol
Follows Required FormatTo ensure proper traffic routing and functionality within Istio, always set the appProtocol
for service ports following the 'protocol'[-suffix]
format, where protocol
is a recognized value such as http
, https
, tcp
, etc.
Examples
-
Service Port
appProtocol
Not Following Required FormatapiVersion: v1
kind: Service
metadata:
name: my-service
namespace: example-namespace
spec:
ports:
- port: 80
name: "http-port"
appProtocol: "invalid-protocol-name"Explanation: The
appProtocol
valueinvalid-protocol-name
does not follow the expected format of'protocol'[-suffix]
. TheappProtocol
field should start with a valid protocol, such ashttp
,https
, ortcp
, to enable proper traffic management by Istio.
Recommendation
Rename the service port appProtocol
to follow the required format for proper traffic flow.
-
Correct the
appProtocol
Value to Follow FormatUpdate the
appProtocol
to follow the required'protocol'[-suffix]
format, whereprotocol
is a valid protocol type.apiVersion: v1
kind: Service
metadata:
name: my-service
namespace: example-namespace
spec:
ports:
- port: 80
name: "http-port"
appProtocol: "http"Explanation: The updated
appProtocol
valuehttp
follows the correct format, allowing Istio to correctly handle and route traffic based on the protocol type, ensuring the expected behavior for application policies.