Documentation
¶
Overview ¶
Package v2 contains API Schema definitions for the cluster v2 API group +kubebuilder:object:generate=true +groupName=cluster.sealer.cool
Index ¶
- Variables
- type Cluster
- func (in *Cluster) DeepCopy() *Cluster
- func (in *Cluster) DeepCopyInto(out *Cluster)
- func (in *Cluster) DeepCopyObject() runtime.Object
- func (in *Cluster) GetAllIPList() []net.IP
- func (in *Cluster) GetAnnotationsByKey(key string) string
- func (in *Cluster) GetIPSByRole(role string) []net.IP
- func (in *Cluster) GetMaster0IP() net.IP
- func (in *Cluster) GetMasterIPList() []net.IP
- func (in *Cluster) GetMasterIPStrList() (ipStrList []string)
- func (in *Cluster) GetNodeIPList() []net.IP
- func (in *Cluster) SetAnnotations(key, value string)
- type ClusterList
- type ClusterSpec
- type ClusterStatus
- type Host
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "cluster.sealer.cool", Version: "v2"} // 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 )
Functions ¶
This section is empty.
Types ¶
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.
func (*Cluster) GetAllIPList ¶
func (*Cluster) GetAnnotationsByKey ¶
func (*Cluster) GetMaster0IP ¶
func (*Cluster) GetMasterIPList ¶
func (*Cluster) GetMasterIPStrList ¶
func (*Cluster) GetNodeIPList ¶
func (*Cluster) SetAnnotations ¶
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 {
// desired state of cluster
// Important: Run "make" to regenerate code after modifying this file
// Foo is an example field of Cluster. Edit Cluster_types.go to remove/update
Image string `json:"image,omitempty"`
// Why env not using map[string]string
// Because some argument is list, like: CertSANS=127.0.0.1 CertSANS=localhost, if ENV is map, will merge those two values
// but user want to config a list, using array we can convert it to {CertSANS:[127.0.0.1, localhost]}
Env []string `json:"env,omitempty"`
CMDArgs []string `json:"cmd_args,omitempty"`
CMD []string `json:"cmd,omitempty"`
Hosts []Host `json:"hosts,omitempty"`
SSH v1.SSH `json:"ssh,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 ClusterStatus ¶
type ClusterStatus struct {
}
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 Host ¶
type Host struct {
IPS []net.IP `json:"ips,omitempty"`
Roles []string `json:"roles,omitempty"`
//overwrite SSH config
SSH v1.SSH `json:"ssh,omitempty"`
//overwrite env
Env []string `json:"env,omitempty"`
}
func (*Host) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Host.
func (*Host) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.