v1beta1

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

+kubebuilder:object:generate=true +groupName=tracker.khulnasoft.com

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "tracker.khulnasoft.com", Version: "v1beta1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type Policy

type Policy struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	// tracker policy spec
	Spec PolicySpec `json:"spec"`
}

+kubebuilder:object:root=true +kubebuilder:resource:scope=Cluster

func (*Policy) DeepCopy

func (in *Policy) DeepCopy() *Policy

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

func (*Policy) DeepCopyInto

func (in *Policy) DeepCopyInto(out *Policy)

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

func (*Policy) DeepCopyObject

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

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

func (Policy) GetDefaultActions

func (p Policy) GetDefaultActions() []string

func (Policy) GetDescription

func (p Policy) GetDescription() string

func (Policy) GetName

func (p Policy) GetName() string

func (Policy) GetRules

func (p Policy) GetRules() []Rule

func (Policy) GetScope

func (p Policy) GetScope() []string

type PolicyInterface

type PolicyInterface interface {
	GetName() string
	GetDescription() string
	GetScope() []string
	GetDefaultActions() []string
	GetRules() []Rule
}

PolicyInterface is the interface of the policy object, it is used to allow tracker to support policies coming from kubernetes, or directly from the filesystem.

type PolicyList

type PolicyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Policy `json:"items"`
}

+kubebuilder:object:root=true +kubebuilder:resource:scope=Cluster PolicyList contains a list of Policy

func (*PolicyList) DeepCopy

func (in *PolicyList) DeepCopy() *PolicyList

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

func (*PolicyList) DeepCopyInto

func (in *PolicyList) DeepCopyInto(out *PolicyList)

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

func (*PolicyList) DeepCopyObject

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

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

type PolicySpec

type PolicySpec struct {
	Scope []string `yaml:"scope" json:"scope"`
	// +optional
	DefaultActions []string `yaml:"defaultActions" json:"defaultActions"`
	Rules          []Rule   `yaml:"rules" json:"rules"`
}

PolicySpec is the structure of the policy file

func (*PolicySpec) DeepCopy

func (in *PolicySpec) DeepCopy() *PolicySpec

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

func (*PolicySpec) DeepCopyInto

func (in *PolicySpec) DeepCopyInto(out *PolicySpec)

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

type Rule

type Rule struct {
	Event string `yaml:"event" json:"event"`
	// +optional
	Filters []string `yaml:"filters" json:"filters"`
	// +optional
	Actions []string `yaml:"actions" json:"actions"`
}

Rule is the structure of the rule in the policy file

func (*Rule) DeepCopy

func (in *Rule) DeepCopy() *Rule

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

func (*Rule) DeepCopyInto

func (in *Rule) DeepCopyInto(out *Rule)

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