Documentation ¶
Overview ¶
+kubebuilder:object:generate=true +groupName=tracker.khulnasoft.com
Index ¶
- Variables
- type Policy
- func (in *Policy) DeepCopy() *Policy
- func (in *Policy) DeepCopyInto(out *Policy)
- func (in *Policy) DeepCopyObject() runtime.Object
- func (p Policy) GetDefaultActions() []string
- func (p Policy) GetDescription() string
- func (p Policy) GetName() string
- func (p Policy) GetRules() []Rule
- func (p Policy) GetScope() []string
- type PolicyInterface
- type PolicyList
- type PolicySpec
- type Rule
Constants ¶
This section is empty.
Variables ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Policy.
func (*Policy) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Policy) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (Policy) GetDefaultActions ¶
func (Policy) GetDescription ¶
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.
func (*PolicyInterface) DeepCopy ¶
func (in *PolicyInterface) DeepCopy() *PolicyInterface
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyInterface.
func (*PolicyInterface) DeepCopyInto ¶
func (in *PolicyInterface) DeepCopyInto(out *PolicyInterface)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rule.
func (*Rule) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.