Documentation
¶
Index ¶
- Constants
- Variables
- func NodeStatusPatch(node string, status *NodeStatus) ([]byte, types.PatchType, error)
- type AgentConfig
- type BalloonsPolicy
- func (c *BalloonsPolicy) AgentConfig() *AgentConfig
- func (c *BalloonsPolicy) CommonConfig() *CommonConfig
- func (in *BalloonsPolicy) DeepCopy() *BalloonsPolicy
- func (in *BalloonsPolicy) DeepCopyInto(out *BalloonsPolicy)
- func (in *BalloonsPolicy) DeepCopyObject() runtime.Object
- func (c *BalloonsPolicy) PolicyConfig() interface{}
- func (c *BalloonsPolicy) Validate() error
- type BalloonsPolicyList
- type BalloonsPolicySpec
- type CommonConfig
- type ConfigStatus
- type NodeStatus
- type ResmgrConfig
- type TemplatePolicy
- func (c *TemplatePolicy) AgentConfig() *AgentConfig
- func (c *TemplatePolicy) CommonConfig() *CommonConfig
- func (in *TemplatePolicy) DeepCopy() *TemplatePolicy
- func (in *TemplatePolicy) DeepCopyInto(out *TemplatePolicy)
- func (in *TemplatePolicy) DeepCopyObject() runtime.Object
- func (c *TemplatePolicy) PolicyConfig() interface{}
- func (c *TemplatePolicy) RdtConfig() (*rdt.Config, bool, error)
- type TemplatePolicyList
- type TemplatePolicySpec
- type TopologyAwarePolicy
- func (c *TopologyAwarePolicy) AgentConfig() *AgentConfig
- func (c *TopologyAwarePolicy) CommonConfig() *CommonConfig
- func (in *TopologyAwarePolicy) DeepCopy() *TopologyAwarePolicy
- func (in *TopologyAwarePolicy) DeepCopyInto(out *TopologyAwarePolicy)
- func (in *TopologyAwarePolicy) DeepCopyObject() runtime.Object
- func (c *TopologyAwarePolicy) PolicyConfig() interface{}
- func (c *TopologyAwarePolicy) Validate() error
- type TopologyAwarePolicyList
- type TopologyAwarePolicySpec
- type Validator
Constants ¶
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 ¶
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 ¶
NodeStatusPatch creates a (MergePatch) for the given node status.
Types ¶
type AgentConfig ¶ added in v0.8.0
type AgentConfig struct {
// NodeResourceTopology enables support for exporting resource usage using
// NodeResourceTopology Custom Resources.
// +optional
NodeResourceTopology bool `json:"nodeResourceTopology,omitempty"`
// PodResourceAPI enables support for querying kubelet Pod Resource API.
// +optional
PodResourceAPI bool `json:"podResourceAPI,omitempty"`
}
AgentConfig provides access to configuration data for the agent.
func GetAgentConfig ¶ added in v0.8.0
func GetAgentConfig(cfg interface{}) *AgentConfig
GetAgentConfig returns the agent-specific configuration if we have one.
func (*AgentConfig) DeepCopy ¶ added in v0.8.0
func (in *AgentConfig) DeepCopy() *AgentConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentConfig.
func (*AgentConfig) DeepCopyInto ¶ added in v0.8.0
func (in *AgentConfig) DeepCopyInto(out *AgentConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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
func (*BalloonsPolicy) AgentConfig ¶ added in v0.8.0
func (c *BalloonsPolicy) AgentConfig() *AgentConfig
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{}
PolicyConfig returns the balloons-specific configuration handed to the policy. Before returning, any legacy control.cpu.classes entries are folded into Spec.Config.CPUClasses (without overriding entries with matching names). The legacy CPU controller is no longer used by the balloons policy; this reverse merge preserves backwards compatibility so existing configurations keep working while users migrate to the cpuClasses syntax.
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"`
// +optional
// +kubebuilder:default={"nodeResourceTopology": true }
Agent AgentConfig `json:"agent,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 {
Control control.Config
Log log.Config
Instrumentation instrumentation.Config
}
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.
func (*CommonConfig) Validate ¶ added in v0.10.0
func (c *CommonConfig) Validate() error
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
AgentConfig() *AgentConfig
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
func (*TemplatePolicy) AgentConfig ¶ added in v0.8.0
func (c *TemplatePolicy) AgentConfig() *AgentConfig
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"`
// +optional
// +kubebuilder:default={"nodeResourceTopology": true }
Agent AgentConfig `json:"agent,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
func (*TopologyAwarePolicy) AgentConfig ¶ added in v0.8.0
func (c *TopologyAwarePolicy) AgentConfig() *AgentConfig
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{}
func (*TopologyAwarePolicy) Validate ¶ added in v0.10.0
func (c *TopologyAwarePolicy) Validate() error
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 ¶
func (in *TopologyAwarePolicyList) DeepCopy() *TopologyAwarePolicyList
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"`
// +optional
// +kubebuilder:default={"nodeResourceTopology": true }
Agent AgentConfig `json:"agent,omitempty"`
}
TopologyAwarePolicySpec describes a topology-aware policy.
func (*TopologyAwarePolicySpec) DeepCopy ¶
func (in *TopologyAwarePolicySpec) DeepCopy() *TopologyAwarePolicySpec
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.