mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Don't start node controller if coredns is not deployed
This commit is contained in:
parent
3ff64baab8
commit
bf57a7f419
@ -27,6 +27,7 @@ import (
|
|||||||
v1 "github.com/rancher/wrangler-api/pkg/generated/controllers/core/v1"
|
v1 "github.com/rancher/wrangler-api/pkg/generated/controllers/core/v1"
|
||||||
"github.com/rancher/wrangler/pkg/leader"
|
"github.com/rancher/wrangler/pkg/leader"
|
||||||
"github.com/rancher/wrangler/pkg/resolvehome"
|
"github.com/rancher/wrangler/pkg/resolvehome"
|
||||||
|
"github.com/rancher/wrangler/pkg/slice"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/apimachinery/pkg/util/net"
|
"k8s.io/apimachinery/pkg/util/net"
|
||||||
@ -126,9 +127,11 @@ func startWrangler(ctx context.Context, config *Config) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func masterControllers(ctx context.Context, sc *Context, config *Config) error {
|
func masterControllers(ctx context.Context, sc *Context, config *Config) error {
|
||||||
|
if !slice.ContainsString(config.ControlConfig.Skips, "coredns") {
|
||||||
if err := node.Register(ctx, sc.Core.Core().V1().ConfigMap(), sc.Core.Core().V1().Node()); err != nil {
|
if err := node.Register(ctx, sc.Core.Core().V1().ConfigMap(), sc.Core.Core().V1().Node()); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
helm.Register(ctx, sc.Apply,
|
helm.Register(ctx, sc.Apply,
|
||||||
sc.Helm.Helm().V1().HelmChart(),
|
sc.Helm.Helm().V1().HelmChart(),
|
||||||
|
Loading…
Reference in New Issue
Block a user