/
types.go
64 lines (56 loc) · 1.62 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package probe
import (
tp "github.com/kubearmor/KubeArmor/KubeArmor/types"
)
// Options provides probe daemonset options install
type Options struct {
Namespace string
Full bool
Output string
GRPC string
}
// KubeArmorProbeData structure definition
type KubeArmorProbeData struct {
OSImage string
KernelVersion string
KubeletVersion string
ContainerRuntime string
ActiveLSM string
KernelHeaderPresent bool
HostSecurity bool
ContainerSecurity bool
ContainerDefaultPosture tp.DefaultPosture
HostDefaultPosture tp.DefaultPosture
HostVisibility string
}
// Status data
type Status struct {
Desired string `json:"desired"`
Ready string `json:"ready"`
Available string `json:"available"`
}
// KubeArmorPodSpec structure definition
type KubeArmorPodSpec struct {
Running string `json:"running"`
Image_Version string `json:"image_version"`
}
// NamespaceData structure definition
type NamespaceData struct {
NsPostureString string `json:"-"`
NsVisibilityString string `json:"-"`
NsDefaultPosture tp.DefaultPosture `json:"default_posture"`
NsVisibility Visibility `json:"visibility"`
NsPodList []PodInfo `json:"pod_list"`
}
// Visibility data structure definition
type Visibility struct {
File bool `json:"file"`
Capabilities bool `json:"capabilities"`
Process bool `json:"process"`
Network bool `json:"network"`
}
// PodInfo structure definition
type PodInfo struct {
PodName string `json:"pod_name"`
Policy string `json:"policy"`
}