kubernetes

package
v0.0.0-...-c26bb74 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPolicyClient

func NewPolicyClient(
	client PolicyAdapter,
	store *kyverno.PolicyStore,
	mapper Mapper,
) kyverno.PolicyClient

NewPolicyClient creates a new PolicyReportClient based on the kubernetes go-client

Types

type Mapper

type Mapper interface {
	// MapPolicy maps a map into a PolicyReport
	MapPolicy(reportMap map[string]interface{}) kyverno.Policy
}

Mapper converts maps into report structs

func NewMapper

func NewMapper() Mapper

NewMapper creates an new Mapper instance

type PolicyAdapter

type PolicyAdapter interface {
	ListClusterPolicies() (*unstructured.UnstructuredList, error)
	ListPolicies() (*unstructured.UnstructuredList, error)
	WatchClusterPolicies() (watch.Interface, error)
	WatchPolicies() (watch.Interface, error)
}

func NewPolicyAdapter

func NewPolicyAdapter(dynamic dynamic.Interface, version string) PolicyAdapter

NewPolicAdapter new Adapter for Policy Report Kubernetes API

Jump to

Keyboard shortcuts

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