Documentation
¶
Overview ¶
Package v1 contains API Schema definitions for the rules v1 API group +kubebuilder:object:generate=true +groupName=karbonite.io
Index ¶
- Constants
- Variables
- type ActiveReentrantThrottle
- type AffectedResource
- type DeletionRule
- type DeletionRuleList
- type DeletionRuleSpec
- type DeletionRuleStatus
- type LastRunInfo
- type ReentrantSchedule
- type ResourceScalingSpec
- type Selector
- type ThrottlingRule
- type ThrottlingRuleList
- type ThrottlingRuleSpec
- type ThrottlingRuleStatus
- type ThrottlingSchedule
Constants ¶
const ( ThrottleTag = "throttle" ThrottleRevertTag = "throttle-revert" DeletionTag = "deletion" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "karbonite.io", Version: "v1"} // 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 ActiveReentrantThrottle ¶
type ActiveReentrantThrottle struct { //+kubebuilder:validation:Type:=array AffectedResources []AffectedResource `json:"affectedResources,omitempty"` //+kubebuilder:validation:Optional ReentrantOn metav1.Time `json:"reentrantOn,omitempty"` }
func (*ActiveReentrantThrottle) DeepCopy ¶
func (in *ActiveReentrantThrottle) DeepCopy() *ActiveReentrantThrottle
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActiveReentrantThrottle.
func (*ActiveReentrantThrottle) DeepCopyInto ¶
func (in *ActiveReentrantThrottle) DeepCopyInto(out *ActiveReentrantThrottle)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AffectedResource ¶
type AffectedResource struct { Namespace string `json:"namespace"` Resource string `json:"resource"` Kind string `json:"kind"` ResourceScalingSpec *ResourceScalingSpec `json:"scalingSpec,omitempty"` }
func (*AffectedResource) DeepCopy ¶
func (in *AffectedResource) DeepCopy() *AffectedResource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AffectedResource.
func (*AffectedResource) DeepCopyInto ¶
func (in *AffectedResource) DeepCopyInto(out *AffectedResource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AffectedResource) NamespacedName ¶
func (in *AffectedResource) NamespacedName() types.NamespacedName
func (*AffectedResource) String ¶
func (in *AffectedResource) String() string
type DeletionRule ¶
type DeletionRule struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec DeletionRuleSpec `json:"spec,omitempty"` Status DeletionRuleStatus `json:"status,omitempty"` }
DeletionRule is the Schema for the deletionrules API
func (*DeletionRule) DeepCopy ¶
func (in *DeletionRule) DeepCopy() *DeletionRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeletionRule.
func (*DeletionRule) DeepCopyInto ¶
func (in *DeletionRule) DeepCopyInto(out *DeletionRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DeletionRule) DeepCopyObject ¶
func (in *DeletionRule) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DeletionRuleList ¶
type DeletionRuleList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []DeletionRule `json:"items"` }
DeletionRuleList contains a list of DeletionRule
func (*DeletionRuleList) DeepCopy ¶
func (in *DeletionRuleList) DeepCopy() *DeletionRuleList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeletionRuleList.
func (*DeletionRuleList) DeepCopyInto ¶
func (in *DeletionRuleList) DeepCopyInto(out *DeletionRuleList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DeletionRuleList) DeepCopyObject ¶
func (in *DeletionRuleList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DeletionRuleSpec ¶
type DeletionRuleSpec struct { //+kubebuilder:default:=true Enabled bool `json:"enabled,omitempty"` //+kubebuilder:default:=false DryRun bool `json:"dryRun,omitempty"` Selector Selector `json:"selector"` //+kubebuilder:validation:MinItems:=1 Schedules []string `json:"schedules"` }
DeletionRuleSpec defines the desired state of DeletionRule
func (*DeletionRuleSpec) DeepCopy ¶
func (in *DeletionRuleSpec) DeepCopy() *DeletionRuleSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeletionRuleSpec.
func (*DeletionRuleSpec) DeepCopyInto ¶
func (in *DeletionRuleSpec) DeepCopyInto(out *DeletionRuleSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeletionRuleStatus ¶
type DeletionRuleStatus struct { NextRun metav1.Time `json:"nextRun,omitempty"` //+kubebuilder:default:=0 RunCount int `json:"runCount"` //+kubebuilder:validation:Optional LastRun *LastRunInfo `json:"lastRun,omitempty"` }
DeletionRuleStatus defines the observed state of DeletionRule
func (*DeletionRuleStatus) DeepCopy ¶
func (in *DeletionRuleStatus) DeepCopy() *DeletionRuleStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeletionRuleStatus.
func (*DeletionRuleStatus) DeepCopyInto ¶
func (in *DeletionRuleStatus) DeepCopyInto(out *DeletionRuleStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LastRunInfo ¶
type LastRunInfo struct { //+kubebuilder:validation:Optional Timestamp *metav1.Time `json:"timestamp,omitempty"` //+kubebuilder:validation:Type:=array //+kubebuilder:validation:Optional AffectedResources []AffectedResource `json:"affectedResources,omitempty"` }
func (*LastRunInfo) DeepCopy ¶
func (in *LastRunInfo) DeepCopy() *LastRunInfo
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LastRunInfo.
func (*LastRunInfo) DeepCopyInto ¶
func (in *LastRunInfo) DeepCopyInto(out *LastRunInfo)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReentrantSchedule ¶
type ReentrantSchedule struct { // TODO: write regex validator to cover all the cases Start string `json:"start"` End string `json:"end,omitempty"` }
func (*ReentrantSchedule) DeepCopy ¶
func (in *ReentrantSchedule) DeepCopy() *ReentrantSchedule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReentrantSchedule.
func (*ReentrantSchedule) DeepCopyInto ¶
func (in *ReentrantSchedule) DeepCopyInto(out *ReentrantSchedule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ReentrantSchedule) String ¶
func (in *ReentrantSchedule) String() string
type ResourceScalingSpec ¶
type ResourceScalingSpec struct { //+kubebuilder:validation:Minimum:=0 OriginalReplicas int `json:"originalReplicas"` //+kubebuilder:validation:Minimum:=0 CurrentReplicas int `json:"currentReplicas"` }
func (*ResourceScalingSpec) DeepCopy ¶
func (in *ResourceScalingSpec) DeepCopy() *ResourceScalingSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceScalingSpec.
func (*ResourceScalingSpec) DeepCopyInto ¶
func (in *ResourceScalingSpec) DeepCopyInto(out *ResourceScalingSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Selector ¶
type Selector struct { MatchNamespaces []string `json:"matchNamespaces,omitempty"` MatchKinds []string `json:"matchKinds,omitempty"` MatchNames []string `json:"matchNames,omitempty"` MatchLabels map[string]string `json:"matchLabels,omitempty"` }
func (*Selector) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Selector.
func (*Selector) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Selector) FindMatchingResources ¶
func (in *Selector) FindMatchingResources(ctx context.Context, kubeClient client.Client) ([]unstructured.Unstructured, error)
type ThrottlingRule ¶
type ThrottlingRule struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ThrottlingRuleSpec `json:"spec,omitempty"` Status ThrottlingRuleStatus `json:"status,omitempty"` }
ThrottlingRule is the Schema for the throttlingrules API
func (*ThrottlingRule) DeepCopy ¶
func (in *ThrottlingRule) DeepCopy() *ThrottlingRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThrottlingRule.
func (*ThrottlingRule) DeepCopyInto ¶
func (in *ThrottlingRule) DeepCopyInto(out *ThrottlingRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ThrottlingRule) DeepCopyObject ¶
func (in *ThrottlingRule) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ThrottlingRuleList ¶
type ThrottlingRuleList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ThrottlingRule `json:"items"` }
ThrottlingRuleList contains a list of ThrottlingRule
func (*ThrottlingRuleList) DeepCopy ¶
func (in *ThrottlingRuleList) DeepCopy() *ThrottlingRuleList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThrottlingRuleList.
func (*ThrottlingRuleList) DeepCopyInto ¶
func (in *ThrottlingRuleList) DeepCopyInto(out *ThrottlingRuleList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ThrottlingRuleList) DeepCopyObject ¶
func (in *ThrottlingRuleList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ThrottlingRuleSpec ¶
type ThrottlingRuleSpec struct { //+kubebuilder:default:=true Enabled bool `json:"enabled,omitempty"` //+kubebuilder:default:= false DryRun bool `json:"dryRun,omitempty"` //+kubebuilder:default:={matchKinds:{Deployment,StatefulSet}} Selector Selector `json:"selector"` //+kubebuilder:validation:MinItems:=1 Schedules []ThrottlingSchedule `json:"schedules"` }
ThrottlingRuleSpec defines the desired state of ThrottlingRule
func (*ThrottlingRuleSpec) DeepCopy ¶
func (in *ThrottlingRuleSpec) DeepCopy() *ThrottlingRuleSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThrottlingRuleSpec.
func (*ThrottlingRuleSpec) DeepCopyInto ¶
func (in *ThrottlingRuleSpec) DeepCopyInto(out *ThrottlingRuleSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ThrottlingRuleStatus ¶
type ThrottlingRuleStatus struct { NextRun metav1.Time `json:"nextRun,omitempty"` //+kubebuilder:default:=0 RunCount int `json:"runCount"` //+kubebuilder:validation:Optional LastRun *LastRunInfo `json:"lastRun,omitempty"` //+kubebuilder:validation:Optional ActiveReentrantThrottle *ActiveReentrantThrottle `json:"activeReentrantThrottle,omitempty"` }
ThrottlingRuleStatus defines the observed state of ThrottlingRule
func (*ThrottlingRuleStatus) DeepCopy ¶
func (in *ThrottlingRuleStatus) DeepCopy() *ThrottlingRuleStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThrottlingRuleStatus.
func (*ThrottlingRuleStatus) DeepCopyInto ¶
func (in *ThrottlingRuleStatus) DeepCopyInto(out *ThrottlingRuleStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ThrottlingSchedule ¶
type ThrottlingSchedule struct { ReentrantSchedule `json:",inline"` //+kubebuilder:validation:Minimum:=0 DesiredReplicas int `json:"desiredReplicas"` }
func (*ThrottlingSchedule) DeepCopy ¶
func (in *ThrottlingSchedule) DeepCopy() *ThrottlingSchedule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThrottlingSchedule.
func (*ThrottlingSchedule) DeepCopyInto ¶
func (in *ThrottlingSchedule) DeepCopyInto(out *ThrottlingSchedule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.