v1alpha1

package
v0.7.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// StatusSuccess indicates that a configuration was taken into use.
	StatusSuccess = metav1.StatusSuccess
	// StatusFailure indicates failure to take a configuration into use.
	StatusFailure = metav1.StatusFailure
)

Variables

View Source
var (
	// SchemeGroupVersion is the group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "config.nri", Version: "v1alpha1"}

	// SchemeBuilder is the scheme builder for this API.
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}

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

Functions

func NodeStatusPatch

func NodeStatusPatch(node string, status *NodeStatus) ([]byte, types.PatchType, error)

NodeStatusPatch creates a (MergePatch) for the given node status.

Types

type BalloonsPolicy

type BalloonsPolicy struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   BalloonsPolicySpec `json:"spec"`
	Status ConfigStatus       `json:"status,omitempty"`
}

BalloonsPolicy represents the configuration for the balloons policy. +kubebuilder:object:root=true +kubebuilder:subresource:status +genclient

func (*BalloonsPolicy) CommonConfig

func (c *BalloonsPolicy) CommonConfig() *CommonConfig

func (*BalloonsPolicy) DeepCopy

func (in *BalloonsPolicy) DeepCopy() *BalloonsPolicy

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

func (*BalloonsPolicy) DeepCopyInto

func (in *BalloonsPolicy) DeepCopyInto(out *BalloonsPolicy)

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

func (*BalloonsPolicy) DeepCopyObject

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

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

func (*BalloonsPolicy) PolicyConfig

func (c *BalloonsPolicy) PolicyConfig() interface{}

func (*BalloonsPolicy) Validate added in v0.4.0

func (c *BalloonsPolicy) Validate() error

type BalloonsPolicyList

type BalloonsPolicyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []BalloonsPolicy `json:"items"`
}

BalloonsPolicyList represents a list of BalloonsPolicies. +kubebuilder:object:root=true

func (*BalloonsPolicyList) DeepCopy

func (in *BalloonsPolicyList) DeepCopy() *BalloonsPolicyList

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

func (*BalloonsPolicyList) DeepCopyInto

func (in *BalloonsPolicyList) DeepCopyInto(out *BalloonsPolicyList)

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

func (*BalloonsPolicyList) DeepCopyObject

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

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

type BalloonsPolicySpec

type BalloonsPolicySpec struct {
	balloons.Config `json:",inline"`
	// +optional
	Control control.Config `json:"control,omitempty"`
	// +optional
	Log log.Config `json:"log,omitempty"`
	// +optional
	Instrumentation instrumentation.Config `json:"instrumentation,omitempty"`
}

BalloonsPolicySpec describes a balloons policy.

func (*BalloonsPolicySpec) DeepCopy

func (in *BalloonsPolicySpec) DeepCopy() *BalloonsPolicySpec

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

func (*BalloonsPolicySpec) DeepCopyInto

func (in *BalloonsPolicySpec) DeepCopyInto(out *BalloonsPolicySpec)

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

type CommonConfig

type CommonConfig struct {
	// +optional
	Control control.Config `json:"control,omitempty"`
	// +optional
	Log log.Config `json:"log,omitempty"`
	// +optional
	Instrumentation instrumentation.Config `json:"instrumentation,omitempty"`
}

func (*CommonConfig) DeepCopy

func (in *CommonConfig) DeepCopy() *CommonConfig

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

func (*CommonConfig) DeepCopyInto

func (in *CommonConfig) DeepCopyInto(out *CommonConfig)

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

type ConfigStatus

type ConfigStatus struct {
	Nodes map[string]NodeStatus `json:"nodes"`
}

ConfigStatus is the per-node status for a configuration resource.

func (*ConfigStatus) DeepCopy

func (in *ConfigStatus) DeepCopy() *ConfigStatus

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

func (*ConfigStatus) DeepCopyInto

func (in *ConfigStatus) DeepCopyInto(out *ConfigStatus)

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

type NodeStatus

type NodeStatus struct {
	// Status of activating the configuration on this node.
	// +kubebuilder:validation:Enum=Success;Failure
	Status string `json:"status"`
	// Generation is the generation the configuration this status was set for.
	Generation int64 `json:"generation"`
	// Error can provide further details of a configuration error.
	Error *string `json:"errors,omitempty"`
	// Timestamp of setting this status.
	Timestamp metav1.Time `json:"timestamp,omitempty"`
}

NodeStatus is the configuration status for a single node.

func NewNodeStatus

func NewNodeStatus(err error, generation int64) *NodeStatus

NewNodeStatus create a node status for the given generation and error.

func (*NodeStatus) DeepCopy

func (in *NodeStatus) DeepCopy() *NodeStatus

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

func (*NodeStatus) DeepCopyInto

func (in *NodeStatus) DeepCopyInto(out *NodeStatus)

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

type ResmgrConfig

type ResmgrConfig interface {
	metav1.ObjectMetaAccessor
	CommonConfig() *CommonConfig
	PolicyConfig() interface{}
}

ResmgrConfig provides access to policy-specific and common configuration data. All resource management configuration types must implement this interface. The resource manager uses it to pass configuration to the policy implementation. +kubebuilder:object:generate=false

type TemplatePolicy

type TemplatePolicy struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   TemplatePolicySpec `json:"spec"`
	Status ConfigStatus       `json:"status,omitempty"`
}

TemplatePolicy represents the configuration for the template policy. +kubebuilder:object:root=true +kubebuilder:subresource:status +genclient

func (*TemplatePolicy) CommonConfig

func (c *TemplatePolicy) CommonConfig() *CommonConfig

func (*TemplatePolicy) DeepCopy

func (in *TemplatePolicy) DeepCopy() *TemplatePolicy

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

func (*TemplatePolicy) DeepCopyInto

func (in *TemplatePolicy) DeepCopyInto(out *TemplatePolicy)

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

func (*TemplatePolicy) DeepCopyObject

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

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

func (*TemplatePolicy) PolicyConfig

func (c *TemplatePolicy) PolicyConfig() interface{}

type TemplatePolicyList

type TemplatePolicyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []TemplatePolicy `json:"items"`
}

TemplatePolicyList represents a list of TemplatePolicies. +kubebuilder:object:root=true

func (*TemplatePolicyList) DeepCopy

func (in *TemplatePolicyList) DeepCopy() *TemplatePolicyList

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

func (*TemplatePolicyList) DeepCopyInto

func (in *TemplatePolicyList) DeepCopyInto(out *TemplatePolicyList)

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

func (*TemplatePolicyList) DeepCopyObject

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

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

type TemplatePolicySpec

type TemplatePolicySpec struct {
	template.Config `json:",inline"`
	// +optional
	Control control.Config `json:"control,omitempty"`
	// +optional
	Log log.Config `json:"log,omitempty"`
	// +optional
	Instrumentation instrumentation.Config `json:"instrumentation,omitempty"`
}

TemplatePolicySpec describes a template policy.

func (*TemplatePolicySpec) DeepCopy

func (in *TemplatePolicySpec) DeepCopy() *TemplatePolicySpec

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

func (*TemplatePolicySpec) DeepCopyInto

func (in *TemplatePolicySpec) DeepCopyInto(out *TemplatePolicySpec)

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

type TopologyAwarePolicy

type TopologyAwarePolicy struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   TopologyAwarePolicySpec `json:"spec"`
	Status ConfigStatus            `json:"status,omitempty"`
}

TopologyAwarePolicy represents the configuration for the topology-aware policy. +kubebuilder:object:root=true +kubebuilder:subresource:status +genclient

func (*TopologyAwarePolicy) CommonConfig

func (c *TopologyAwarePolicy) CommonConfig() *CommonConfig

func (*TopologyAwarePolicy) DeepCopy

func (in *TopologyAwarePolicy) DeepCopy() *TopologyAwarePolicy

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

func (*TopologyAwarePolicy) DeepCopyInto

func (in *TopologyAwarePolicy) DeepCopyInto(out *TopologyAwarePolicy)

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

func (*TopologyAwarePolicy) DeepCopyObject

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

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

func (*TopologyAwarePolicy) PolicyConfig

func (c *TopologyAwarePolicy) PolicyConfig() interface{}

type TopologyAwarePolicyList

type TopologyAwarePolicyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []TopologyAwarePolicy `json:"items"`
}

TopologyAwarePolicyList represents a list of TopologyAwarePolicies. +kubebuilder:object:root=true

func (*TopologyAwarePolicyList) DeepCopy

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

func (*TopologyAwarePolicyList) DeepCopyInto

func (in *TopologyAwarePolicyList) DeepCopyInto(out *TopologyAwarePolicyList)

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

func (*TopologyAwarePolicyList) DeepCopyObject

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

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

type TopologyAwarePolicySpec

type TopologyAwarePolicySpec struct {
	topologyaware.Config `json:",inline"`
	// +optional
	Control control.Config `json:"control,omitempty"`
	// +optional
	Log log.Config `json:"log,omitempty"`
	// +optional
	Instrumentation instrumentation.Config `json:"instrumentation,omitempty"`
}

TopologyAwarePolicySpec describes a topology-aware policy.

func (*TopologyAwarePolicySpec) DeepCopy

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

func (*TopologyAwarePolicySpec) DeepCopyInto

func (in *TopologyAwarePolicySpec) DeepCopyInto(out *TopologyAwarePolicySpec)

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

type Validator added in v0.4.0

type Validator interface {
	Validate() error
}

Validator is an optional interface that top level configuration types can implement to provide extra custom validation of configuration data. +kubebuilder:object:generate=false

Jump to

Keyboard shortcuts

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