From e3cc516bcf37fb73b2c81610b74edfb728f3ac41 Mon Sep 17 00:00:00 2001 From: Doug Rabson Date: Thu, 27 Jul 2023 16:41:34 +0100 Subject: [PATCH] override path defaults for FreeBSD Sockets should go in /var/run and config files for non-base software in /usr/local/etc. Signed-off-by: Doug Rabson --- cmd/crictl/main_freebsd.go | 30 ++++++++++++++++++++++++++++++ cmd/crictl/main_unix.go | 4 ++-- 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 cmd/crictl/main_freebsd.go diff --git a/cmd/crictl/main_freebsd.go b/cmd/crictl/main_freebsd.go new file mode 100644 index 0000000000..95a8486f08 --- /dev/null +++ b/cmd/crictl/main_freebsd.go @@ -0,0 +1,30 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package main + +import ( + "os" + "syscall" +) + +const ( + defaultConfigPath = "/usr/local/etc/crictl.yaml" +) + +var defaultRuntimeEndpoints = []string{"unix:///var/run/dockershim.sock", "unix:///var/run/containerd/containerd.sock", "unix:///var/run/crio/crio.sock", "unix:///var/run/cri-dockerd.sock"} + +var shutdownSignals = []os.Signal{os.Interrupt, syscall.SIGTERM} diff --git a/cmd/crictl/main_unix.go b/cmd/crictl/main_unix.go index 6a7ecbfa85..b3ecfc7184 100644 --- a/cmd/crictl/main_unix.go +++ b/cmd/crictl/main_unix.go @@ -1,5 +1,5 @@ -//go:build !windows -// +build !windows +//go:build !windows && !freebsd +// +build !windows,!freebsd /* Copyright 2017 The Kubernetes Authors.