mirror of https://github.com/k3s-io/k3s
fix formatting
parent
2346ccc63f
commit
c2db115ec3
|
@ -1,15 +1,15 @@
|
||||||
// +build !windows
|
// +build !windows
|
||||||
|
|
||||||
package containerd
|
package containerd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"syscall"
|
"syscall"
|
||||||
)
|
)
|
||||||
|
|
||||||
func addDeathSig(cmd *exec.Cmd) {
|
func addDeathSig(cmd *exec.Cmd) {
|
||||||
// not supported in this OS
|
// not supported in this OS
|
||||||
cmd.SysProcAttr = &syscall.SysProcAttr{
|
cmd.SysProcAttr = &syscall.SysProcAttr{
|
||||||
Pdeathsig: syscall.SIGKILL,
|
Pdeathsig: syscall.SIGKILL,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package containerd
|
package containerd
|
||||||
|
|
||||||
import "os/exec"
|
import "os/exec"
|
||||||
|
|
||||||
func addDeathSig(_ *exec.Cmd) {
|
func addDeathSig(_ *exec.Cmd) {
|
||||||
// not supported in this OS
|
// not supported in this OS
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package netpol
|
package netpol
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
daemonconfig "github.com/rancher/k3s/pkg/daemons/config"
|
daemonconfig "github.com/rancher/k3s/pkg/daemons/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Run(ctx context.Context, nodeConfig *daemonconfig.Node) error{
|
func Run(ctx context.Context, nodeConfig *daemonconfig.Node) error {
|
||||||
panic("Netpol is not supported on windows ensure to pass --disable-network-policy")
|
panic("Netpol is not supported on windows ensure to pass --disable-network-policy")
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
package syssetup
|
package syssetup
|
||||||
|
|
||||||
func Configure() {}
|
func Configure() {}
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
package rootless
|
package rootless
|
||||||
|
|
||||||
import (
|
func Rootless(stateDir string) error {
|
||||||
)
|
panic("Rootless not supported on windows")
|
||||||
|
}
|
||||||
|
|
||||||
func Rootless(stateDir string) error {
|
|
||||||
panic("Rootless not supported on windows")
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package rootlessports
|
package rootlessports
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
coreClients "github.com/rancher/wrangler-api/pkg/generated/controllers/core/v1"
|
coreClients "github.com/rancher/wrangler-api/pkg/generated/controllers/core/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Register(ctx context.Context, serviceController coreClients.ServiceController, httpsPort int) error {
|
func Register(ctx context.Context, serviceController coreClients.ServiceController, httpsPort int) error {
|
||||||
panic("Rootless is not supported on windows")
|
panic("Rootless is not supported on windows")
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
// +build !windows
|
// +build !windows
|
||||||
|
|
||||||
package util
|
package util
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
func SetFileModeForPath(name string, mode os.FileMode) error {
|
func SetFileModeForPath(name string, mode os.FileMode) error {
|
||||||
return os.Chmod(name, mode)
|
return os.Chmod(name, mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
func SetFileModeForFile(file *os.File, mode os.FileMode) error {
|
func SetFileModeForFile(file *os.File, mode os.FileMode) error {
|
||||||
return file.Chmod(mode)
|
return file.Chmod(mode)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
package util
|
package util
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
func SetFileModeForPath(name string, mode os.FileMode) error {
|
func SetFileModeForPath(name string, mode os.FileMode) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func SetFileModeForFile(file *os.File, mode os.FileMode) error {
|
func SetFileModeForFile(file *os.File, mode os.FileMode) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue