pismo-foss / istiops

Istio's Traffic Manager
42 stars 5 forks source link

CLI 'show' option is only showing `exact` request header value #20

Closed vsantos closed 5 years ago

vsantos commented 5 years ago

The CLI command show is not showing all possible request Headers options, besides exact value there are three more possible value match: preffix and regex. We should validate and output every single one of it to avoid clear rules that we can't see. (:

Current output

client -> request to ->  [foo.bar]
  \_ Headers
      |- x-account: 12
       \_ Destination [k8s service]

Suggested output

client -> request to ->  [foo.bar]
  \_ Headers
      - Exact:
          |- x-account: 12
           \_ Destination [k8s service]
      - Regex:
          |- x-account: "^(123|456)$"
           \_ Destination [k8s service]
vsantos commented 5 years ago

Done, the output now shows header's value attribute. Ex:

client -> request to ->  [foo.bar]
  \_ Headers
      |- x-account: exact:"12"
       \_ Destination [k8s service]