sysdig

package module
v0.0.0-...-6d46272 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: Apache-2.0 Imports: 16 Imported by: 1

README

How we added/built stand-alone tests for Sysdig

  • git clone
  • mkdir/falco
  • cd falco/
  • go mod init github.com/aws/aws-k8s-tester/k8s-tester/Sysdig
  • Create a file to implement the Tester Interface. touch tester.go
  • copy a vend file from another package cp ../vend.sh .
  • Write tests
  • run ./vend.sh
  • run go mod tidy -v

Test/Run singe test stand-alone

go run cmd/k8s-tester-sysdig/main.go apply \
    --kubectl-path="/usr/local/bin/kubectl" \
    --kubeconfig-path="/Path/to/kubeconfig" \
    --access-key="1234567890" \
    --collector-endpoint="us2.app.sysdig.com" \
    --log-outputs="sysdig.log"

## Delete
go run cmd/k8s-tester-sysdig/main.go delete \
    --kubectl-path="/usr/local/bin/kubectl" \
    --kubeconfig-path="/Path/to/kubeconfig" \
    --access-key="1234567890" \
    --collector-endpoint="us2.app.sysdig.com" \
    --log-outputs="sysdig.log"

For EKS-A Clusters

Since Sysdig images use an S3 backed Quay repository, you must make sure to disable Internal S3 endpoints for Vsphere clusters launched in AWS VPC's.

Documentation

Overview

package sysdig installs Sysdig agent. ref. https://sysdig.org

Index

Constants

View Source
const (
	DefaultMinimumNodes     int = 1
	DefaultHelmChartRepoURL     = "https://github.com/sysdiglabs/charts/releases/download/sysdig-1.12.9/sysdig-1.12.9.tgz"
)

Variables

This section is empty.

Functions

func Env

func Env() string

func New

func New(cfg *Config) k8s_tester.Tester

Types

type Config

type Config struct {
	Enable bool `json:"enable"`
	Prompt bool `json:"-"`

	Stopc     chan struct{} `json:"-"`
	Logger    *zap.Logger   `json:"-"`
	LogWriter io.Writer     `json:"-"`
	Client    client.Client `json:"-"`

	// MinimumNodes is the minimum number of Kubernetes nodes required for installing this addon.
	MinimumNodes int `json:"minimum_nodes"`
	// HelmChartRepoURL is the helm chart repo URL.
	HelmChartRepoURL string `json:"helm_chart_repo_url"`
	// Namespace to create test resources.
	Namespace string `json:"namespace"`
	// Sysdig access key for the sysdig agent
	AccessKey string `json:"access_key"`
	// Collector Endpoint is the url for your specfic sysdig collector to be pointed at
	CollectorEndpoint string `json:"collector_endpoint"`
}

func NewDefault

func NewDefault() *Config

func (*Config) ValidateAndSetDefaults

func (cfg *Config) ValidateAndSetDefaults() error

Directories

Path Synopsis
cmd
k8s-tester-sysdig
k8s-tester-sysdig installs Sysdig agent using helm, and tests that it's able to function correctly.
k8s-tester-sysdig installs Sysdig agent using helm, and tests that it's able to function correctly.

Jump to

Keyboard shortcuts

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