服务结构中的Traefik无法获得healtcheck标签

时间:2019-03-29 03:47:12

标签: traefik

我有一个无状态服务,它为Traefik运行状况检查声明了labesl,但是在Traefik仪表板中我看不到标签,并且healtchek没有针对该服务运行。

我尝试将Traefik版本从1.7.6更改为1.7.9,并重新排列标签以查看是否有运气的情况。

服务配置如下:

<ServiceTypes>
    <!-- This is the name of your ServiceType.
         The UseImplicitHost attribute indicates this is a guest service. -->
    <StatelessServiceType ServiceTypeName="MyServiceType" UseImplicitHost="true">
      <Extensions>
        <Extension Name="Traefik">
          <Labels xmlns="http://schemas.microsoft.com/2015/03/fabact-no-schema">
            <Label Key="traefik.enable">true</Label>
            <Label Key="traefik.frontend.rule">Host:foobar.com</Label>
            <Label key="traefik.backend.healthcheck.interval">1s</Label>
            <Label key="traefik.backend.healthcheck.path">/healthpath</Label>
            <Label key="traefik.backend.healthcheck.hostname">foobar.com</Label>
          </Labels>
        </Extension>
      </Extensions>
    </StatelessServiceType>
  </ServiceTypes>

Traefik toml文件包括以下内容:

# Enable custom health check options.
[healthcheck]

# Set the default health check interval.
#
# Optional
# Default: "30s"
#
interval = "30s"

我希望看到标签被拾取并显示在仪表板中,并且服务在指定路径上接收流量

0 个答案:

没有答案