core

package module
v0.0.0-...-54a4afe Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2023 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StopChan chan struct{}

StopChan Channel

Functions

func Find

func Find(slice []uint16, val uint16) (int, bool)

func GetOSSigChannel

func GetOSSigChannel() chan os.Signal

GetOSSigChannel Function

func KVMSDaemon

func KVMSDaemon(portPtr int)

KVMSDaemon Function

Types

type ClientConn

type ClientConn struct {
}

ClientConn is the wrapper for a grpc client conn

type K8sHandler

type K8sHandler struct {
	K8sClient   *kubernetes.Clientset
	HTTPClient  *http.Client
	WatchClient *http.Client

	K8sToken string
	K8sHost  string
	K8sPort  string
}

K8sHandler Structure

var K8s *K8sHandler

K8s Handler

func NewK8sHandler

func NewK8sHandler() *K8sHandler

NewK8sHandler Function

func (*K8sHandler) CheckCustomResourceDefinition

func (kh *K8sHandler) CheckCustomResourceDefinition(resourceName string) bool

CheckCustomResourceDefinition Function

func (*K8sHandler) DoRequest

func (kh *K8sHandler) DoRequest(cmd string, data interface{}, path string) ([]byte, error)

DoRequest Function

func (*K8sHandler) InitInclusterAPIClient

func (kh *K8sHandler) InitInclusterAPIClient() bool

InitInclusterAPIClient Function

func (*K8sHandler) InitK8sClient

func (kh *K8sHandler) InitK8sClient() bool

InitK8sClient Function

func (*K8sHandler) InitLocalAPIClient

func (kh *K8sHandler) InitLocalAPIClient() bool

InitLocalAPIClient Function

func (*K8sHandler) WatchK8sHostSecurityPolicies

func (kh *K8sHandler) WatchK8sHostSecurityPolicies() *http.Response

WatchK8sHostSecurityPolicies Function

type KVMS

type KVMS struct {
	EtcdClient *etcd.EtcdClient
	Server     *ks.Server

	LogPath   string
	LogFilter string

	IdentityConnPool []ClientConn

	MapEtcdEWIdentityLabels map[string]string
	EtcdEWLabels            []string

	// Host Security policies
	HostSecurityPolicies     []tp.HostSecurityPolicy
	HostSecurityPoliciesLock *sync.RWMutex

	// External workload policies and mappers
	ExternalWorkloadSecurityPolicies     []tp.ExternalWorkloadSecurityPolicy
	ExternalWorkloadSecurityPoliciesLock *sync.RWMutex

	MapIdentityToLabel              map[uint16]string
	MapLabelToIdentities            map[string][]uint16
	MapExternalWorkloadConnIdentity map[uint16]ClientConn

	ClusterPort      uint16
	ClusteripAddress string
	PodIpAddress     string

	// WgDaemon Handler
	WgDaemon sync.WaitGroup
	// contains filtered or unexported fields
}

KVMS Structure

func NewKVMSDaemon

func NewKVMSDaemon(port int, ipAddress string) *KVMS

NewKVMSDaemon Function

func (*KVMS) DestroyKVMS

func (dm *KVMS) DestroyKVMS()

DestroyKVMS Function

func (*KVMS) GetAllEtcdEWLabels

func (dm *KVMS) GetAllEtcdEWLabels()

func (*KVMS) GetIdentityFromLabelPool

func (dm *KVMS) GetIdentityFromLabelPool(label string) []uint16

func (*KVMS) PassOverToKVMSAgent

func (dm *KVMS) PassOverToKVMSAgent(event tp.K8sKubeArmorHostPolicyEvent, identities []uint16)

func (*KVMS) UpdateHostSecurityPolicies

func (dm *KVMS) UpdateHostSecurityPolicies(event tp.K8sKubeArmorHostPolicyEvent)

================================= // == Host Security Policy Update == // ================================= // UpdateHostSecurityPolicies Function

func (*KVMS) WatchHostSecurityPolicies

func (dm *KVMS) WatchHostSecurityPolicies()

WatchHostSecurityPolicies Function

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL