tunnelk8s

package
v0.5.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BomToArtifacts

func BomToArtifacts(b *bom.Result) ([]*artifacts.Artifact, error)

func FilterResources added in v0.5.2

func FilterResources(include []string, exclude []string, key string) bool

Types

type ArtifactsK8S

type ArtifactsK8S interface {
	// ListArtifacts returns kubernetes scanable artifacts
	ListArtifacts(context.Context) ([]*artifacts.Artifact, error)
	// ListArtifactAndNodeInfo return kubernete scanable artifact and node info
	ListArtifactAndNodeInfo(context.Context, ...NodeCollectorOption) ([]*artifacts.Artifact, error)
	// ListClusterBomInfo returns kubernetes Bom (node,core components) information.
	ListClusterBomInfo(context.Context) ([]*artifacts.Artifact, error)
}

ArtifactsK8S interface represents operations to query the artifacts

type K8sOption

type K8sOption func(*client)

func WithExcludeKinds added in v0.5.2

func WithExcludeKinds(excludeKinds []string) K8sOption

func WithExcludeNamespaces added in v0.5.2

func WithExcludeNamespaces(excludeNamespaces []string) K8sOption

func WithExcludeOwned

func WithExcludeOwned(excludeOwned bool) K8sOption

func WithIncludeKinds added in v0.5.2

func WithIncludeKinds(includeKinds []string) K8sOption

func WithIncludeNamespaces added in v0.5.2

func WithIncludeNamespaces(includeNamespaces []string) K8sOption

type NodeCollectorOption

type NodeCollectorOption func(*client)

func WithAffinity added in v0.5.2

func WithAffinity(affinity *corev1.Affinity) NodeCollectorOption

func WithCommandPaths added in v0.5.2

func WithCommandPaths(commandPaths []string) NodeCollectorOption

func WithEmbeddedCommandFileSystem added in v0.5.2

func WithEmbeddedCommandFileSystem(commandsFileSystem embed.FS) NodeCollectorOption

func WithEmbeddedNodeConfigFilesystem added in v0.5.2

func WithEmbeddedNodeConfigFilesystem(nodeConfigFileSystem embed.FS) NodeCollectorOption

func WithIgnoreLabels

func WithIgnoreLabels(ignoreLabels map[string]string) NodeCollectorOption

func WithNodeConfig added in v0.5.2

func WithNodeConfig(nodeConfig bool) NodeCollectorOption

func WithScanJobImageRef

func WithScanJobImageRef(imageRef string) NodeCollectorOption

func WithScanJobNamespace

func WithScanJobNamespace(namespace string) NodeCollectorOption

func WithSpecCommandIds added in v0.5.2

func WithSpecCommandIds(specCommandIds []string) NodeCollectorOption

func WithTolerations

func WithTolerations(tolerations []corev1.Toleration) NodeCollectorOption

type TunnelK8S

type TunnelK8S interface {
	Namespace(string) TunnelK8S
	AllNamespaces() TunnelK8S
	Resources(string) TunnelK8S
	ArtifactsK8S
}

TunnelK8S interface represents the operations supported by the library

func New

func New(cluster k8s.Cluster, opts ...K8sOption) TunnelK8S

New creates a tunnelK8S client

Jump to

Keyboard shortcuts

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