Documentation
¶
Overview ¶
This package provides primitives for working with Kubernetes workload configuration checkers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder interface { Owner(owner metav1.Object) Builder PodSpecHash(hash string) Builder Result(result v1alpha1.ConfigAuditResult) Builder Get() (v1alpha1.ConfigAuditReport, error) }
func NewBuilder ¶
type Plugin ¶ added in v0.9.0
type Plugin interface { GetScanJobSpec(workload kube.Object, gvk schema.GroupVersionKind) (corev1.PodSpec, error) GetContainerName() string ParseConfigAuditResult(logsReader io.ReadCloser) (v1alpha1.ConfigAuditResult, error) }
Plugin defines the interface between Starboard and Kubernetes workload configuration checkers / linters / sanitizers. Not a final version, rather first step to separate generic workloads discovery code and Polaris implementation details.
type ReadWriter ¶
func NewControllerRuntimeReadWriter ¶ added in v0.9.0
func NewControllerRuntimeReadWriter(client client.Client) ReadWriter
NewControllerRuntimeReadWriter constructs a new ReadWriter which is using the client package provided by the controller-runtime libraries for interacting with the Kubernetes API server.
func NewReadWriter ¶
func NewReadWriter(clientset versioned.Interface) ReadWriter
NewReadWriter constructs a new ReadWriter which is using the client-go module for interacting with the Kubernetes API server.
type Reader ¶
type Reader interface {
FindByOwner(ctx context.Context, owner kube.Object) (*v1alpha1.ConfigAuditReport, error)
}
Reader is the interface that wraps basic FindByOwner method.
FindByOwner returns a v1alpha1.ConfigAuditReport owned by the given kube.Object or nil if the report is not found.
type Scanner ¶ added in v0.9.0
type Scanner struct { ext.IDGenerator // contains filtered or unexported fields }
func NewScanner ¶ added in v0.9.0
func NewScanner( scheme *runtime.Scheme, clientset kubernetes.Interface, opts kube.ScannerOpts, plugin Plugin, ) *Scanner