Skip to content

Commit a04c84a

Browse files
ExceptionalHandlerjrfastab
authored andcommitted
tetragon/windows: Add default definitions for Windows
Moved over defaults.go to defaults_linux.go Added defaults_windows.go to add set of default paths and names for Windows. Some default definitions are stubbed out for compilation. Signed-off-by: Anadi Anadi <[email protected]>
1 parent f17e2e4 commit a04c84a

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

pkg/defaults/defaults.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// SPDX-License-Identifier: Apache-2.0
22
// Copyright Authors of Cilium
33

4+
//go:build !windows
5+
46
package defaults
57

68
import "time"

pkg/defaults/defaults_windows.go

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
// Copyright Authors of Cilium
3+
4+
package defaults
5+
6+
import "time"
7+
8+
const (
9+
// DefaultMapRoot is the default path where BPFFS should be mounted
10+
DefaultMapRoot = `C:\Program Files\ebpf-for-windows`
11+
12+
// DefaultMapPrefix is the default path prefix where Tetragon maps should be pinned
13+
DefaultMapPrefix = "tetragon"
14+
15+
// DefaultEventMap is the default name of the Event map
16+
DefaultEventMap = "tcpmon"
17+
18+
// DefaultMapRootFallback is the path which is used when /sys/fs/bpf has
19+
// a mount, but with the other filesystem than BPFFS.
20+
DefaultMapRootFallback = `C:\Program Files\Tetragon\bpffs`
21+
22+
// DefaultRunDir is the default run directory for runtime
23+
DefaultRunDir = `C:\Program Files\Tetragon\`
24+
25+
// Default Path to where cgroup2 is mounted (Prefix with /run)
26+
Cgroup2Dir = ""
27+
28+
// Default location for BPF programs and BTF files
29+
DefaultTetragonLib = `C:\Program Files\Tetragon\BPF`
30+
31+
// InitInfoFile is the file location for the info file.
32+
// After initialization, InitInfoFile will contain a json representation of InitInfo
33+
// Used by both client cli to guess unix socket address and by bugtool
34+
InitInfoFile = DefaultRunDir + "tetragon-info.json"
35+
36+
// Default directory from where to load tracing policies.
37+
DefaultTpDir = DefaultRunDir + "tetragon.tp.d"
38+
39+
// Default secure export logs permissions
40+
DefaultLogsPermission = "600"
41+
42+
// Pid file where to write tetragon main PID
43+
DefaultPidFile = DefaultRunDir + "tetragon.pid"
44+
45+
// defaults for the event cache
46+
DefaultEventCacheNumRetries = 15
47+
DefaultEventCacheRetryDelay = 2
48+
49+
// defaults for the process cache
50+
DefaultProcessCacheGCInterval = 30 * time.Second
51+
)

0 commit comments

Comments
 (0)