{"modulePath":"github.com/tensorbytes/simplescale","version":"v0.0.0-20220413133528-76698d7624e7","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package v1alpha1\n\nPackage v1alpha1 contains API Schema definitions for the autoscale v1alpha1 API group +kubebuilder:object:generate=true +groupName=autoscale.scale.shikanon.com\n\n## Variables\n\n```go\nvar (\n\t// GroupVersion is group version used to register these objects\n\tGroupVersion = schema.GroupVersion{Group: \"autoscale.scale.shikanon.com\", Version: \"v1alpha1\"}\n\n\t// SchemeBuilder is used to add go types to the GroupVersionKind scheme\n\tSchemeBuilder = \u0026scheme.Builder{GroupVersion: GroupVersion}\n\n\t// AddToScheme adds the types in this group-version to the given scheme.\n\tAddToScheme = SchemeBuilder.AddToScheme\n)\n```\n\n## Types\n\n```go\ntype RecommendationScaleFactor struct {\n\tmetav1.TypeMeta   `json:\",inline\"`\n\tmetav1.ObjectMeta `json:\"metadata,omitempty\"`\n\n\tSpec   RecommendationScaleFactorSpec   `json:\"spec,omitempty\"`\n\tStatus RecommendationScaleFactorStatus `json:\"status,omitempty\"`\n}\n```\nRecommendationScaleFactor is the Schema for the recommendationscalefactors API\n\n```go\nfunc (in *RecommendationScaleFactor) DeepCopy() *RecommendationScaleFactor\n```\nDeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RecommendationScaleFactor.\n\n```go\nfunc (in *RecommendationScaleFactor) DeepCopyInto(out *RecommendationScaleFactor)\n```\nDeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\n\n```go\nfunc (in *RecommendationScaleFactor) DeepCopyObject() runtime.Object\n```\nDeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.\n\n```go\ntype RecommendationScaleFactorCondition struct {\n\t// condition type\n\tType RecommendationScaleFactorConditionType `json:\"type\"`\n\n\t// condition status\n\tStatus corev1.ConditionStatus `json:\"status\"`\n\n\t// LastTransitionTime is the last time the condition transitioned from on one status to another\n\tLastTransitionTime metav1.Time `json:\"lastTransitionTime,omitempty\"`\n\n\t// message is a human-readable explaination containing details\n\tMessage string `json:\"message,omitempty\"`\n}\n```\n\n```go\nfunc (in *RecommendationScaleFactorCondition) DeepCopy() *RecommendationScaleFactorCondition\n```\nDeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RecommendationScaleFactorCondition.\n\n```go\nfunc (in *RecommendationScaleFactorCondition) DeepCopyInto(out *RecommendationScaleFactorCondition)\n```\nDeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\n\n```go\ntype RecommendationScaleFactorConditionType string\n```\n\n```go\nconst (\n\tQueryExistCondition             RecommendationScaleFactorConditionType = \"QueryExist\"\n\tValidRecommendValueCondition    RecommendationScaleFactorConditionType = \"ValidRecommendValue\"\n\tRecommendationCoolDownCondition RecommendationScaleFactorConditionType = \"Cooldown\"\n)\n```\n\n```go\ntype RecommendationScaleFactorList struct {\n\tmetav1.TypeMeta `json:\",inline\"`\n\tmetav1.ListMeta `json:\"metadata,omitempty\"`\n\tItems           []RecommendationScaleFactor `json:\"items\"`\n}\n```\nRecommendationScaleFactorList contains a list of RecommendationScaleFactor\n\n```go\nfunc (in *RecommendationScaleFactorList) DeepCopy() *RecommendationScaleFactorList\n```\nDeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RecommendationScaleFactorList.\n\n```go\nfunc (in *RecommendationScaleFactorList) DeepCopyInto(out *RecommendationScaleFactorList)\n```\nDeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\n\n```go\nfunc (in *RecommendationScaleFactorList) DeepCopyObject() runtime.Object\n```\nDeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.\n\n```go\ntype RecommendationScaleFactorSpec struct {\n\n\t// Reference of resources\n\tRef *autoscalingv1.CrossVersionObjectReference `json:\"ref,omitempty\"`\n\n\t// expression of query\n\tQuery string `json:\"query,omitempty\"`\n\n\t// desiredValue\n\tDesiredValue string `json:\"desiredValue,omitempty\"`\n\n\t// cooldown is the time of calcution, only affect statusFactor update and not affect the currentValue update\n\tCooldown string `json:\"cooldown,omitempty\"`\n\n\t// minScope is the percentage of desireValue range\n\tMinScope int `json:\"minScope,omitempty\"`\n}\n```\nRecommendationScaleFactorSpec defines the desired state of RecommendationScaleFactor\n\n```go\nfunc (in *RecommendationScaleFactorSpec) DeepCopy() *RecommendationScaleFactorSpec\n```\nDeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RecommendationScaleFactorSpec.\n\n```go\nfunc (in *RecommendationScaleFactorSpec) DeepCopyInto(out *RecommendationScaleFactorSpec)\n```\nDeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\n\n```go\ntype RecommendationScaleFactorStatus struct {\n\n\t// result of query current value\n\tCurrentValue string `json:\"currentValue,omitempty\"`\n\n\t// Calculated by currentvalue and desiredvalue\n\tScaleFactor string `json:\"scaleFactor,omitempty\"`\n\n\t// Conditions is set of conditions required for the recommendation scale\n\tConditions []RecommendationScaleFactorCondition `json:\"conditions,omitempty\"`\n\n\t// last cooldown time\n\tLastCoolDownTime metav1.Time `json:\"lastCoolDownTime,omitempty\"`\n}\n```\nRecommendationScaleFactorStatus defines the observed state of RecommendationScaleFactor\n\n```go\nfunc (s *RecommendationScaleFactorStatus) AppendConditions(cond RecommendationScaleFactorCondition)\n```\nspecial function\n\n```go\nfunc (in *RecommendationScaleFactorStatus) DeepCopy() *RecommendationScaleFactorStatus\n```\nDeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RecommendationScaleFactorStatus.\n\n```go\nfunc (in *RecommendationScaleFactorStatus) DeepCopyInto(out *RecommendationScaleFactorStatus)\n```\nDeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\n\n```go\ntype ResourceScaleFactor struct {\n\t// Kind of the reference resource\n\tKind string `json:\"kind\"`\n\n\t// API version of the reference resource\n\tAPIVersion string `json:\"apiVersion,omitempty\"`\n\n\t// Name of the referent\n\tName string `json:\"name,omitempty\"`\n\n\t// Namespace\n\tNamespace string `json:\"namespace,omitempty\"`\n\n\t// the field of target resource will be updated\n\tField string `json:\"field,omitempty\"`\n}\n```\n\n```go\nfunc (in *ResourceScaleFactor) DeepCopy() *ResourceScaleFactor\n```\nDeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceScaleFactor.\n\n```go\nfunc (in *ResourceScaleFactor) DeepCopyInto(out *ResourceScaleFactor)\n```\nDeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\n\n```go\ntype ResourceStautsField struct {\n\t// name of field, be consistent in spec field\n\tName string `json:\"name,omitempty\"`\n\n\t// path of fields\n\tPath string `json:\"path,omitempty\"`\n\n\t// from ScaleFactorObject read the value\n\tScaleFactor string `json:\"scaleFactor,omitempty\"`\n\n\t// current value of field\n\tCurrentFieldValue resource.Quantity `json:\"currentFieldValue,omitempty\"`\n\n\t// desire value of field\n\tDesiredFieldValue resource.Quantity `json:\"desiredFieldValue,omitempty\"`\n\n\t// last time of upscale\n\tLastUpScaleTime metav1.Time `json:\"lastUpScaleTime,omitempty\"`\n\n\t// last time of downscale\n\tLastDownScaleTime metav1.Time `json:\"lastDownScaleTime,omitempty\"`\n}\n```\n\n```go\nfunc (in *ResourceStautsField) DeepCopy() *ResourceStautsField\n```\nDeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceStautsField.\n\n```go\nfunc (in *ResourceStautsField) DeepCopyInto(out *ResourceStautsField)\n```\nDeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\n\n```go\ntype ScalePolicyResourceType string\n```\n\n```go\nconst (\n\t// cpu resource\n\tCPUResourceType ScalePolicyResourceType = \"cpu\"\n\t// memory resource\n\tMemoryResourceType ScalePolicyResourceType = \"memory\"\n\t// replicas resource\n\tReplicasResourceType ScalePolicyResourceType = \"replicas\"\n\t// other extend resource, like gpu\n\tOtherResourceType ScalePolicyResourceType = \"other\"\n)\n```\n\n```go\ntype ScaleResourcePolicy struct {\n\t// the name of scalePolicy\n\tName string `json:\"name\"`\n\n\t// the field of target resource will be updated\n\tField string `json:\"field\"`\n\n\t// field type\n\tFieldType ScalePolicyResourceType `json:\"type,omitempty\"`\n\n\t// Update is parameter of update\n\tUpdate *ScaleUpdateParameter `json:\"update,omitempty\"`\n\n\t// description of the scale factor resource\n\tScaleFactorObject *ResourceScaleFactor `json:\"scaleFactorObject,omitempty\"`\n}\n```\n\n```go\nfunc (in *ScaleResourcePolicy) DeepCopy() *ScaleResourcePolicy\n```\nDeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScaleResourcePolicy.\n\n```go\nfunc (in *ScaleResourcePolicy) DeepCopyInto(out *ScaleResourcePolicy)\n```\nDeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\n\n```go\ntype ScaleTargetResourceReference struct {\n\t// Kind of the reference resource\n\tKind string `json:\"kind\"`\n\t// API version of the reference resource\n\tAPIVersion string `json:\"apiVersion,omitempty\"`\n\t// Name of the referent\n\tName string `json:\"name,omitempty\"`\n\t// Selector of match label\n\tSelector map[string]string `json:\"selector,omitempty\"`\n}\n```\n\n```go\nfunc (in *ScaleTargetResourceReference) DeepCopy() *ScaleTargetResourceReference\n```\nDeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScaleTargetResourceReference.\n\n```go\nfunc (in *ScaleTargetResourceReference) DeepCopyInto(out *ScaleTargetResourceReference)\n```\nDeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\n\n```go\ntype ScaleUpdateParameter struct {\n\t// the time interval of between downscale\n\tDownscaleWindow string `json:\"downscaleWindow,omitempty\"`\n\t// the time interval of between upscale\n\tUpscaleWindow string `json:\"upscaleWindow,omitempty\"`\n\t// the field range of minimum bound\n\tMinAllowed resource.Quantity `json:\"minAllowed,omitempty\"`\n\n\t// the field range of maximum bound\n\tMaxAllowed resource.Quantity `json:\"maxAllowed,omitempty\"`\n\t// update action mode\n\tMode UpdateMode `json:\"mode,omitempty\"`\n}\n```\n\n```go\nfunc (in *ScaleUpdateParameter) DeepCopy() *ScaleUpdateParameter\n```\nDeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScaleUpdateParameter.\n\n```go\nfunc (in *ScaleUpdateParameter) DeepCopyInto(out *ScaleUpdateParameter)\n```\nDeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\n\n```go\ntype SimpleAutoScaler struct {\n\tmetav1.TypeMeta   `json:\",inline\"`\n\tmetav1.ObjectMeta `json:\"metadata,omitempty\"`\n\n\tSpec   SimpleAutoScalerSpec   `json:\"spec,omitempty\"`\n\tStatus SimpleAutoScalerStatus `json:\"status,omitempty\"`\n}\n```\nSimpleAutoScaler is the Schema for the simpleautoscalers API\n\n```go\nfunc (in *SimpleAutoScaler) DeepCopy() *SimpleAutoScaler\n```\nDeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SimpleAutoScaler.\n\n```go\nfunc (in *SimpleAutoScaler) DeepCopyInto(out *SimpleAutoScaler)\n```\nDeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\n\n```go\nfunc (in *SimpleAutoScaler) DeepCopyObject() runtime.Object\n```\nDeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.\n\n```go\ntype SimpleAutoScalerCondition struct {\n\t// condition type\n\tType SimpleAutoScalerConditionType `json:\"type\"`\n\n\t// condition status\n\tStatus corev1.ConditionStatus `json:\"status\"`\n\n\t// LastTransitionTime is the last time the condition transitioned from on one status to another\n\tLastTransitionTime metav1.Time `json:\"lastTransitionTime,omitempty\"`\n\n\t// message is a human-readable explaination containing details\n\tMessage string `json:\"message,omitempty\"`\n}\n```\n\n```go\nfunc (in *SimpleAutoScalerCondition) DeepCopy() *SimpleAutoScalerCondition\n```\nDeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SimpleAutoScalerCondition.\n\n```go\nfunc (in *SimpleAutoScalerCondition) DeepCopyInto(out *SimpleAutoScalerCondition)\n```\nDeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\n\n```go\ntype SimpleAutoScalerConditionType string\n```\n\n```go\nconst (\n\t// scaler match all resource and write it in status.resources\n\tMatchedAllResourceCondition SimpleAutoScalerConditionType = \"MatchedAllResource\"\n\t// checking policy filed and write it into currentFieldValue\n\tCheckPolicyFieldValueCondition SimpleAutoScalerConditionType = \"CheckPolicyFieldValue\"\n\t// checking policy scaleFactorObject and read the object values and write into scaleFactor\n\tGetScaleFactorCondition SimpleAutoScalerConditionType = \"GetScaleFactor\"\n\t// checking the desiredFieldValue whether in minAllowd and maxAllowd and write into status\n\tUpdatedFieldCondition SimpleAutoScalerConditionType = \"UpdatedFieldCondition\"\n\t// the scale whether can update the object compare the downscaleWindow and upscaleWindow, if okay\n\t// set lastUpScaleTime and lastDownScaleTime\n\tEndCooldownCondition SimpleAutoScalerConditionType = \"EndCooldown\"\n\t// when all ready it will update the target resource\n\tUpdateTargetResourceCondition SimpleAutoScalerConditionType = \"UpdateTargetResource\"\n)\n```\n\n```go\ntype SimpleAutoScalerList struct {\n\tmetav1.TypeMeta `json:\",inline\"`\n\tmetav1.ListMeta `json:\"metadata,omitempty\"`\n\tItems           []SimpleAutoScaler `json:\"items\"`\n}\n```\nSimpleAutoScalerList contains a list of SimpleAutoScaler\n\n```go\nfunc (in *SimpleAutoScalerList) DeepCopy() *SimpleAutoScalerList\n```\nDeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SimpleAutoScalerList.\n\n```go\nfunc (in *SimpleAutoScalerList) DeepCopyInto(out *SimpleAutoScalerList)\n```\nDeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\n\n```go\nfunc (in *SimpleAutoScalerList) DeepCopyObject() runtime.Object\n```\nDeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.\n\n```go\ntype SimpleAutoScalerResources struct {\n\t// Target points to the scale controls resources\n\tTarget *autoscalingv1.CrossVersionObjectReference `json:\"target,omitempty\"`\n\t// record information of scale target\n\tResourceFields []ResourceStautsField `json:\"resourceFields,omitempty\"`\n}\n```\n\n```go\nfunc (in *SimpleAutoScalerResources) DeepCopy() *SimpleAutoScalerResources\n```\nDeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SimpleAutoScalerResources.\n\n```go\nfunc (in *SimpleAutoScalerResources) DeepCopyInto(out *SimpleAutoScalerResources)\n```\nDeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\n\n```go\ntype SimpleAutoScalerSpec struct {\n\n\t// TargetRef is container scale resources\n\tTargetRef *ScaleTargetResourceReference `json:\"targetRef\"`\n\n\t// Policy is description rules to the relate parameter and update field\n\tPolicy []ScaleResourcePolicy `json:\"policy,omitempty\"`\n}\n```\nSimpleAutoScalerSpec defines the desired state of SimpleAutoScaler\n\n```go\nfunc (in *SimpleAutoScalerSpec) DeepCopy() *SimpleAutoScalerSpec\n```\nDeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SimpleAutoScalerSpec.\n\n```go\nfunc (in *SimpleAutoScalerSpec) DeepCopyInto(out *SimpleAutoScalerSpec)\n```\nDeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\n\n```go\ntype SimpleAutoScalerStatus struct {\n\n\t// Conditions is set of conditions required for autoscaler to scale target\n\tConditions []SimpleAutoScalerCondition `json:\"conditions\"`\n\n\t// Resources which scaler select\n\tResources []SimpleAutoScalerResources `json:\"resources\"`\n}\n```\nSimpleAutoScalerStatus defines the observed state of SimpleAutoScaler\n\n```go\nfunc (s *SimpleAutoScalerStatus) AddCondition(condtype SimpleAutoScalerConditionType, err error)\n```\n\n```go\nfunc (s *SimpleAutoScalerStatus) AppendConditions(cond SimpleAutoScalerCondition)\n```\nspecial function\n\n```go\nfunc (in *SimpleAutoScalerStatus) DeepCopy() *SimpleAutoScalerStatus\n```\nDeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SimpleAutoScalerStatus.\n\n```go\nfunc (in *SimpleAutoScalerStatus) DeepCopyInto(out *SimpleAutoScalerStatus)\n```\nDeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\n\n```go\nfunc (s *SimpleAutoScalerStatus) GetConditionsStatus(cond SimpleAutoScalerConditionType) string\n```\nfour condition status, true, false, unknow and nil string\n\n```go\ntype UpdateMode string\n```\nUpdateMode controls whether can upscale or downscale\n\n```go\nconst (\n\t// default is update can upscale and downsale\n\tUpdateModeDefault UpdateMode = \"default\"\n\t// onlyUpScale is update only for upscale\n\tUpdateModeOnlyUpscale UpdateMode = \"onlyUpScale\"\n\t// onlyDownScale is update only for upscale\n\tUpdateModeOnlyDownscale UpdateMode = \"onlyDownScale\"\n)\n```\n\n","path":"github.com/tensorbytes/simplescale/api/v1alpha1","name":"v1alpha1","synopsis":"Package v1alpha1 contains API Schema definitions for the autoscale v1alpha1 API group +kubebuilder:object:generate=true +groupName=autoscale.scale.shikanon.com","isRedistributable":true}
