Documentation ¶
Overview ¶
Package v1alpha1 is the v1alpha1 version of the API. +groupName=autopilot.libopenstorage.org
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type ActionApprovalState
- type ActionPreviewObjectMetadata
- type AutopilotActionApproval
- type AutopilotActionPreview
- type AutopilotRule
- type AutopilotRuleConditionType
- type AutopilotRuleList
- type AutopilotRuleObject
- type AutopilotRuleObjectList
- type AutopilotRuleObjectSpec
- type AutopilotRuleObjectStatus
- type AutopilotRuleObjectStatusItem
- type AutopilotRuleSpec
- type AutopilotRuleStatusType
- type EnforcementType
- type LabelSelectorOperator
- type LabelSelectorRequirement
- type RuleAction
- type RuleConditions
- type RuleObjectSelector
- type RuleState
- type RuleStatusObjectKey
Constants ¶
const ( // AutopilotRuleResourceName is the name of the singular AutopilotRule objects AutopilotRuleResourceName = "autopilotrule" // AutopilotRuleObjectResourceName is the name of the singular AutopilotObject objects AutopilotRuleObjectResourceName = "autopilotruleobject" // AutopilotRuleResourceShortName is the short name for AutopilotRule objects AutopilotRuleResourceShortName = "ar" // AutopilotRuleObjectResourceShortName is the short name for AutopilotRuleObject objects AutopilotRuleObjectResourceShortName = "aro" // AutopilotRuleResourcePlural is the name of the plural AutopilotRule objects AutopilotRuleResourcePlural = "autopilotrules" // AutopilotRuleObjectResourcePlural is the name of the plural AutopilotRuleObject objects AutopilotRuleObjectResourcePlural = "autopilotruleobjects" // LabelSelectorOpIn is operator where the key must have one of the values LabelSelectorOpIn LabelSelectorOperator = "In" // LabelSelectorOpNotIn is operator where the key must not have any of the values LabelSelectorOpNotIn LabelSelectorOperator = "NotIn" // LabelSelectorOpExists is operator where the key must exist LabelSelectorOpExists LabelSelectorOperator = "Exists" // LabelSelectorOpDoesNotExist is operator where the key must not exist LabelSelectorOpDoesNotExist LabelSelectorOperator = "DoesNotExist" // LabelSelectorOpGt is operator where the key must be greater than the values LabelSelectorOpGt LabelSelectorOperator = "Gt" // LabelSelectorOpGtEq is operator where the key must be greater than or equal to the values LabelSelectorOpGtEq LabelSelectorOperator = "GtEq" // LabelSelectorOpLt is operator where the key must be less than the values LabelSelectorOpLt LabelSelectorOperator = "Lt" // LabelSelectorOpLtEq is operator where the key must be less than or equal to the values LabelSelectorOpLtEq LabelSelectorOperator = "LtEq" // LabelSelectorOpNotInRange will compare if the value is not in the range given by first 2 values LabelSelectorOpNotInRange LabelSelectorOperator = "NotInRange" // LabelSelectorOpInRange will compare if the value is in the range given by first 2 values LabelSelectorOpInRange LabelSelectorOperator = "InRange" // ApprovalStatePending means the action has not been yet approved ApprovalStatePending ActionApprovalState = "pending" // ApprovalStateApproved means the action has been approved ApprovalStateApproved ActionApprovalState = "approved" // ApprovalStateDeclined means the action has been declined ApprovalStateDeclined ActionApprovalState = "declined" )
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: autopilot.GroupName, Version: autopilot.Version} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} // AddToScheme adds all the registered types to the scheme AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type ActionApprovalState ¶ added in v1.3.0
type ActionApprovalState string
ActionApprovalState is the enum for approval states that an object can take for it's actions
type ActionPreviewObjectMetadata ¶ added in v1.3.0
type ActionPreviewObjectMetadata struct { meta.ObjectMeta // Type is the object type Type string `json:"type,omitempty"` }
ActionPreviewObjectMetadata is metadata for an object inside an action preview
func (*ActionPreviewObjectMetadata) DeepCopy ¶ added in v1.3.0
func (in *ActionPreviewObjectMetadata) DeepCopy() *ActionPreviewObjectMetadata
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionPreviewObjectMetadata.
func (*ActionPreviewObjectMetadata) DeepCopyInto ¶ added in v1.3.0
func (in *ActionPreviewObjectMetadata) DeepCopyInto(out *ActionPreviewObjectMetadata)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AutopilotActionApproval ¶ added in v1.3.0
type AutopilotActionApproval struct { // Annotations are annotation for the action approval Annotations map[string]string `json:"annotations,omitempty"` // State is the current approval state of the action approval State ActionApprovalState `json:"state,omitempty"` // Action is the action that needs/needed approval Action AutopilotActionPreview `json:"action,omitempty"` }
AutopilotActionApproval stores the state related to approval of an action
func (*AutopilotActionApproval) DeepCopy ¶ added in v1.3.0
func (in *AutopilotActionApproval) DeepCopy() *AutopilotActionApproval
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutopilotActionApproval.
func (*AutopilotActionApproval) DeepCopyInto ¶ added in v1.3.0
func (in *AutopilotActionApproval) DeepCopyInto(out *AutopilotActionApproval)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AutopilotActionPreview ¶ added in v1.3.0
type AutopilotActionPreview struct { // ObjectMetadata is the metadata for the object on which the action will be performed ObjectMetadata ActionPreviewObjectMetadata `json:"objectMetadata,omitempty"` RuleAction // ExpectedResult is a user friendly description of the outcome of executing the action ExpectedResult string `json:"expectedResult,omitempty"` }
AutopilotActionPreview is a preview of an action and the expected result of it before it gets executed
func (*AutopilotActionPreview) DeepCopy ¶ added in v1.3.0
func (in *AutopilotActionPreview) DeepCopy() *AutopilotActionPreview
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutopilotActionPreview.
func (*AutopilotActionPreview) DeepCopyInto ¶ added in v1.3.0
func (in *AutopilotActionPreview) DeepCopyInto(out *AutopilotActionPreview)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AutopilotRule ¶
type AutopilotRule struct { meta.TypeMeta `json:",inline"` meta.ObjectMeta `json:"metadata,omitempty"` Spec AutopilotRuleSpec `json:"spec"` }
AutopilotRule represents pairing with other clusters
func (*AutopilotRule) DeepCopy ¶
func (in *AutopilotRule) DeepCopy() *AutopilotRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutopilotRule.
func (*AutopilotRule) DeepCopyInto ¶
func (in *AutopilotRule) DeepCopyInto(out *AutopilotRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AutopilotRule) DeepCopyObject ¶
func (in *AutopilotRule) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AutopilotRuleConditionType ¶
type AutopilotRuleConditionType string
AutopilotRuleConditionType defines the type of a condition in a rule
const ( // RuleConditionMetrics is a monitoring type of condition in a rule RuleConditionMetrics AutopilotRuleConditionType = "monitoring" )
type AutopilotRuleList ¶
type AutopilotRuleList struct { meta.TypeMeta `json:",inline"` meta.ListMeta `json:"metadata,omitempty"` Items []AutopilotRule `json:"items"` }
AutopilotRuleList is a list of AutopilotRules in Kubernetes
func (*AutopilotRuleList) DeepCopy ¶
func (in *AutopilotRuleList) DeepCopy() *AutopilotRuleList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutopilotRuleList.
func (*AutopilotRuleList) DeepCopyInto ¶
func (in *AutopilotRuleList) DeepCopyInto(out *AutopilotRuleList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AutopilotRuleList) DeepCopyObject ¶
func (in *AutopilotRuleList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AutopilotRuleObject ¶ added in v1.3.0
type AutopilotRuleObject struct { meta.TypeMeta `json:",inline"` meta.ObjectMeta `json:"metadata,omitempty"` // Spec is the spec of the autopilot rule object Spec AutopilotRuleObjectSpec `json:"spec,omitempty"` // Status is the status of an object monitored by an autopilot rule Status AutopilotRuleObjectStatus `json:"status,omitempty"` }
AutopilotRuleObject represents a particular object that is being monitored by autopilot.
func (*AutopilotRuleObject) DeepCopy ¶ added in v1.3.0
func (in *AutopilotRuleObject) DeepCopy() *AutopilotRuleObject
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutopilotRuleObject.
func (*AutopilotRuleObject) DeepCopyInto ¶ added in v1.3.0
func (in *AutopilotRuleObject) DeepCopyInto(out *AutopilotRuleObject)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AutopilotRuleObject) DeepCopyObject ¶ added in v1.3.0
func (in *AutopilotRuleObject) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AutopilotRuleObjectList ¶ added in v1.3.0
type AutopilotRuleObjectList struct { meta.TypeMeta `json:",inline"` meta.ListMeta `json:"metadata,omitempty"` Items []AutopilotRuleObject `json:"items"` }
AutopilotRuleObjectList is a list of AutopilotRule objects in Kubernetes
func (*AutopilotRuleObjectList) DeepCopy ¶ added in v1.3.0
func (in *AutopilotRuleObjectList) DeepCopy() *AutopilotRuleObjectList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutopilotRuleObjectList.
func (*AutopilotRuleObjectList) DeepCopyInto ¶ added in v1.3.0
func (in *AutopilotRuleObjectList) DeepCopyInto(out *AutopilotRuleObjectList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AutopilotRuleObjectList) DeepCopyObject ¶ added in v1.3.0
func (in *AutopilotRuleObjectList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AutopilotRuleObjectSpec ¶ added in v1.3.0
type AutopilotRuleObjectSpec struct { // ActionApprovals allows users to set the approval states for actions pending for the object ActionApprovals []*AutopilotActionApproval `json:"actionApprovals,omitempty"` }
AutopilotRuleObjectSpec represents the spec of the autopilot object
func (*AutopilotRuleObjectSpec) DeepCopy ¶ added in v1.3.0
func (in *AutopilotRuleObjectSpec) DeepCopy() *AutopilotRuleObjectSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutopilotRuleObjectSpec.
func (*AutopilotRuleObjectSpec) DeepCopyInto ¶ added in v1.3.0
func (in *AutopilotRuleObjectSpec) DeepCopyInto(out *AutopilotRuleObjectSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AutopilotRuleObjectStatus ¶ added in v1.3.0
type AutopilotRuleObjectStatus struct { // Items contains list of recent status items for an autopilot object Items []*AutopilotRuleObjectStatusItem `json:"items,omitempty"` }
AutopilotRuleObjectStatus represents the status of an autopilot object
func (*AutopilotRuleObjectStatus) DeepCopy ¶ added in v1.3.0
func (in *AutopilotRuleObjectStatus) DeepCopy() *AutopilotRuleObjectStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutopilotRuleObjectStatus.
func (*AutopilotRuleObjectStatus) DeepCopyInto ¶ added in v1.3.0
func (in *AutopilotRuleObjectStatus) DeepCopyInto(out *AutopilotRuleObjectStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AutopilotRuleObjectStatusItem ¶ added in v1.3.0
type AutopilotRuleObjectStatusItem struct { // LastProcessTimestamp was the last time the object was processed LastProcessTimestamp meta.Time `json:"lastProcessTimestamp"` // State of the object State RuleState `json:"state"` // Message is the user friendly status Message string `json:"message"` }
AutopilotRuleObjectStatusItem is a single status item of an autopilot object
func (*AutopilotRuleObjectStatusItem) DeepCopy ¶ added in v1.3.0
func (in *AutopilotRuleObjectStatusItem) DeepCopy() *AutopilotRuleObjectStatusItem
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutopilotRuleObjectStatusItem.
func (*AutopilotRuleObjectStatusItem) DeepCopyInto ¶ added in v1.3.0
func (in *AutopilotRuleObjectStatusItem) DeepCopyInto(out *AutopilotRuleObjectStatusItem)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AutopilotRuleSpec ¶
type AutopilotRuleSpec struct { // Weight defines the weight of the rule which allows to break the tie with other conflicting policies. A rule with // higher weight wins over one with lower weight. // (optional) Weight int64 `json:"weight,omitempty"` // PollInterval defined the interval in seconds at which the conditions for the // rule are queried from the monitoring provider PollInterval int64 `json:"pollInterval,omitempty"` // Enforcement specifies the enforcement type for rule. Can take values: required or preferred. // (optional) Enforcement EnforcementType `json:"enforcement,omitempty"` // Selector allows to select the objects that are relevant with this rule using label selection Selector RuleObjectSelector `json:"selector"` // NamespaceSelector allows to select namespaces affecting the rule by labels:w NamespaceSelector RuleObjectSelector `json:"namespaceSelector"` // Conditions are the conditions to check on the rule objects Conditions RuleConditions `json:"conditions"` // Actions are the actions to run for the rule when the conditions are met Actions []*RuleAction `json:"actions"` // ActionsCoolDownPeriod is the duration in seconds for which autopilot will not // re-trigger any actions once they have been executed. ActionsCoolDownPeriod int64 `json:"actionsCoolDownPeriod,omitempty"` }
AutopilotRuleSpec is the spec to create the cluster pair
func (*AutopilotRuleSpec) DeepCopy ¶
func (in *AutopilotRuleSpec) DeepCopy() *AutopilotRuleSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutopilotRuleSpec.
func (*AutopilotRuleSpec) DeepCopyInto ¶
func (in *AutopilotRuleSpec) DeepCopyInto(out *AutopilotRuleSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AutopilotRuleStatusType ¶
type AutopilotRuleStatusType string
AutopilotRuleStatusType is the type for rule statuses
const ( // AutopilotRuleConditonMet is for when the conditions in rule are met AutopilotRuleConditonMet AutopilotRuleStatusType = "ConditionMet" // AutopilotRuleActionFailed is when an action for a rule has failed AutopilotRuleActionFailed AutopilotRuleStatusType = "ActionFailed" // AutopilotRuleActionTriggered is when an action for a rule has triggerred AutopilotRuleActionTriggered AutopilotRuleStatusType = "ActionTriggered" // AutopilotRuleActionSuccessful is when an action for a rule is successful AutopilotRuleActionSuccessful AutopilotRuleStatusType = "ActionSuccessful" )
type EnforcementType ¶
type EnforcementType string
EnforcementType Defines the types of enforcement on the given policy
const ( // ApprovalRequired specifies that all actions for the rule will require an approval ApprovalRequired EnforcementType = "approvalRequired" )
type LabelSelectorOperator ¶
type LabelSelectorOperator string
LabelSelectorOperator is the set of operators that can be used in a selector requirement.
type LabelSelectorRequirement ¶
type LabelSelectorRequirement struct { // key is the label key that the selector applies to. // +patchMergeKey=key // +patchStrategy=merge Key string `json:"key,omitempty"` // KeyAlias is an alias known to autopilot that can be used instead of supplying the key // To view supported aliases, refer to documentation at https://docs.portworx.com/portworx-install-with-kubernetes/autopilot/ KeyAlias string `json:"keyAlias,omitempty"` // operator represents a key's relationship to a set of values. // Valid operators are In, NotIn, Exists, DoesNotExist, Lt and Gt. Operator LabelSelectorOperator `json:"operator"` // values is an array of string values. If the operator is In or NotIn, // the values array must be non-empty. If the operator is Exists or DoesNotExist, // the values array must be empty. This array is replaced during a strategic // merge patch. // +optional Values []string `json:"values"` }
LabelSelectorRequirement is a selector that contains values, a key, and an operator that relates the key and values.
func (*LabelSelectorRequirement) DeepCopy ¶
func (in *LabelSelectorRequirement) DeepCopy() *LabelSelectorRequirement
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LabelSelectorRequirement.
func (*LabelSelectorRequirement) DeepCopyInto ¶
func (in *LabelSelectorRequirement) DeepCopyInto(out *LabelSelectorRequirement)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RuleAction ¶
type RuleAction struct { // ObjectName is the name of the rule Name string `json:"name"` // Params are the opaque paramters that will be used for the above action Params map[string]string `json:"params"` }
RuleAction defines an action for the rule
func (*RuleAction) DeepCopy ¶
func (in *RuleAction) DeepCopy() *RuleAction
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleAction.
func (*RuleAction) DeepCopyInto ¶
func (in *RuleAction) DeepCopyInto(out *RuleAction)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RuleConditions ¶
type RuleConditions struct { // Expressions are the actual rule conditions Expressions []*LabelSelectorRequirement `json:"expressions,omitempty"` // For is the duration in seconds for which the conditions must hold true For int64 `json:"for,omitempty"` // RequiredMatches is the number of expressions above that should match for the RuleCondition to be considered // as triggered. Default is 0, which means all expressions need to match RequiredMatches uint64 `json:"requiredMatches,omitempty"` // Type is the condition type // If not provided, the controller for the CRD will pick the default type Type AutopilotRuleConditionType `json:"type,omitempty"` // Provider is an optional provider for the above condition type // If not provided, the controller for the CRD will pick the default provider Provider string `json:"provider,omitempty"` }
RuleConditions defines the conditions for the rule
func (*RuleConditions) DeepCopy ¶
func (in *RuleConditions) DeepCopy() *RuleConditions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleConditions.
func (*RuleConditions) DeepCopyInto ¶
func (in *RuleConditions) DeepCopyInto(out *RuleConditions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RuleObjectSelector ¶
type RuleObjectSelector struct { // LabelSelector selects the rule objects meta.LabelSelector }
RuleObjectSelector defines an object for the rule
func (*RuleObjectSelector) DeepCopy ¶
func (in *RuleObjectSelector) DeepCopy() *RuleObjectSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleObjectSelector.
func (*RuleObjectSelector) DeepCopyInto ¶
func (in *RuleObjectSelector) DeepCopyInto(out *RuleObjectSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RuleState ¶ added in v1.3.0
type RuleState string
RuleState is the type for the state of a rule
const ( // RuleStateInit is the initial state of the rule where monitorign has not yet begin RuleStateInit RuleState = "Initializing" // RuleStateNormal is when the rule is being monitored and is in normal state RuleStateNormal RuleState = "Normal" // RuleStateTriggered is when the rule has it's conditions met RuleStateTriggered RuleState = "Triggered" // RuleStateActionAwaitingApproval is when a rule is waiting approval from a user to proceed with it's actions RuleStateActionAwaitingApproval RuleState = "ActionAwaitingApproval" // RuleStateActiveActionsPending is when the rule has it's conditions met but the actions are // not being performed yet. RuleStateActiveActionsPending RuleState = "ActiveActionsPending" // RuleStateActiveActionsTaken is when the rule has it's actions already taken // but still hasn't moved out of active status RuleStateActiveActionsTaken RuleState = "ActiveActionsTaken" // RuleStateActionsDeclined is when action was intentionally declined by autopilot RuleStateActionsDeclined RuleState = "ActionsDeclined" // RuleStateActiveActionsInProgress is when the rule is active and has met its // conditions and there is an on going action on the object. RuleStateActiveActionsInProgress RuleState = "ActiveActionsInProgress" )
type RuleStatusObjectKey ¶ added in v1.3.0
type RuleStatusObjectKey string
RuleStatusObjectKey is a type to use as key for rule object statuses