violation

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildKey added in v0.6.0

func BuildKey(rKind, rNs, rName string) string

BuildKey returns the key format

Types

type Builder

type Builder interface {
	Generator
	// contains filtered or unexported methods
}

Builder is to build policy violations

func NewPolicyViolationBuilder

func NewPolicyViolationBuilder(client *client.Client,
	sharedInfomer sharedinformer.PolicyInformer,
	eventController event.Generator) Builder

NewPolicyViolationBuilder returns new violation builder

type Generator

type Generator interface {
	Add(infos ...*Info) error
	RemoveInactiveViolation(policy, rKind, rNs, rName string, ruleType info.RuleType) error
	ResourceRemoval(policy, rKind, rNs, rName string) error
}

Generator to generate policy violation

type Info

type Info struct {
	Policy string
	policytype.Violation
}

Info describes the policyviolation details

func BuldNewViolation added in v0.6.0

func BuldNewViolation(pName string, rKind string, rNs string, rName string, reason string, frules []v1alpha1.FailedRule) *Info

BuldNewViolation returns a new violation

Jump to

Keyboard shortcuts

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