Documentation ¶
Overview ¶
Package v1 is the v1 version of the API.
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type AzureResource
- type AzureResourceList
- type AzureResourceType
- type ConditionScheduleType
- type ConditionType
- type CronSchedule
- type ResourcesSpec
- type ScheduleStatus
- type SchedulesSpec
- type StandSchedulePolicy
- type StandSchedulePolicyList
- type StandSchedulePolicySpec
- type StandSchedulePolicyStatus
- func (in *StandSchedulePolicyStatus) DeepCopy() *StandSchedulePolicyStatus
- func (in *StandSchedulePolicyStatus) DeepCopyInto(out *StandSchedulePolicyStatus)
- func (in *StandSchedulePolicyStatus) GetScheduleStatus(st ConditionScheduleType) *ScheduleStatus
- func (in *StandSchedulePolicyStatus) UpdateConditions(conditions []StatusCondition)
- type StatusCondition
Constants ¶
const (
AnnotationPrefix = "standschedule." + GroupName
)
const GroupName = "automation.dodois.io"
GroupName specifies the group name used to register the objects.
Variables ¶
var ( // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. SchemeBuilder runtime.SchemeBuilder // Depreciated: use Install instead AddToScheme = localSchemeBuilder.AddToScheme Install = localSchemeBuilder.AddToScheme )
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1"}
GroupVersion specifies the group and the version used to register the objects.
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type AzureResource ¶
type AzureResource struct { // Type defines one of supported azure resource types. Type AzureResourceType `json:"type"` // ResourceGroupName defines resource group name for resource. ResourceGroupName string `json:"resourceGroupName"` // ResourceNameFilter defines regex filter for resource. ResourceNameFilter string `json:"resourceNameFilter"` // Priority specifies order in which resources will be started or shutdowned. Priority int64 `json:"priority"` }
func (*AzureResource) DeepCopy ¶
func (in *AzureResource) DeepCopy() *AzureResource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureResource.
func (*AzureResource) DeepCopyInto ¶
func (in *AzureResource) DeepCopyInto(out *AzureResource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AzureResourceList ¶
type AzureResourceList []AzureResource
func (AzureResourceList) DeepCopy ¶
func (in AzureResourceList) DeepCopy() AzureResourceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureResourceList.
func (AzureResourceList) DeepCopyInto ¶
func (in AzureResourceList) DeepCopyInto(out *AzureResourceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (AzureResourceList) Len ¶
func (l AzureResourceList) Len() int
func (AzureResourceList) Less ¶
func (l AzureResourceList) Less(i, j int) bool
func (AzureResourceList) Swap ¶
func (l AzureResourceList) Swap(i, j int)
type AzureResourceType ¶
type AzureResourceType string
const ( AzureResourceManagedMySQL AzureResourceType = "mysql" AzureResourceVirtualMachine AzureResourceType = "vm" )
type ConditionScheduleType ¶
type ConditionScheduleType string
const ( // StatusStartup means that current status for startup operation StatusStartup ConditionScheduleType = "Startup" // StatusShutdown means that current status for shutdown operation StatusShutdown ConditionScheduleType = "Shutdown" )
type ConditionType ¶
type ConditionType string
const ( // ConditionScheduled means that policy actions are in progress. ConditionScheduled ConditionType = "Scheduled" // ConditionCompleted means that policy actions completed and successful. ConditionCompleted ConditionType = "Completed" // ConditionFailed means that policy actions completed and failed. ConditionFailed ConditionType = "Failed" )
type CronSchedule ¶
type CronSchedule struct { // Cron is a cron format schedule. Cron string `json:"cron"` // Override is an override as time string (formatted as FRC3339) // +optional Override string `json:"override,omitempty"` }
CronSchedule defines schedule (as cron) and optional override (as time string).
func (*CronSchedule) DeepCopy ¶
func (in *CronSchedule) DeepCopy() *CronSchedule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronSchedule.
func (*CronSchedule) DeepCopyInto ¶
func (in *CronSchedule) DeepCopyInto(out *CronSchedule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourcesSpec ¶
type ResourcesSpec struct { // Azure contains an array of related azure resources. Azure AzureResourceList `json:"azure,omitempty"` }
func (*ResourcesSpec) DeepCopy ¶
func (in *ResourcesSpec) DeepCopy() *ResourcesSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcesSpec.
func (*ResourcesSpec) DeepCopyInto ¶
func (in *ResourcesSpec) DeepCopyInto(out *ResourcesSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ScheduleStatus ¶
type ScheduleStatus struct { // Status defines how schedule finished Status string `json:"status,omitempty"` }
func (*ScheduleStatus) DeepCopy ¶
func (in *ScheduleStatus) DeepCopy() *ScheduleStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScheduleStatus.
func (*ScheduleStatus) DeepCopyInto ¶
func (in *ScheduleStatus) DeepCopyInto(out *ScheduleStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ScheduleStatus) UpdateFromConditions ¶
func (in *ScheduleStatus) UpdateFromConditions(st ConditionScheduleType, conditions []StatusCondition)
type SchedulesSpec ¶
type SchedulesSpec struct { // Startup defines schedule for startup. Startup CronSchedule `json:"startup"` // Shutdown defines schedule for shutdown. Shutdown CronSchedule `json:"shutdown"` }
SchedulesSpec defines supported schedules for policy.
func (*SchedulesSpec) DeepCopy ¶
func (in *SchedulesSpec) DeepCopy() *SchedulesSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchedulesSpec.
func (*SchedulesSpec) DeepCopyInto ¶
func (in *SchedulesSpec) DeepCopyInto(out *SchedulesSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StandSchedulePolicy ¶
type StandSchedulePolicy struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Spec declares schedule behavior. Spec StandSchedulePolicySpec `json:"spec"` // Status contains schedule runtime data. // +optional Status StandSchedulePolicyStatus `json:"status,omitempty"` }
StandSchedulePolicy declares policy for stand startup/shutdown schedules
func (*StandSchedulePolicy) DeepCopy ¶
func (in *StandSchedulePolicy) DeepCopy() *StandSchedulePolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StandSchedulePolicy.
func (*StandSchedulePolicy) DeepCopyInto ¶
func (in *StandSchedulePolicy) DeepCopyInto(out *StandSchedulePolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*StandSchedulePolicy) DeepCopyObject ¶
func (in *StandSchedulePolicy) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type StandSchedulePolicyList ¶
type StandSchedulePolicyList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []StandSchedulePolicy `json:"items"` }
StandSchedulePolicyList is a list of StandSchedulePolicy resources
func (*StandSchedulePolicyList) DeepCopy ¶
func (in *StandSchedulePolicyList) DeepCopy() *StandSchedulePolicyList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StandSchedulePolicyList.
func (*StandSchedulePolicyList) DeepCopyInto ¶
func (in *StandSchedulePolicyList) DeepCopyInto(out *StandSchedulePolicyList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*StandSchedulePolicyList) DeepCopyObject ¶
func (in *StandSchedulePolicyList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type StandSchedulePolicySpec ¶
type StandSchedulePolicySpec struct { // TargetNamespaceFilter defines regex filter to match namespaces to process. TargetNamespaceFilter string `json:"targetNamespaceFilter"` // Schedules contains schedules spec. Schedules SchedulesSpec `json:"schedules"` // Resources contains external resources spec. // +optional Resources ResourcesSpec `json:"resources,omitempty"` }
StandSchedulePolicySpec is a spec for StandSchedulePolicy resource.
func (*StandSchedulePolicySpec) DeepCopy ¶
func (in *StandSchedulePolicySpec) DeepCopy() *StandSchedulePolicySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StandSchedulePolicySpec.
func (*StandSchedulePolicySpec) DeepCopyInto ¶
func (in *StandSchedulePolicySpec) DeepCopyInto(out *StandSchedulePolicySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*StandSchedulePolicySpec) GetSchedule ¶
func (in *StandSchedulePolicySpec) GetSchedule(st ConditionScheduleType) *CronSchedule
type StandSchedulePolicyStatus ¶
type StandSchedulePolicyStatus struct { // Conditions defines current service state of policy. Conditions []StatusCondition `json:"conditions,omitempty"` // Startup defines status of startup schedule Startup ScheduleStatus `json:"startup,omitempty"` // Shutdown defines status of shutdown schedule Shutdown ScheduleStatus `json:"shutdown,omitempty"` }
StandSchedulePolicyStatus is a status for StandSchedulePolicy resource.
func (*StandSchedulePolicyStatus) DeepCopy ¶
func (in *StandSchedulePolicyStatus) DeepCopy() *StandSchedulePolicyStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StandSchedulePolicyStatus.
func (*StandSchedulePolicyStatus) DeepCopyInto ¶
func (in *StandSchedulePolicyStatus) DeepCopyInto(out *StandSchedulePolicyStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*StandSchedulePolicyStatus) GetScheduleStatus ¶
func (in *StandSchedulePolicyStatus) GetScheduleStatus(st ConditionScheduleType) *ScheduleStatus
func (*StandSchedulePolicyStatus) UpdateConditions ¶
func (in *StandSchedulePolicyStatus) UpdateConditions(conditions []StatusCondition)
type StatusCondition ¶
type StatusCondition struct { // Type is the type of the condition. Type ConditionType `json:"type"` // Status is the status of the condition. // Can be Startup or Shutdown. Status ConditionScheduleType `json:"status"` // Last time the condition transitioned from one status to another. // +optional LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` // Unique, one-word, CamelCase reason for the condition's last transition. // +optional Reason string `json:"reason,omitempty"` // Human-readable message indicating details about last transition. // +optional Message string `json:"message,omitempty"` }
func (*StatusCondition) DeepCopy ¶
func (in *StatusCondition) DeepCopy() *StatusCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatusCondition.
func (*StatusCondition) DeepCopyInto ¶
func (in *StatusCondition) DeepCopyInto(out *StatusCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.