fluxcd/flagger

Flagger-managed `TraefikService` resources use the deprecated traefik.containo.us Kubernetes API group

vytautaskubilius opened this issue · 5 comments

Describe the bug

The TraefikService resources that Flagger creates use the traefik.containo.us Kubernetes API group that has been deprecated in Traefik v3.

To Reproduce

  1. Create a Flagger Canary resource that uses the traefik provider.
  2. Upgrade Traefik to v3.
  3. Observe the following errors in Traefik logs:
ERR error="the service \"default-podinfo-canary@kubernetescrd\" does not exist" entryPointName=web routerName=web-default-podinfo-canary-3dfb9b2aaefc944f017e@kubernetescrd

Looking at the TraefikService manifest that Flagger creates, it uses the traefik.containo.us Kubernetes API group that has been deprecated in the latest Traefik release:

apiVersion: traefik.containo.us/v1alpha1
kind: TraefikService
metadata:
  annotations:
    helm.toolkit.fluxcd.io/driftDetection: disabled
    kustomize.toolkit.fluxcd.io/reconcile: disabled
  creationTimestamp: "2023-10-25T13:18:14Z"
  generation: 60
  name: podinfo-canary
  namespace: default
  ownerReferences:
  - apiVersion: flagger.app/v1beta1
    blockOwnerDeletion: true
    controller: true
    kind: Canary
    name: podinfo-canary
    uid: d8071248-c040-4c39-861d-ac75bd6e6c05
  resourceVersion: "3271693529"
  uid: 6cae73fe-28c4-4c55-8aae-f7c58b65e487
spec:
  weighted:
    services:
    - name: podinfo-canary-primary
      namespace: default
      port: 80
      weight: 100

Expected behavior

Flagger creates TraefikService resources with the new traefik.io Kubernetes API group.

Additional context

  • Flagger version: 1.37.0
  • Kubernetes version: 1.27.11
  • Service Mesh provider: N/A
  • Ingress provider: Traefik

Traefik now supports Gateway API right? Maybe it's time to delete all the Traefik specific APIs from Flagger.

Looks like it does. The docs have a warning about the support being experimental for now, but I'm not sure what implications that would have for Flagger.

Flagger supports Gateway API, you could try it out with Traefik and report back if it works. Thanks

I finally got around to testing it, and it doesn't look like Flagger has good enough support for Gateway API to work with Flagger Canary resources :( I think it's the fact that they don't appear to support weighted routing that results in Traefik failing to run the Gateway with the following errors:

an error occurred while creating gateway status: 1 error occurred:\n\t* Cannot load HTTPRoute service <namespace/service>: subset not found

Hey

Just wanted to find out if we have any update the additional for support of traefik.io apiversion in flagger?