techno-tim / k3s-ansible

The easiest way to bootstrap a self-hosted High Availability Kubernetes cluster. A fully automated HA k3s etcd install with kube-vip, MetalLB, and more. Build. Destroy. Repeat.
https://technotim.live/posts/k3s-etcd-ansible/
Apache License 2.0
2.41k stars 1.05k forks source link

Replaced manifest files with double extention to '-' #41

Closed SwaggaRitz closed 2 years ago

SwaggaRitz commented 2 years ago

Proposed Changes

I found on v1.24.2+k3s2 any manifest files that had a double extension foo.bar.yaml would not get picked up. I was alerted to this by Kube-VIP not starting due to a missing service account and role binding. Changing the '.' to '-' fixed the issue. I have also run this on the previous K3s to ensure it still works.

Checklist

SketchCND commented 2 years ago

Thanks - this fix worked for me after I experienced the same issue when setting k3s to v1.24.2+k3s2.

tzago commented 2 years ago

Cool, yes I got to the same conclusion as part of my second takeaway "k3s Auto Deploy on boot directory is /var/lib/rancher/k3s/server/manifests whtever yaml we throw here will be deployed. There is one caveat though, filenames can't contain dots before the dotted yaml file extension. example."

I also created a fix for the token that somehow for the newest releases of k3s the manual entry on the group_vars/all.yaml wasn't working. This new version doesn't require token at all it's all dynamic.

Let me know if you want me to send a PR here.

Thanks!

timothystewart6 commented 2 years ago

Thank you so much! Good find!