traefik-helm-chart icon indicating copy to clipboard operation
traefik-helm-chart copied to clipboard

Failed to deploy traefik using rancher fleet

Open aDisplayName opened this issue 3 years ago • 1 comments

Welcome!

  • [X] Yes, I've searched similar issues on GitHub and didn't find any.
  • [X] Yes, I've searched similar issues on the Traefik community forum and didn't find any.

What version of the Traefik's Helm Chart are you using?

10.24.0

What version of Traefik are you using?

2.8.0

What did you do?

We are using rancher (2.6.3) fleet (0.3.8) to deploy traefik into k3s clusters not previous deployed with traefik. The first deployment by fleet always fails for every cluster.

If we manually delete the failed traefik release, the subsequent deployment of traefik by fleet will success.

Here is the fleet configuration we are using:

# For full list of the sample fleet.yaml, please refer to https://github.com/rancher/fleet/blob/master/docs/gitrepo-structure.md


# The default namespace to be applied to resources. This field is not used to
# enforce or lock down the deployment to a specific namespace, but instead
# provide the default value of the namespace field if one is not specified
# in the manifests.
# Default: default
defaultNamespace: kube-system

helm:
  # Use a custom location for the Helm chart. This can refer to any go-getter URL.
  # This allows one to download charts from most any location.  Also know that
  # go-getter URL supports adding a digest to validate the download. If repo
  # is set below this field is the name of the chart to lookup
  chart: traefik

  # A https URL to a Helm repo to download the chart from. It's typically easier
  # to just use `chart` field and refer to a tgz file.  If repo is used the
  # value of `chart` will be used as the chart name to lookup in the Helm repository.
  repo: https://helm.traefik.io/traefik

  # The version of the chart or semver constraint of the chart to find. If a constraint
  # is specified it is evaluated each time git changes.
  version: 10.24.0

  values:
    # Use nodeport for traefik routing access. Default config with LoadBalancer would not work correctly
    # On a cluster wihtout LoadBalancer component.
    service:
      type: NodePort
    ports:
      web:
        nodePort: 80
      websecure:
        nodePort: 443
      # To access dashboard, portfoward 9000, then go to http://<IP>:9000/dashboard/
      # Otherwise, enable the following nodeport
      # # traefik:
      # #  nodePort: 9000
      # #  expose: t

What did you see instead?

Everytime, the first deploy by fleet will fail with the following message:

Release "traefik" failed: failed post-install: unable to build kubernetes object for deleting hook traefik/templates/dashboard-hook-ingressroute.yaml: unable to recognize "": no matches for kind "IngressRoute" in version "traefik.containo.us/v1alpha1"

What is your environment & configuration?

Rancher Server 2.6.3 Fleet: 0.3.8 K3s cluster engine: 1.20.6+k3s1, 1.21.14

Additional Information

No response

aDisplayName avatar Aug 16 '22 20:08 aDisplayName

Did you disabled traefik on your k3s before trying to install with fleet ?

mloiseleur avatar Sep 28 '22 13:09 mloiseleur

@mloiseleur , We have disabled both traefik and servicelb during the deployment of k3s:

--no-deploy=traefik,servicelb

After we moved to rancher 2.6.8, it seems the problem disappeared. We will monitor the status, and reopen it if we can reproduce the problem again.

aDisplayName avatar Oct 25 '22 15:10 aDisplayName