Documentation ¶
Overview ¶
Package apps is the internal version of the API.
Index ¶
- Constants
- Variables
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type Chain
- type ChainList
- type ChainSpec
- type ChainStatus
- type Condition
- type ConditionSeverity
- type ConditionType
- type Conditions
- type LocalObjectReference
- type Miner
- type MinerAddress
- type MinerAddressType
- type MinerAddresses
- type MinerList
- type MinerPhase
- type MinerSet
- type MinerSetDeletePolicy
- type MinerSetList
- type MinerSetSpec
- type MinerSetStatus
- type MinerSpec
- type MinerStatus
- type MinerTemplateSpec
- type ObjectMeta
- type PodInfo
Constants ¶
const ( // MinerAnnotation is the annotation set on pods identifying the miner the pod belongs to. MinerAnnotation = "apps.onex.io/miner" // OwnerKindAnnotation is the annotation set on pods identifying the owner kind. OwnerKindAnnotation = "apps.onex.io/owner-kind" // OwnerNameAnnotation is the annotation set on pods identifying the owner name. OwnerNameAnnotation = "apps.onex.io/owner-name" // DisableMinerCreate is an annotation that can be used to signal a MinerSet to stop creating new miners. // It is utilized in the OnDelete MinerSetStrategy to allow the MinerSet controller to scale down // older MinerSets when Miners are deleted and add the new replicas to the latest MinerSet. DisableMinerCreate = "apps.onex.io/disable-miner-create" // DeleteMinerAnnotation marks control plane and worker nodes that will be given priority for deletion // when KCP or a minerset scales down. This annotation is given top priority on all delete policies. DeleteMinerAnnotation = "apps.onex.io/delete-miner" )
const ( // MinerPhasePending is the first state a Miner is assigned by // Cluster API Miner controller after being created. MinerPhasePending = MinerPhase("Pending") // MinerPhaseProvisioning is the state when the // Miner infrastructure is being created. MinerPhaseProvisioning = MinerPhase("Provisioning") // MinerPhaseProvisioned is the state when its // infrastructure has been created and configured. MinerPhaseProvisioned = MinerPhase("Provisioned") // MinerPhaseRunning is the Miner state when it has // become a Kubernetes Node in a Ready state. MinerPhaseRunning = MinerPhase("Running") // MinerPhaseDeleting is the Miner state when a delete // request has been sent to the API Server, // but its infrastructure has not yet been fully deleted. MinerPhaseDeleting = MinerPhase("Deleting") // MinerPhaseDeleted is the Miner state when the object // and the related infrastructure is deleted and // ready to be garbage collected by the API Server. MinerPhaseDeleted = MinerPhase("Deleted") // MinerPhaseFailed is the Miner state when the system // might require user intervention. MinerPhaseFailed = MinerPhase("Failed") // MinerPhaseUnknown is returned if the Miner state cannot be determined. MinerPhaseUnknown = MinerPhase("Unknown") )
const ( // AnnotationDeletionProtection is the key for the annotation used to enable deletion protection for resources. // When this annotation is present on a resource, the resource should not be deleted unless the annotation is removed. AnnotationDeletionProtection = "apps.onex.io/deletion-protection" )
const ( // ChainFinalizer is the finalizer used by the Chain controller to // clean up referenced template resources if necessary when a Chain is being deleted. ChainFinalizer = "chain.onex.io/finalizer" )
const GroupName = "apps.onex.io"
GroupName is the group name use in this package.
const (
// LabelMinerSet represents the label key used for identifying the miner set.
LabelMinerSet = "apps.onex.io/minerset"
)
const ( // MinerFinalizer is the finalizer used by the Miner controller to // clean up referenced template resources if necessary when a Miner is being deleted. MinerFinalizer = "miner.onex.io/finalizer" )
const ( // MinerSetFinalizer is the finalizer used by the MinerSet controller to // clean up referenced template resources if necessary when a MinerSet is being deleted. MinerSetFinalizer = "minerset.onex.io" )
Variables ¶
var ( // SchemeBuilder stores functions to add things to a scheme. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme applies all stored functions t oa scheme. AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
SchemeGroupVersion is group version used to register these objects.
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource.
Types ¶
type Chain ¶
type Chain struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior of the chain. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Spec ChainSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // Status is the most recently observed status of the Chain. // This data may be out of date by some window of time. // Populated by the system. // Read-only. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Status ChainStatus `json:"status,omitempty"` }
Chain is the Schema for the chains API.
func (*Chain) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Chain.
func (*Chain) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Chain) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ChainList ¶
type ChainList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Items is a list of schema objects. Items []Chain `json:"items" protobuf:"bytes,2,rep,name=items"` }
ChainList is a list of Chain objects.
func (*ChainList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChainList.
func (*ChainList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ChainList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ChainSpec ¶
type ChainSpec struct { // The display name of the chain. // +optional DisplayName string `json:"displayName,omitempty" protobuf:"bytes,1,opt,name=displayName"` // Genesis node machine configuration. // +optional MinerType string `json:"minerType,omitempty" protobuf:"bytes,2,opt,name=minerType"` // Image specify the blockchain node image. // +optional Image string `json:"image,omitempty" protobuf:"bytes,1,opt,name=image"` // Minimum number of seconds for the miners to mine a block. // +optional MinMineIntervalSeconds int32 // Default bootstrap OneX's Genesis account with 1M TBB tokens. // This field is automatic generated by OneX, you should not set this field. // +optional BootstrapAccount *string `json:"bootstrapAccount,omitempty" protobuf:"bytes,3,opt,name=bootstrapAccount"` }
ChainSpec defines the desired state of Chain.
func (*ChainSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChainSpec.
func (*ChainSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ChainStatus ¶
type ChainStatus struct { // +optional ConfigMapRef *LocalObjectReference `json:"configMapRef,omitempty"` // +optional MinerRef *LocalObjectReference `json:"minerRef,omitempty"` // ObservedGeneration is the latest generation observed by the controller. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` // Conditions defines the current state of the Chain // +optional Conditions Conditions `json:"conditions,omitempty"` }
ChainStatus defines the observed state of Chain.
func (*ChainStatus) DeepCopy ¶
func (in *ChainStatus) DeepCopy() *ChainStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChainStatus.
func (*ChainStatus) DeepCopyInto ¶
func (in *ChainStatus) DeepCopyInto(out *ChainStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Condition ¶
type Condition struct { // Type of condition in CamelCase or in foo.example.com/CamelCase. // Many .condition.type values are consistent across resources like Available, but because arbitrary conditions // can be useful (see .node.status.conditions), the ability to deconflict is important. Type ConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=ConditionType"` // Status of the condition, one of True, False, Unknown. Status core.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"` // Severity provides an explicit classification of Reason code, so the users or machines can immediately // understand the current situation and act accordingly. // The Severity field MUST be set only when Status=False. // +optional Severity ConditionSeverity `json:"severity" protobuf:"bytes,3,opt,name=severity,casttype=ConditionSeverity"` // Last time the condition transitioned from one status to another. // This should be when the underlying condition changed. If that is not known, then using the time when // the API field changed is acceptable. LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"` // The reason for the condition's last transition in CamelCase. // The specific API may choose whether or not this field is considered a guaranteed API. // This field may not be empty. // +optional Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"` // A human readable message indicating details about the transition. // This field may be empty. // +optional Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"` }
Condition defines an observation of a cloud miner resource operational state.
func (*Condition) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
func (*Condition) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConditionSeverity ¶
type ConditionSeverity string
ConditionSeverity expresses the severity of a Condition Type failing.
const ( // ConditionSeverityError specifies that a condition with `Status=False` is an error. ConditionSeverityError ConditionSeverity = "Error" // ConditionSeverityWarning specifies that a condition with `Status=False` is a warning. ConditionSeverityWarning ConditionSeverity = "Warning" // ConditionSeverityInfo specifies that a condition with `Status=False` is informative. ConditionSeverityInfo ConditionSeverity = "Info" // ConditionSeverityNone should apply only to conditions with `Status=True`. ConditionSeverityNone ConditionSeverity = "" )
type Conditions ¶
type Conditions []Condition
Conditions provide observations of the operational state of a cloud miner resource.
func (Conditions) DeepCopy ¶
func (in Conditions) DeepCopy() Conditions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Conditions.
func (Conditions) DeepCopyInto ¶
func (in Conditions) DeepCopyInto(out *Conditions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalObjectReference ¶
type LocalObjectReference struct { // Name of the referent. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names // TODO: Add other useful fields. apiVersion, kind, uid? // +optional Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` }
LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.
func (*LocalObjectReference) DeepCopy ¶
func (in *LocalObjectReference) DeepCopy() *LocalObjectReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalObjectReference.
func (*LocalObjectReference) DeepCopyInto ¶
func (in *LocalObjectReference) DeepCopyInto(out *LocalObjectReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Miner ¶
type Miner struct { metav1.TypeMeta // Standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta // Specification of the desired behavior of the miner. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Spec MinerSpec // Most recently observed status of the miner. // This data may not be up to date. // Populated by the system. // Read-only. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Status MinerStatus }
Miner is the Schema for the miners API.
func (*Miner) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Miner.
func (*Miner) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Miner) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Miner) GetConditions ¶
func (m *Miner) GetConditions() Conditions
GetConditions returns the set of conditions for this object.
func (*Miner) SetConditions ¶
func (m *Miner) SetConditions(conditions Conditions)
SetConditions sets the conditions on this object.
type MinerAddress ¶
type MinerAddress struct { // Miner address type, one of Hostname, ExternalIP or InternalIP. Type MinerAddressType `json:"type"` // The machine address. Address string `json:"address"` }
MinerAddress contains information for the miner's address.
func (*MinerAddress) DeepCopy ¶
func (in *MinerAddress) DeepCopy() *MinerAddress
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MinerAddress.
func (*MinerAddress) DeepCopyInto ¶
func (in *MinerAddress) DeepCopyInto(out *MinerAddress)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MinerAddressType ¶
type MinerAddressType string
MinerAddressType describes a valid MinerAddress type.
const ( MinerHostName MinerAddressType = "Hostname" MinerExternalIP MinerAddressType = "ExternalIP" MinerInternalIP MinerAddressType = "InternalIP" MinerExternalDNS MinerAddressType = "ExternalDNS" MinerInternalDNS MinerAddressType = "InternalDNS" )
Define the MinerAddressType constants.
type MinerAddresses ¶
type MinerAddresses []MinerAddress
MinerAddresses is a slice of MinerAddress items to be used by infrastructure providers.
func (MinerAddresses) DeepCopy ¶
func (in MinerAddresses) DeepCopy() MinerAddresses
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MinerAddresses.
func (MinerAddresses) DeepCopyInto ¶
func (in MinerAddresses) DeepCopyInto(out *MinerAddresses)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MinerList ¶
type MinerList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Items is a list of schema objects. Items []Miner `json:"items" protobuf:"bytes,2,rep,name=items"` }
MinerList is a list of Miner objects.
func (*MinerList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MinerList.
func (*MinerList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MinerList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MinerPhase ¶
type MinerPhase string
MinerPhase is a string representation of a Miner Phase.
This type is a high-level indicator of the status of the Miner as it is provisioned, from the API user’s perspective.
The value should not be interpreted by any software components as a reliable indication of the actual state of the Miner, and controllers should not use the Miner Phase field value when making decisions about what action to take.
Controllers should always look at the actual state of the Miner’s fields to make those decisions.
type MinerSet ¶
type MinerSet struct { metav1.TypeMeta `json:",inline"` // If the Labels of a MinerSet are empty, they are defaulted to // be the same as the Miner(s) that the MinerSet manages. // Standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // Spec defines the specification of the desired behavior of the MinerSet. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Spec MinerSetSpec `json:"spec,omitempty"` // Status is the most recently observed status of the MinerSet. // This data may be out of date by some window of time. // Populated by the system. // Read-only. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Status MinerSetStatus `json:"status,omitempty"` }
MinerSet ensures that a specified number of miners replicas are running at any given time.
func (*MinerSet) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MinerSet.
func (*MinerSet) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MinerSet) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MinerSetDeletePolicy ¶
type MinerSetDeletePolicy string
const ( // RandomMinerSetDeletePolicy prioritizes both Miners that have the annotation // "apps.onex.io/delete-miner=yes" and Miners that are unhealthy // (Status.ErrorReason or Status.ErrorMessage are set to a non-empty value). // Finally, it picks Miners at random to delete. RandomMinerSetDeletePolicy MinerSetDeletePolicy = "Random" // NewestMinerSetDeletePolicy prioritizes both Miners that have the annotation // "apps.onex.io/delete-miner=yes" and Miners that are unhealthy // (Status.ErrorReason or Status.ErrorMessage are set to a non-empty value). // It then prioritizes the newest Miners for deletion based on the Miner's CreationTimestamp. NewestMinerSetDeletePolicy MinerSetDeletePolicy = "Newest" // OldestMinerSetDeletePolicy prioritizes both Miners that have the annotation // "apps.onex.io/delete-miner=yes" and Miners that are unhealthy // (Status.ErrorReason or Status.ErrorMessage are set to a non-empty value). // It then prioritizes the oldest Miners for deletion based on the Miner's CreationTimestamp. OldestMinerSetDeletePolicy MinerSetDeletePolicy = "Oldest" )
type MinerSetList ¶
type MinerSetList struct { metav1.TypeMeta ` json:",inline"` // Standard list metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional metav1.ListMeta ` json:"metadata,omitempty"` // List of MinerSets. Items []MinerSet `json:"items"` }
MinerSetList contains a list of MinerSet.
func (*MinerSetList) DeepCopy ¶
func (in *MinerSetList) DeepCopy() *MinerSetList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MinerSetList.
func (*MinerSetList) DeepCopyInto ¶
func (in *MinerSetList) DeepCopyInto(out *MinerSetList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MinerSetList) DeepCopyObject ¶
func (in *MinerSetList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MinerSetSpec ¶
type MinerSetSpec struct { // Replicas is the number of desired replicas. // This is a pointer to distinguish between explicit zero and unspecified. // Defaults to 1. // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller // +optional Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"` // Selector is a label query over miners that should match the replica count. // Label keys and values that must match in order to be controlled by this MinerSet. // It must match the miner template's labels. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors Selector metav1.LabelSelector `json:"selector" protobuf:"bytes,2,opt,name=selector"` // Template is the object that describes the miner that will be created if // insufficient replicas are detected. // +optional Template MinerTemplateSpec `json:"template,omitempty" protobuf:"bytes,1,opt,name=template"` // The display name of the minerset. DisplayName string `json:"displayName,omitempty"` // DeletePolicy defines the policy used to identify miners to delete when downscaling. // Defaults to "Random". Valid values are "Random, "Newest", "Oldest" // +kubebuilder:validation:Enum=Random;Newest;Oldest // +optional DeletePolicy string `json:"deletePolicy,omitempty"` // Minimum number of seconds for which a newly created miner should be ready // without any of its component crashing, for it to be considered available. // Defaults to 0 (miner will be considered available as soon as it is ready) // +optional MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,4,opt,name=minReadySeconds"` // The maximum time in seconds for a deployment to make progress before it // is considered to be failed. The deployment controller will continue to // process failed deployments and a condition with a ProgressDeadlineExceeded // reason will be surfaced in the deployment status. Note that progress will // not be estimated during the time a deployment is paused. Defaults to 600s. ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty" protobuf:"varint,9,opt,name=progressDeadlineSeconds"` }
MinerSetSpec defines the desired state of MinerSet.
func (*MinerSetSpec) DeepCopy ¶
func (in *MinerSetSpec) DeepCopy() *MinerSetSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MinerSetSpec.
func (*MinerSetSpec) DeepCopyInto ¶
func (in *MinerSetSpec) DeepCopyInto(out *MinerSetSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MinerSetStatus ¶
type MinerSetStatus struct { // Replicas is the most recently observed number of replicas. Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"` // The number of miners that have labels matching the labels of the miner template of the minerset. // +optional FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty" protobuf:"varint,2,opt,name=fullyLabeledReplicas"` // readyReplicas is the number of miners targeted by this MinerSet with a Ready Condition. // +optional ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,3,opt,name=readyReplicas"` // The number of available replicas (ready for at least minReadySeconds) for this minerset. // +optional AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,4,opt,name=availableReplicas"` // ObservedGeneration reflects the generation of the most recently observed MinerSet. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,5,opt,name=observedGeneration"` // In the event that there is a terminal problem reconciling the // replicas, both FailureReason and FailureMessage will be set. FailureReason // will be populated with a succinct value suitable for miner // interpretation, while FailureMessage will contain a more verbose // string suitable for logging and human consumption. // // These fields should not be set for transitive errors that a // controller faces that are expected to be fixed automatically over // time (like service outages), but instead indicate that something is // fundamentally wrong with the MinerTemplate's spec or the configuration of // the miner controller, and that manual intervention is required. Examples // of terminal errors would be invalid combinations of settings in the // spec, values that are unsupported by the miner controller, or the // responsible miner controller itself being critically misconfigured. // // Any transient errors that occur during the reconciliation of Miners // can be added as events to the MinerSet object and/or logged in the // controller's output. // +optional FailureReason *cmerrors.MinerSetStatusError `json:"failureReason,omitempty"` // FailureMessage will be set in the event that there is a terminal problem // reconciling the MinerSet and will contain a more verbose string suitable // for logging and human consumption. // // This field should not be set for transitive errors that a controller // faces that are expected to be fixed automatically over // time (like service outages), but instead indicate that something is // fundamentally wrong with the MinerSet's spec or the configuration of // the controller, and that manual intervention is required. Examples // of terminal errors would be invalid combinations of settings in the // spec, values that are unsupported by the controller, or the // responsible controller itself being critically misconfigured. // // Any transient errors that occur during the reconciliation of MinerSets // can be added as events to the MinerSet object and/or logged in the // controller's output. // +optional FailureMessage *string `json:"failureMessage,omitempty"` // Represents the latest available observations of a miner set's current state. // +optional // +patchMergeKey=type // +patchStrategy=merge Conditions Conditions `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"` }
MinerSetStatus represents the current status of a MinerSet.
func (*MinerSetStatus) DeepCopy ¶
func (in *MinerSetStatus) DeepCopy() *MinerSetStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MinerSetStatus.
func (*MinerSetStatus) DeepCopyInto ¶
func (in *MinerSetStatus) DeepCopyInto(out *MinerSetStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MinerSpec ¶
type MinerSpec struct { // ObjectMeta will autopopulate the Pod created. Use this to // indicate what labels, annotations, name prefix, etc., should be used // when creating the Pod. // +optional ObjectMeta // The display name of the miner. // +optional DisplayName string // Miner machine configuration. // +optional MinerType string // +optional ChainName string // Restart policy for the miner. // One of Always, OnFailure, Never. // Default to Always. // +optional RestartPolicy core.RestartPolicy // PodDeletionTimeout defines how long the controller will attempt to delete the Pod that the Machine // hosts after the Machine is marked for deletion. A duration of 0 will retry deletion indefinitely. // Defaults to 10 seconds. // +optional PodDeletionTimeout *metav1.Duration }
MinerSpec defines the desired state of Miner.
func (*MinerSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MinerSpec.
func (*MinerSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MinerStatus ¶
type MinerStatus struct { // PodRef will point to the corresponding Pod if it exists. // +optional PodRef *core.ObjectReference // LastUpdated identifies when this status was last observed. // +optional LastUpdated *metav1.Time // FailureReason will be set in the event that there is a terminal problem // reconciling the Miner and will contain a succinct value suitable // for miner interpretation. // // This field should not be set for transitive errors that a controller // faces that are expected to be fixed automatically over // time (like service outages), but instead indicate that something is // fundamentally wrong with the Miner's spec or the configuration of // the controller, and that manual intervention is required. Examples // of terminal errors would be invalid combinations of settings in the // spec, values that are unsupported by the controller, or the // responsible controller itself being critically misconfigured. // // Any transient errors that occur during the reconciliation of Miners // can be added as events to the Miner object and/or logged in the // controller's output. // +optional FailureReason *cmerrors.MinerStatusError // FailureMessage will be set in the event that there is a terminal problem // reconciling the Miner and will contain a more verbose string suitable // for logging and human consumption. // // This field should not be set for transitive errors that a controller // faces that are expected to be fixed automatically over // time (like service outages), but instead indicate that something is // fundamentally wrong with the Miner's spec or the configuration of // the controller, and that manual intervention is required. Examples // of terminal errors would be invalid combinations of settings in the // spec, values that are unsupported by the controller, or the // responsible controller itself being critically misconfigured. // // Any transient errors that occur during the reconciliation of Miners // can be added as events to the Miner object and/or logged in the // controller's output. // +optional FailureMessage *string // Addresses is a list of addresses assigned to the miner. Queried from kind cluster, if available. // +optional // +patchMergeKey=type // +patchStrategy=merge Addresses MinerAddresses // Phase represents the current phase of miner actuation. // One of: Failed, Provisioning, Provisioned, Running, Deleting // This field is maintained by miner controller. // +optional Phase string // ObservedGeneration is the latest generation observed by the controller. // +optional ObservedGeneration int64 // Conditions defines the current state of the Miner // +optional Conditions Conditions }
MinerStatus defines the observed state of Miner.
func (*MinerStatus) DeepCopy ¶
func (in *MinerStatus) DeepCopy() *MinerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MinerStatus.
func (*MinerStatus) DeepCopyInto ¶
func (in *MinerStatus) DeepCopyInto(out *MinerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MinerStatus) GetTypedPhase ¶
func (m *MinerStatus) GetTypedPhase() MinerPhase
GetTypedPhase attempts to parse the Phase field and return the typed MinerPhase representation as described in `miner_phase_types.go`.
func (*MinerStatus) SetTypedPhase ¶
func (m *MinerStatus) SetTypedPhase(p MinerPhase)
SetTypedPhase sets the Phase field to the string representation of MinerPhase.
type MinerTemplateSpec ¶
type MinerTemplateSpec struct { // Standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior of the miner. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Spec MinerSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` }
MinerTemplateSpec describes the data needed to create a Miner from a template.
func (*MinerTemplateSpec) DeepCopy ¶
func (in *MinerTemplateSpec) DeepCopy() *MinerTemplateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MinerTemplateSpec.
func (*MinerTemplateSpec) DeepCopyInto ¶
func (in *MinerTemplateSpec) DeepCopyInto(out *MinerTemplateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ObjectMeta ¶
type ObjectMeta struct { // Map of string keys and values that can be used to organize and categorize // (scope and select) objects. May match selectors of replication controllers // and services. // More info: http://kubernetes.io/docs/user-guide/labels // +optional Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,11,rep,name=labels"` // Annotations is an unstructured key value map stored with a resource that may be // set by external tools to store and retrieve arbitrary metadata. They are not // queryable and should be preserved when modifying objects. // More info: http://kubernetes.io/docs/user-guide/annotations // +optional Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,12,rep,name=annotations"` }
ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. This is a copy of customizable fields from metav1.ObjectMeta.
ObjectMeta is embedded in `Miner.Spec` and `MinerSet.Template`, which are not top-level Kubernetes objects. Given that metav1.ObjectMeta has lots of special cases and read-only fields which end up in the generated CRD validation, having it as a subset simplifies the API and some issues that can impact user experience.
During the [upgrade to controller-tools@v2](https://github.com/kubernetes-sigs/cluster-api/pull/1054) for v1alpha2, we noticed a failure would occur running Cluster API test suite against the new CRDs, specifically `spec.metadata.creationTimestamp in body must be of type string: "null"`. The investigation showed that `controller-tools@v2` behaves differently than its previous version when handling types from metav1(k8s.io/apimachinery/pkg/apis/meta/v1) package.
In more details, we found that embedded (non-top level) types that embedded `metav1.ObjectMeta` had validation properties, including for `creationTimestamp` (metav1.Time). The `metav1.Time` type specifies a custom json marshaller that, when IsZero() is true, returns `null` which breaks validation because the field isn't marked as nullable.
In future versions, controller-tools@v2 might allow overriding the type and validation for embedded types. When that happens, this hack should be revisited.
func (*ObjectMeta) DeepCopy ¶
func (in *ObjectMeta) DeepCopy() *ObjectMeta
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectMeta.
func (*ObjectMeta) DeepCopyInto ¶
func (in *ObjectMeta) DeepCopyInto(out *ObjectMeta)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodInfo ¶
type PodInfo struct { // The Operating System reported by the pod OperatingSystem string `json:"operatingSystem" protobuf:"bytes,9,opt,name=operatingSystem"` // The Architecture reported by the pod Architecture string `json:"architecture" protobuf:"bytes,10,opt,name=architecture"` }
PodInfo is a set of ids/uuids to uniquely identify the pod.
func (*PodInfo) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodInfo.
func (*PodInfo) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package install installs the experimental API group, making it available as an option to all of the API encoding/decoding machinery.
|
Package install installs the experimental API group, making it available as an option to all of the API encoding/decoding machinery. |
Package v1beta1 is the v1beta1 version of the API.
|
Package v1beta1 is the v1beta1 version of the API. |
index
Package index provides indexes for the api.
|
Package index provides indexes for the api. |