refactor: install traefik via helm chart directly to avoid issues where traefik silently fails installation

This commit is contained in:
Jose Diaz-Gonzalez
2024-01-24 03:58:39 -05:00
parent e164f8393a
commit ea55db2747
4 changed files with 40 additions and 27 deletions

View File

@@ -151,6 +151,8 @@ func CommandInitialize(serverIP string, taintScheduling bool) error {
"--cluster-init",
// disable local-storage
"--disable", "local-storage",
// disable traefik so it can be installed separately
"--disable", "traefik",
// expose etcd metrics
"--etcd-expose-metrics",
// use wireguard for flannel
@@ -239,17 +241,6 @@ func CommandInitialize(serverIP string, taintScheduling bool) error {
}
}
common.LogInfo2Quiet("Updating traefik config")
contents, err := templates.ReadFile("templates/helm-config/traefik-config.yaml")
if err != nil {
return fmt.Errorf("Unable to read traefik config template: %w", err)
}
err = os.WriteFile("/var/lib/rancher/k3s/server/manifests/traefik-custom.yaml", contents, 0600)
if err != nil {
return fmt.Errorf("Unable to write traefik config: %w", err)
}
common.LogInfo2Quiet("Installing helm charts")
err = installHelmCharts(ctx, clientset)
if err != nil {