traefik / mesh

Traefik Mesh - Simpler Service Mesh
https://traefik.io/traefik-mesh
Apache License 2.0
2.02k stars 141 forks source link

ACL examples YAML error #778

Closed yekangming closed 3 years ago

yekangming commented 3 years ago

Bug Report

For the official document, but there was an unexpected error. The error was caused by the wrong information configured by yaml. Port should be a number instead of a string.

What did you do?

kind: TrafficTarget
apiVersion: access.smi-spec.io/v1alpha2
metadata:
  name: whatever
  namespace: whoami
spec:
  destination:
    kind: ServiceAccount
    name: whoami-server
    namespace: whoami
    port: "80"
  rules:
    - kind: HTTPRouteGroup
      name: http-everything
      matches:
        - everything
  sources:
    - kind: ServiceAccount
      name: whoami-client
      namespace: whoami

Output of controller log: (What version of Traefik Mesh are you using?)

The TrafficTarget "whatever" is invalid: spec.destination.port: Invalid value: "string": spec.destination.port in body must be of type number: "string"

What is your environment & configuration (arguments, provider, platform, ...)?

https://doc.traefik.io/traefik-mesh/examples/#acl-example

yekangming commented 3 years ago

Correct

kind: TrafficTarget
apiVersion: access.smi-spec.io/v1alpha2
metadata:
  name: whatever
  namespace: whoami
spec:
  destination:
    kind: ServiceAccount
    name: whoami-server
    namespace: whoami
    port: 80
  rules:
    - kind: HTTPRouteGroup
      name: http-everything
      matches:
        - everything
  sources:
    - kind: ServiceAccount
      name: whoami-client
      namespace: whoami
traefiker commented 3 years ago

Closed by #780.