kubebench

package
v1.29.3 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

type Check struct {
	ID       string   `yaml:"id" json:"test_number"`
	Text     string   `json:"test_desc"`
	TestInfo []string `json:"test_info"`
	State    `json:"status"`
}

Check contains information about a recommendation in the CIS Kubernetes document.

type Config

type Config struct {
	Enabled            bool          `json:"enabled"`
	Force              bool          `json:"force"`
	ScanInterval       time.Duration `validate:"required" json:"scanInterval"`
	JobImagePullPolicy string        `json:"jobImagePullPolicy"`
	CloudProvider      string        `json:"cloudProvider"`
	JobNamespace       string        `json:"jobNamespace"`
}

type Controller

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

func NewController

func NewController(
	log *logging.Logger,
	client kubernetes.Interface,
	cfg Config,
	castClient castaiClient,
	logsReader kube.PodLogProvider,
	kubeController kubeController,
	scannedNodes []string,
) *Controller

func (*Controller) OnAdd

func (c *Controller) OnAdd(obj kube.Object)

func (*Controller) OnDelete

func (c *Controller) OnDelete(obj kube.Object)

func (*Controller) OnUpdate

func (c *Controller) OnUpdate(obj kube.Object)

func (*Controller) RequiredInformers

func (c *Controller) RequiredInformers() []reflect.Type

func (*Controller) RequiredTypes

func (c *Controller) RequiredTypes() []reflect.Type

func (*Controller) Run

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

type Controls

type Controls struct {
	Version string   `json:"version"`
	Groups  []*Group `json:"tests"`
}

type Group

type Group struct {
	Checks []*Check `json:"results"`
}

Group is a collection of similar checks.

type KubeBenchReport

type KubeBenchReport struct {
	OverallControls `json:",inline"`
	Node            `json:",inline"`
}

type Node

type Node struct {
	NodeName   string    `json:"node_name"`
	ResourceID uuid.UUID `json:"resource_id"`
}

type OverallControls

type OverallControls struct {
	Controls []*Controls `json:"Controls"`
}

type State

type State string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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