fix: ensure critical addons come up when the node is tainted
Rather than taint on `node-role.kubernetes.io/master=true:NoSchedule`, we check for `CriticalAddonsOnly=true:NoSchedule` and taint on that.
This commit is contained in:
1 parent
b64c3a1859
commit
2619c3db08
11 files changed
+400
-86
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package scheduler_k3s
|
||||
|
||||
import (
|
||||
"embed"
|
||||
"sync"
|
||||
|
||||
traefikv1alpha1 "github.com/traefik/traefik/v2/pkg/provider/kubernetes/crd/traefikio/v1alpha1"
|
||||
@@ -49,24 +50,70 @@ type Manifest struct {
|
||||
Path string
|
||||
}
|
||||
|
||||
var Manifests = []Manifest{
|
||||
{
|
||||
Name: "longhorn",
|
||||
Version: "1.5.3",
|
||||
Path: "https://raw.githubusercontent.com/longhorn/longhorn/v1.5.3/deploy/longhorn.yaml",
|
||||
},
|
||||
var KubernetesManifests = []Manifest{
|
||||
{
|
||||
Name: "system-upgrader",
|
||||
Version: "0.13.2",
|
||||
Path: "https://github.com/rancher/system-upgrade-controller/releases/v0.13.2/download/system-upgrade-controller.yaml",
|
||||
},
|
||||
{
|
||||
Name: "cert-manager",
|
||||
Version: "v1.13.3",
|
||||
Path: "https://github.com/cert-manager/cert-manager/releases/download/v1.13.3/cert-manager.yaml",
|
||||
Path: "https://github.com/rancher/system-upgrade-controller/releases/download/v0.13.2/system-upgrade-controller.yaml",
|
||||
},
|
||||
}
|
||||
|
||||
type HelmChart struct {
|
||||
ReleaseName string
|
||||
ChartPath string
|
||||
Namespace string
|
||||
CreateNamespace bool
|
||||
Version string
|
||||
Path string
|
||||
RepoURL string
|
||||
}
|
||||
|
||||
var HelmCharts = []HelmChart{
|
||||
{
|
||||
ChartPath: "cert-manager",
|
||||
CreateNamespace: true,
|
||||
Namespace: "cert-manager",
|
||||
ReleaseName: "cert-manager",
|
||||
RepoURL: "https://charts.jetstack.io",
|
||||
Version: "v1.13.3",
|
||||
},
|
||||
{
|
||||
ChartPath: "longhorn",
|
||||
CreateNamespace: true,
|
||||
Namespace: "longhorn-system",
|
||||
ReleaseName: "longhorn",
|
||||
RepoURL: "https://charts.longhorn.io",
|
||||
Version: "1.5.3",
|
||||
},
|
||||
}
|
||||
|
||||
type HelmRepository struct {
|
||||
Name string
|
||||
URL string
|
||||
}
|
||||
|
||||
var HelmRepositories = []HelmRepository{
|
||||
{
|
||||
Name: "jetstack",
|
||||
URL: "https://charts.jetstack.io",
|
||||
},
|
||||
{
|
||||
Name: "longhorn",
|
||||
URL: "https://charts.longhorn.io",
|
||||
},
|
||||
}
|
||||
|
||||
var ServerLabels = map[string]string{
|
||||
"svccontroller.k3s.cattle.io/enablelb": "true",
|
||||
}
|
||||
|
||||
var WorkerLabels = map[string]string{
|
||||
"node-role.kubernetes.io/role": "worker",
|
||||
}
|
||||
|
||||
//go:embed templates/*
|
||||
var templates embed.FS
|
||||
|
||||
func init() {
|
||||
k8sNativeSchemeOnce.Do(func() {
|
||||
_ = appsv1.AddToScheme(runtimeScheme)
|
||||
|
||||
Reference in new issue
Block a user