Skip to content

Commit

Permalink
Add build tag to disable cri-dockerd
Browse files Browse the repository at this point in the history
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
  • Loading branch information
brandond committed Jan 26, 2023
1 parent f10af36 commit 89f7062
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/agent/cridockerd/config_linux.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build linux
// +build linux
//go:build linux && !no_cri_dockerd
// +build linux,!no_cri_dockerd

package cridockerd

Expand Down
4 changes: 2 additions & 2 deletions pkg/agent/cridockerd/config_windows.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build windows
// +build windows
//go:build windows && !no_cri_dockerd
// +build windows,!no_cri_dockerd

package cridockerd

Expand Down
3 changes: 3 additions & 0 deletions pkg/agent/cridockerd/cridockerd.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build !no_cri_dockerd
// +build !no_cri_dockerd

package cridockerd

import (
Expand Down
15 changes: 15 additions & 0 deletions pkg/agent/cridockerd/nocridockerd.go
Original file line number Diff line number Diff line change
@@ -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")
}

0 comments on commit 89f7062

Please sign in to comment.