vm

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 25 Imported by: 1

Documentation

Overview

Package vm contains interfaces to setup or communicate with KubeArmor running in either systemd mode or with KVM Service

Index

Constants

View Source
const (
	// KubeArmorPolicy is the Kind used for KubeArmor container policies
	KubeArmorPolicy = "KubeArmorPolicy"
	// KubeArmorHostPolicy is the Kind used for KubeArmor host policies
	KubeArmorHostPolicy = "KubeArmorHostPolicy"
	// CiliumNetworkPolicy is the Kind used for Cilium network policies
	CiliumNetworkPolicy = "CiliumNetworkPolicy"
	// CiliumClusterwideNetworkPolicy is the Kind used for Cilium network policies
	CiliumClusterwideNetworkPolicy = "CiliumClusterwideNetworkPolicy"
)

Variables

This section is empty.

Functions

func GetScript

func GetScript(c *k8s.Client, options ScriptOptions, httpIP string, isNonK8sEnv bool) error

GetScript - Function to handle script download for vm option

func LabelHandling added in v0.6.4

func LabelHandling(t string, o LabelOptions, address string, isKvmsEnv bool) error

LabelHandling Function recives path to YAML file with the type of event and HTTP Server

func List added in v0.6.4

func List(address string) error

List - Lists all configured VMs

func Onboarding added in v0.6.4

func Onboarding(eventType string, path string, address string) error

Onboarding - onboards a vm

func PolicyHandling

func PolicyHandling(t string, path string, o PolicyOptions, httpAddress string, isKvmsEnv bool) error

PolicyHandling Function recives path to YAML file with the type of event and emits an Host Policy Event to KubeArmor gRPC/HTTP Server

Types

type KubeArmorVirtualMachineLabel added in v0.6.4

type KubeArmorVirtualMachineLabel struct {
	Type   string              `json:"type"`
	Name   string              `json:"name"`
	Labels []map[string]string `json:"labels,omitempty"`
}

KubeArmorVirtualMachineLabel - Label struct for KVMS control plane

type LabelOptions added in v0.6.4

type LabelOptions struct {
	VMName   string
	VMLabels string
}

LabelOptions are optional configuration for kArmor vm policy

type NetworkPolicyRequest added in v0.6.4

type NetworkPolicyRequest struct {
	Type   string                 `json:"type"`
	Object v2.CiliumNetworkPolicy `json:"object"`
}

NetworkPolicyRequest is the request type used for sending the Cilium network policy to KVM service

type PolicyOptions

type PolicyOptions struct {
	GRPC string
}

PolicyOptions are optional configuration for kArmor vm policy

type ScriptOptions

type ScriptOptions struct {
	Port   string
	VMName string
	File   string
}

ScriptOptions for karmor vm getscript

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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