decepto

package
v0.0.0-...-07ef16f Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SuccessSynced is used as part of the Event 'reason' when an AppGraph is synced
	SuccessSynced = "Synced"
	// ErrResourceExists is used as part of the Event 'reason' when an AppGraph fails
	// to sync due to a Deployment of the same name already existing.
	ErrResourceExists = "ErrResourceExists"

	// MessageResourceExists is the message used for Events when a resource
	// fails to sync due to a Deployment already existing
	MessageResourceExists = "Resource %q already exists and is not managed by AppGraph"
	// MessageResourceSynced is the message used for an Event fired when an AppGraph
	// is synced successfully
	MessageResourceSynced = "AppGraph synced successfully"
)

Variables

This section is empty.

Functions

func CreateDecoy

func CreateDecoy(podName, namespace string, clientset kubernetes.Interface, declient versioned.Interface)

func DeleteDecoy

func DeleteDecoy(podName, namespace string, clientset kubernetes.Interface, decoyName string)

func GetAppDecoysMap

func GetAppDecoysMap(a *algorithm.ApplicationDecoy)

func Initialize

func Initialize(kubeconfig string, masterURL string, logLevel string) (kubeclient *kubernetes.Clientset,
	deceptoclient *clientset.Clientset)

Initialize function

func Run

func Run(kubeClient *kubernetes.Clientset,
	deceptoClient *clientset.Clientset,
	namespace string, port string,
	algorithmName string,
	algorithmAddr string,
	algorithmResourceCap string,
	ctx context.Context)

Run function

Types

type Alert

type Alert struct {
	Src       string               `json:"src"`
	Dst       string               `json:"dst"`
	Timestamp string               `json:"timestamp"`
	CapInfo   gopacket.CaptureInfo `json:"capinfo"`
}

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

Controller is the controller implementation for AppGraph resources

func NewController

func NewController(
	ctx context.Context,
	kubeclientset kubernetes.Interface,
	deceptoclientset clientset.Interface,
	deceptoInformer informers.AppGraphInformer) *Controller

NewController returns a new decepto controller

func (*Controller) Run

func (c *Controller) Run(ctx context.Context, workers int) error

Run will set up the event handlers for types we are interested in, as well as syncing informer caches and starting workers. It will block until stopCh is closed, at which point it will shutdown the workqueue and wait for workers to finish processing their current work items.

type Microservice

type Microservice struct {
	Name string `json:"name"`
}

type Sentinel

type Sentinel struct {
	// contains filtered or unexported fields
}

Sentinel is the main non terminating control-loop implementation which manages decepto

func NewSentinel

func NewSentinel(
	kubeclientset kubernetes.Interface,
	deceptoclientset versioned.Interface,
	deceptoInformer informers.AppGraphInformer,
	namespace string,
	port string,
	ctx context.Context) *Sentinel

func (*Sentinel) RegisterAlgoImpl

func (s *Sentinel) RegisterAlgoImpl(algorithmClient algorithm.DecoyAlgorithmClient)

RegisterAlgoImpl registers an algorithm to the controller

func (*Sentinel) Run

func (s *Sentinel) Run(ctx context.Context, delay time.Duration) error

type StrMap

type StrMap map[string]struct{}

func (StrMap) Add

func (m StrMap) Add(k string) *StrMap

func (StrMap) Has

func (m StrMap) Has(k string) bool

Jump to

Keyboard shortcuts

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