Browse Source

Add build tag to disable cri-dockerd

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
pull/6726/head
Brad Davidson 2 years ago committed by Brad Davidson
parent
commit
89f7062431
  1. 4
      pkg/agent/cridockerd/config_linux.go
  2. 4
      pkg/agent/cridockerd/config_windows.go
  3. 3
      pkg/agent/cridockerd/cridockerd.go
  4. 15
      pkg/agent/cridockerd/nocridockerd.go

4
pkg/agent/cridockerd/config_linux.go

@ -1,5 +1,5 @@
//go:build linux
// +build linux
//go:build linux && !no_cri_dockerd
// +build linux,!no_cri_dockerd
package cridockerd

4
pkg/agent/cridockerd/config_windows.go

@ -1,5 +1,5 @@
//go:build windows
// +build windows
//go:build windows && !no_cri_dockerd
// +build windows,!no_cri_dockerd
package cridockerd

3
pkg/agent/cridockerd/cridockerd.go

@ -1,3 +1,6 @@
//go:build !no_cri_dockerd
// +build !no_cri_dockerd
package cridockerd
import (

15
pkg/agent/cridockerd/nocridockerd.go

@ -0,0 +1,15 @@
//go:build no_cri_dockerd
// +build no_cri_dockerd
package cridockerd
import (
"context"
"errors"
"github.com/k3s-io/k3s/pkg/daemons/config"
)
func Run(ctx context.Context, cfg *config.Node) error {
return errors.New("cri-dockerd disabled at build time")
}
Loading…
Cancel
Save