policies

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v1.11.0

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

A client to get Kubewarden policies from the Kubernetes cluster

func NewClient added in v1.11.0

func NewClient(client client.Client, kubewardenNamespace string, policyServerURL string) (*Client, error)

NewClient returns a policy Client

func (*Client) GetClusterWidePolicies added in v1.11.0

func (f *Client) GetClusterWidePolicies(ctx context.Context) (*Policies, error)

GetClusterWidePolicies returns all the auditable cluster-wide policies

func (*Client) GetPoliciesForANamespace added in v1.11.0

func (f *Client) GetPoliciesForANamespace(ctx context.Context, namespace string) (*Policies, error)

GetPoliciesForANamespace gets all the auditable policies for a given namespace

type Policies added in v1.11.0

type Policies struct {
	// PoliciesByGVR a map of policies grouped by GVR
	PoliciesByGVR map[schema.GroupVersionResource][]*Policy
	// PolicyNum represents the number of policies
	PolicyNum int
	// SkippedNum represents the number of skipped policies that don't match audit constraints
	SkippedNum int
	// ErroredNum represents the number of errored policies. These policies may be misconfigured
	ErroredNum int
}

Policies represents a collection of auditable policies

type Policy added in v1.11.0

type Policy struct {
	policiesv1.Policy
	PolicyServer *url.URL
}

Policy represents a policy and the URL of the policy server where it is running

Jump to

Keyboard shortcuts

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