v1alpha1

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: Apache-2.0 Imports: 5 Imported by: 11

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the policy v1alpha1 API group +k8s:deepcopy-gen=package +kubebuilder:object:generate=true +groupName=json.kyverno.io

Index

Constants

View Source
const GroupName = "json.kyverno.io"

GroupName specifies the group name used to register the objects.

Variables

View Source
var (
	// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	// Depreciated: use Install instead
	AddToScheme = localSchemeBuilder.AddToScheme
	Install     = localSchemeBuilder.AddToScheme
)
View Source
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha1"}

GroupVersion specifies the group and the version used to register the objects.

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type Any

type Any struct {
	// Value contains the value of the Any object.
	// +kubebuilder:pruning:PreserveUnknownFields
	// +kubebuilder:validation:Schemaless
	// +optional
	Value any `json:",inline"`
}

Any can be any type. +k8s:deepcopy-gen=false

func (*Any) DeepCopy

func (in *Any) DeepCopy() *Any

func (*Any) DeepCopyInto

func (in *Any) DeepCopyInto(out *Any)

func (*Any) MarshalJSON

func (a *Any) MarshalJSON() ([]byte, error)

func (*Any) UnmarshalJSON

func (a *Any) UnmarshalJSON(data []byte) error

type Assert

type Assert struct {
	// Any allows specifying assertions which will be ORed.
	// +optional
	Any []Assertion `json:"any,omitempty"`

	// All allows specifying assertions which will be ANDed.
	// +optional
	All []Assertion `json:"all,omitempty"`
}

Assert defines collections of assertions.

func (*Assert) DeepCopy

func (in *Assert) DeepCopy() *Assert

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Assert.

func (*Assert) DeepCopyInto

func (in *Assert) DeepCopyInto(out *Assert)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Assertion

type Assertion struct {
	// Message is the message associated message.
	// +optional
	Message string `json:"message,omitempty"`

	// Check is the assertion check definition.
	Check Any `json:"check"`
}

Assertion contains an assertion tree associated with a message.

func (*Assertion) DeepCopy

func (in *Assertion) DeepCopy() *Assertion

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Assertion.

func (*Assertion) DeepCopyInto

func (in *Assertion) DeepCopyInto(out *Assertion)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ContextEntry

type ContextEntry struct {
	// Name is the entry name.
	Name string `json:"name"`

	// Variable defines an arbitrary variable.
	// +kubebuilder:pruning:PreserveUnknownFields
	// +kubebuilder:validation:Schemaless
	// +optional
	Variable Any `json:"variable,omitempty"`
}

ContextEntry adds variables and data sources to a rule context.

func (*ContextEntry) DeepCopy

func (in *ContextEntry) DeepCopy() *ContextEntry

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContextEntry.

func (*ContextEntry) DeepCopyInto

func (in *ContextEntry) DeepCopyInto(out *ContextEntry)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Match

type Match struct {
	// Any allows specifying assertion trees which will be ORed.
	// +optional
	Any []Any `json:"any,omitempty"`

	// All allows specifying assertion trees which will be ANDed.
	// +optional
	All []Any `json:"all,omitempty"`
}

Match defines collections of assertion trees.

func (*Match) DeepCopy

func (in *Match) DeepCopy() *Match

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Match.

func (*Match) DeepCopyInto

func (in *Match) DeepCopyInto(out *Match)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ValidatingPolicy

type ValidatingPolicy struct {
	metav1.TypeMeta `json:",inline"`

	// Standard object's metadata.
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Policy spec.
	Spec ValidatingPolicySpec `json:"spec"`
}

ValidatingPolicy is the resource that contains the policy definition.

func (*ValidatingPolicy) DeepCopy

func (in *ValidatingPolicy) DeepCopy() *ValidatingPolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingPolicy.

func (*ValidatingPolicy) DeepCopyInto

func (in *ValidatingPolicy) DeepCopyInto(out *ValidatingPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ValidatingPolicy) DeepCopyObject

func (in *ValidatingPolicy) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ValidatingPolicyList

type ValidatingPolicyList struct {
	metav1.TypeMeta `json:",inline" yaml:",inline"`
	metav1.ListMeta `json:"metadata" yaml:"metadata"`
	Items           []ValidatingPolicy `json:"items" yaml:"items"`
}

ValidatingPolicyList is a list of ValidatingPolicy instances.

func (*ValidatingPolicyList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingPolicyList.

func (*ValidatingPolicyList) DeepCopyInto

func (in *ValidatingPolicyList) DeepCopyInto(out *ValidatingPolicyList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ValidatingPolicyList) DeepCopyObject

func (in *ValidatingPolicyList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ValidatingPolicySpec

type ValidatingPolicySpec struct {
	// Rules is a list of ValidatingRule instances.
	Rules []ValidatingRule `json:"rules"`
}

ValidatingPolicySpec contains the policy spec.

func (*ValidatingPolicySpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingPolicySpec.

func (*ValidatingPolicySpec) DeepCopyInto

func (in *ValidatingPolicySpec) DeepCopyInto(out *ValidatingPolicySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ValidatingRule

type ValidatingRule struct {
	// Name is a label to identify the rule, It must be unique within the policy.
	// +kubebuilder:validation:MaxLength=63
	Name string `json:"name"`

	// Context defines variables and data sources that can be used during rule execution.
	// +optional
	Context []ContextEntry `json:"context,omitempty"`

	// Match defines when this policy rule should be applied.
	// +optional
	Match *Match `json:"match,omitempty"`

	// Exclude defines when this policy rule should not be applied.
	// +optional
	Exclude *Match `json:"exclude,omitempty"`

	// Identifier declares a JMESPath expression to extract a name from the payload.
	// +optional
	Identifier string `json:"identifier,omitempty"`

	// Assert is used to validate matching resources.
	Assert *Assert `json:"assert"`
}

ValidatingRule defines a validating rule.

func (*ValidatingRule) DeepCopy

func (in *ValidatingRule) DeepCopy() *ValidatingRule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingRule.

func (*ValidatingRule) DeepCopyInto

func (in *ValidatingRule) DeepCopyInto(out *ValidatingRule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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