Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the rocket v1alpha1 API group +kubebuilder:object:generate=true +groupName=rocket.hextech.io
Index ¶
- Variables
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type Application
- type ApplicationCondition
- type ApplicationConditionType
- type ApplicationList
- type ApplicationSpec
- type ApplicationStatus
- type Cluster
- type ClusterList
- type ClusterSpec
- type ClusterState
- type ClusterStatus
- type Distribution
- type DistributionCluster
- type DistributionCondition
- type DistributionList
- type DistributionSpec
- type DistributionStatus
- type DistributionTargetClusters
- type DistributionTargets
- type Trait
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "rocket.hextech.io", Version: "v1alpha1"} // 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 )
var SchemeGroupVersion = GroupVersion
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type Application ¶
type Application struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ApplicationSpec `json:"spec,omitempty"`
Status ApplicationStatus `json:"status,omitempty"`
}
Application is the Schema for the applications API
func (*Application) DeepCopy ¶
func (in *Application) DeepCopy() *Application
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Application.
func (*Application) DeepCopyInto ¶
func (in *Application) DeepCopyInto(out *Application)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Application) DeepCopyObject ¶
func (in *Application) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ApplicationCondition ¶
type ApplicationCondition 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.
// The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
// +required
// +kubebuilder:validation:Required
Type ApplicationConditionType `json:"type"`
// status of the condition, one of True, False, Unknown.
// +required
// +kubebuilder:validation:Required
// +kubebuilder:validation:Enum=True;False;Unknown
Status metav1.ConditionStatus `json:"status"`
// lastTransitionTime is the 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.
// +required
// +kubebuilder:validation:Required
// +kubebuilder:validation:Type=string
// +kubebuilder:validation:Format=date-time
LastTransitionTime metav1.Time `json:"lastTransitionTime"`
// reason contains a programmatic identifier indicating the reason for the condition's last transition.
// Producers of specific condition types may define expected values and meanings for this field,
// and whether the values are considered a guaranteed API.
// The value should be a CamelCase string.
// This field may not be empty.
// +required
// +kubebuilder:validation:Required
// +kubebuilder:validation:MaxLength=1024
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:Pattern=`^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$`
Reason string `json:"reason"`
// message is a human readable message indicating details about the transition.
// This may be an empty string.
// +required
// +kubebuilder:validation:Required
// +kubebuilder:validation:MaxLength=32768
Message string `json:"message"`
}
func (*ApplicationCondition) DeepCopy ¶
func (in *ApplicationCondition) DeepCopy() *ApplicationCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationCondition.
func (*ApplicationCondition) DeepCopyInto ¶
func (in *ApplicationCondition) DeepCopyInto(out *ApplicationCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ApplicationConditionType ¶
type ApplicationConditionType string
const ( // ApplicationConditionTypePending indicates that the application controller successed to create or delete the workload or edge trait. ApplicationConditionSuccessedScale ApplicationConditionType = "SuccessedScale" // ApplicationConditionTypePending indicates that the application controller successed to update the workload or edge trait. ApplicationConditionSuccessedUpdate ApplicationConditionType = "SuccessedUpdate" // ApplicationConditionTypePending indicates that the application controller unexpected to create or delete the workload or edge trait. ApplicationConditionUnexpectedScale ApplicationConditionType = "UnexpectedScale" // ApplicationConditionUnexpectedUpdate indicates that the application controller unexpected to update the workload or edge trait. ApplicationConditionUnexpectedUpdate ApplicationConditionType = "UnexpectedUpdate" )
type ApplicationList ¶
type ApplicationList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Application `json:"items"`
}
ApplicationList contains a list of Application
func (*ApplicationList) DeepCopy ¶
func (in *ApplicationList) DeepCopy() *ApplicationList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationList.
func (*ApplicationList) DeepCopyInto ¶
func (in *ApplicationList) DeepCopyInto(out *ApplicationList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ApplicationList) DeepCopyObject ¶
func (in *ApplicationList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ApplicationSpec ¶
type ApplicationSpec struct {
// Which cloud area the application in.
// +required
// +kubebuilder:validation:Required
// +kubebuilder:default=public
// +kubebuilder:validation:Enum=public;private
CloudArea string `json:"cloudArea,omitempty"`
// prod, pre or test
// +required
// +kubebuilder:validation:Required
// +kubebuilder:validation:Enum=dev;test;staging;prod
Environment string `json:"environment,omitempty"`
// The region of application
// +required
// +kubebuilder:validation:Required
Regions []string `json:"regions,omitempty"`
// The number of replicas of application pods, it will override the replicas in template.
// +optional
Replicas *int64 `json:"replicas,omitempty"`
// Template must be the complete yaml that users want to distribute.
// +kubebuilder:pruning:PreserveUnknownFields
// +kubebuilder:validation:EmbeddedResource
Template runtime.RawExtension `json:"template,omitempty"`
// The ac this Toleration is attached to tolerates any taint that matches
// the triple <key,value,effect> using the matching operator <operator>.
// +optional
Tolerations []v1.Toleration `json:"tolerations,omitempty"`
// The operation traits of this application.
// +optional
Traits []Trait `json:"traits,omitempty"`
}
ApplicationSpec defines the desired state of Application
func (*ApplicationSpec) DeepCopy ¶
func (in *ApplicationSpec) DeepCopy() *ApplicationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationSpec.
func (*ApplicationSpec) DeepCopyInto ¶
func (in *ApplicationSpec) DeepCopyInto(out *ApplicationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ApplicationStatus ¶
type ApplicationStatus struct {
// the cluster of application
// +optional
Clusters []string `json:"clusters,omitempty"`
// the phase of the ApplicationConfiguration
// +kubebuilder:default=Pending
// +kubebuilder:validation:Enum=Pending;Scheduling;Running
Phase string `json:"phase,omitempty"`
// application details
// +optional
ApplicationDetails *runtime.RawExtension `json:"applicationDetails,omitempty"`
// cluster workload condition
// +optional
Conditions []ApplicationCondition `json:"conditions,omitempty"`
// +optional
Type string `json:"type,omitempty"`
}
ApplicationStatus defines the observed state of Application
func (*ApplicationStatus) DeepCopy ¶
func (in *ApplicationStatus) DeepCopy() *ApplicationStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationStatus.
func (*ApplicationStatus) DeepCopyInto ¶
func (in *ApplicationStatus) DeepCopyInto(out *ApplicationStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Cluster ¶
type Cluster struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ClusterSpec `json:"spec,omitempty"`
Status ClusterStatus `json:"status,omitempty"`
}
Cluster is the Schema for the clusters API
func (*Cluster) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster.
func (*Cluster) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Cluster) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterList ¶
type ClusterList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Cluster `json:"items"`
}
ClusterList contains a list of Cluster
func (*ClusterList) DeepCopy ¶
func (in *ClusterList) DeepCopy() *ClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterList.
func (*ClusterList) DeepCopyInto ¶
func (in *ClusterList) DeepCopyInto(out *ClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterList) DeepCopyObject ¶
func (in *ClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterSpec ¶
type ClusterSpec struct {
// ID is the uid for this cluster.
// +required
// +kubebuilder:validation:Required
ID string `json:"id,omitempty"`
// Region is the region of the cluster, e.g. beijing.
// Now, only support beijing and guangzhou.
// +required
// +kubebuilder:validation:Required
Region string `json:"region,omitempty"`
// the cloud area of the cluster, e.g. private or public.
// +required
// +kubebuilder:validation:Required
// +kubebuilder:validation:Enum=private;public
CloudArea string `json:"cloudArea,omitempty"`
// the cluster connect api server
// +optional
APIServer string `json:"apiServer,omitempty"`
// +optional
CAData []byte `json:"caData,omitempty"`
// +optional
CertData []byte `json:"certData,omitempty"`
// +optional
KeyData []byte `json:"keyData,omitempty"`
// serviceaccount token to connect with agent clustr
// +optional
Token []byte `json:"token,omitempty"`
// Taints is the taint of the cluster
// +optional
Taints []v1.Taint `json:"taints,omitempty"`
}
ClusterSpec defines the desired state of Cluster
func (*ClusterSpec) DeepCopy ¶
func (in *ClusterSpec) DeepCopy() *ClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec.
func (*ClusterSpec) DeepCopyInto ¶
func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterState ¶
type ClusterState string
ClusterState the cluster which register's state
const ( // the cluster is wait for approve Pending ClusterState = "Pending" // the cluster is approved Approve ClusterState = "Approved" // the cluster is rejected Reject ClusterState = "Rejected" // when the agent is not send heartbeat Offline ClusterState = "Offline" )
type ClusterStatus ¶
type ClusterStatus struct {
// the state of the cluster
// +kubebuilder:default=Pending
// +kubebuilder:validation:Enum=Pending;Approved;Rejected;Offline
State ClusterState `json:"state,omitempty"`
// the last time heartbeat from agent
LastKeepAliveTime metav1.Time `json:"lastKeepAliveTime,omitempty"`
// kubernetes version
KubernetesVersion string `json:"kubernetesVersion,omitempty"`
// ready node count of the kubernetes cluster
ReadyNodeCount *int `json:"readyNodeCount,omitempty"`
// unhealth node count of the kubernetes cluster
UnhealthNodeCount *int `json:"unhealthNodeCount,omitempty"`
// allocatable the allocatable resources of the cluster
Allocatable v1.ResourceList `json:"allocatable,omitempty"`
// capacity the capacity resources of the cluster
Capacity v1.ResourceList `json:"capacity,omitempty"`
}
ClusterStatus defines the observed state of Cluster
func (*ClusterStatus) DeepCopy ¶
func (in *ClusterStatus) DeepCopy() *ClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatus.
func (*ClusterStatus) DeepCopyInto ¶
func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Distribution ¶
type Distribution struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec DistributionSpec `json:"spec,omitempty"`
Status DistributionStatus `json:"status,omitempty"`
}
Distribution is the Schema for the resourcedistributions API.
func (*Distribution) DeepCopy ¶
func (in *Distribution) DeepCopy() *Distribution
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Distribution.
func (*Distribution) DeepCopyInto ¶
func (in *Distribution) DeepCopyInto(out *Distribution)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Distribution) DeepCopyObject ¶
func (in *Distribution) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DistributionCluster ¶
type DistributionCluster struct {
// Cluster name
Name string `json:"name,omitempty"`
}
DistributionCluster contains a cluster name
func (*DistributionCluster) DeepCopy ¶
func (in *DistributionCluster) DeepCopy() *DistributionCluster
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DistributionCluster.
func (*DistributionCluster) DeepCopyInto ¶
func (in *DistributionCluster) DeepCopyInto(out *DistributionCluster)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DistributionCondition ¶
type DistributionCondition struct {
// Status of the condition, one of True, False, Unknown.
Status metav1.ConditionStatus `json:"status"`
// LastTransitionTime is the last time the condition transitioned from one status to another.
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
// Reason describe human readable message indicating details about last transition.
Reason string `json:"reason,omitempty"`
// Message describe human readable message indicating details about last transition.
Message string `json:"message,omitempty"`
}
DistributionCondition allows a row to be marked with additional information.
func (*DistributionCondition) DeepCopy ¶
func (in *DistributionCondition) DeepCopy() *DistributionCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DistributionCondition.
func (*DistributionCondition) DeepCopyInto ¶
func (in *DistributionCondition) DeepCopyInto(out *DistributionCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DistributionList ¶
type DistributionList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Distribution `json:"items"`
}
DistributionList contains a list of Distribution.
func (*DistributionList) DeepCopy ¶
func (in *DistributionList) DeepCopy() *DistributionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DistributionList.
func (*DistributionList) DeepCopyInto ¶
func (in *DistributionList) DeepCopyInto(out *DistributionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DistributionList) DeepCopyObject ¶
func (in *DistributionList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DistributionSpec ¶
type DistributionSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file
// whether to enable the resource distribution
// +optional
Deploy bool `json:"deploy"`
// Resource must be the complete yaml that users want to distribute.
// +kubebuilder:pruning:PreserveUnknownFields
// +kubebuilder:validation:EmbeddedResource
Resource runtime.RawExtension `json:"resource"`
// Targets defines the clusters that users want to distribute to.
Targets DistributionTargets `json:"targets"`
}
DistributionSpec defines the desired state of Distribution.
func (*DistributionSpec) DeepCopy ¶
func (in *DistributionSpec) DeepCopy() *DistributionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DistributionSpec.
func (*DistributionSpec) DeepCopyInto ¶
func (in *DistributionSpec) DeepCopyInto(out *DistributionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DistributionStatus ¶
type DistributionStatus struct {
// Conditions describe the condition when Resource creating, updating and deleting.
Conditions map[string]DistributionCondition `json:"conditions,omitempty"`
}
DistributionStatus defines the observed state of Distribution. DistributionStatus is recorded by kruise, users' modification is invalid and meaningless.
func (*DistributionStatus) DeepCopy ¶
func (in *DistributionStatus) DeepCopy() *DistributionStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DistributionStatus.
func (*DistributionStatus) DeepCopyInto ¶
func (in *DistributionStatus) DeepCopyInto(out *DistributionStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DistributionTargetClusters ¶
type DistributionTargetClusters struct {
/*
// TODO: support regular expression in the future
// +optional
Pattern string `json:"pattern,omitempty"`
*/
// +optional
List []DistributionCluster `json:"list,omitempty"`
}
func (*DistributionTargetClusters) DeepCopy ¶
func (in *DistributionTargetClusters) DeepCopy() *DistributionTargetClusters
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DistributionTargetClusters.
func (*DistributionTargetClusters) DeepCopyInto ¶
func (in *DistributionTargetClusters) DeepCopyInto(out *DistributionTargetClusters)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DistributionTargets ¶
type DistributionTargets struct {
// If IncludedClusters is not empty, Resource will be distributed to the listed clusters.
// +optional
IncludedClusters DistributionTargetClusters `json:"includedClusters,omitempty"`
// All will distribute Resource to all clusters.
// +optional
All *bool `json:"all,omitempty"`
}
DistributionTargets defines the targets of Resource. Four options are provided to select target clusters.
func (*DistributionTargets) DeepCopy ¶
func (in *DistributionTargets) DeepCopy() *DistributionTargets
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DistributionTargets.
func (*DistributionTargets) DeepCopyInto ¶
func (in *DistributionTargets) DeepCopyInto(out *DistributionTargets)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Trait ¶
type Trait struct {
// The kind of trait CRD.
// +required
// +kubebuilder:validation:Required
Kind string `json:"kind,omitempty"`
// The version of trait CRD.
// +optional
Version string `json:"version,omitempty"`
// The template of trait CRD.
// +optional
Template string `json:"template,omitempty"`
}
func (*Trait) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Trait.
func (*Trait) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.