k3s-io / k3s

Lightweight Kubernetes
https://k3s.io
Apache License 2.0
26.82k stars 2.26k forks source link

Disable Traefik v1 handling #9289

Closed brandond closed 2 days ago

brandond commented 4 months ago

We have been packaging Traefik v2 since k3s v1.21, but we still have logic embedded to check for v1 and skip deploying v2 if it is found.

This same logic also runs on RKE2, causing some confusing log messages on server startup:

Jan 24 14:03:47 zerk422 rke2[1361]: time="2024-01-24T14:03:47Z" level=info msg="Pod for etcd is synced"
Jan 24 14:03:47 zerk422 rke2[1361]: time="2024-01-24T14:03:47Z" level=info msg="Pod for kube-apiserver is synced"
Jan 24 14:03:47 zerk422 rke2[1361]: time="2024-01-24T14:03:47Z" level=info msg="ETCD server is now running"
Jan 24 14:03:47 zerk422 rke2[1361]: time="2024-01-24T14:03:47Z" level=info msg="rke2 is up and running"
Jan 24 14:03:47 zerk422 systemd[1]: Started Rancher Kubernetes Engine v2 (server).
Jan 24 14:03:47 zerk422 rke2[1361]: time="2024-01-24T14:03:47Z" level=info msg="Failed to get existing traefik HelmChart" error="helmcharts.helm.cattle.io \"traefik\" not found"

We should disable the legacy v1 detection for K3s v1.30.0.

Ref:

brandond commented 3 weeks ago

No backports; this should be for 1.30+ only.

VestigeJ commented 2 days ago

Reproduced using VERSION=v1.30.1+k3s1 Validated using COMMIT=cff6f7aa1d7987a658b030b2bc69df7c25f515c8

In this case the validation is just the absence of the error from v1 checking so there isn't anything to show other than state that the error does not occur.

journalctl logs on existing releases show the error

Jun 11 22:35:42 ip-1-1-3-25 k3s[2779]: time="2024-06-11T22:35:42Z" level=info msg="Failed to get existing traefik HelmChart" error="helmcharts.helm.cattle.io \"traefik\" not found"

$ kgn

NAME              STATUS   ROLES                       AGE   VERSION
ip-1-1-1-44       Ready    control-plane,etcd,master   18m   v1.30.1+k3s-cff6f7aa