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 AppFile
- type Application
- type ApplicationConfig
- type ApplicationList
- type ApplicationSpec
- type ApplicationStatus
- 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 ContainerRuntimeConfig
- type Delete
- type ExternalRegistry
- type Helm
- type Host
- type HostAlias
- type Kubectl
- type Launch
- type LocalRegistry
- type Registry
- type RegistryConfig
- type Shell
- type Strategy
- type SubjectAltName
- type TLSCert
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "sealer.io", 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 AppFile ¶ added in v0.9.1
type AppFile struct { // Path represents the path to write the Values, required. Path string `json:"path,omitempty"` // Enumeration value is "merge", "overwrite", "render". default value is "overwrite". // OverWriteStrategy : this will overwrite the FilePath with the Data. // MergeStrategy: this will merge the FilePath with the Data, and only yaml files format are supported Strategy Strategy `json:"strategy,omitempty"` // Data real app launch need. // it could be raw content, yaml data, yaml section data, key-value pairs, and so on. Data string `json:"data,omitempty"` }
type Application ¶ added in v0.9.1
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 application API
func (*Application) DeepCopy ¶ added in v0.9.1
func (in *Application) DeepCopy() *Application
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Application.
func (*Application) DeepCopyInto ¶ added in v0.9.1
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 ¶ added in v0.9.1
func (in *Application) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ApplicationConfig ¶ added in v0.9.1
type ApplicationConfig struct { // the AppName Name string `json:"name,omitempty"` // Env is a set of key value pair. // it is app level, only this app will be aware of its existence, // it is used to render app files, or as an environment variable for app startup and deletion commands // it takes precedence over ApplicationSpec.Env. Env []string `json:"env,omitempty"` //Files indicates that how to modify the specific app files. Files []AppFile `json:"files,omitempty"` // app Launch customization Launch *Launch `json:"launch,omitempty"` }
func (*ApplicationConfig) DeepCopy ¶ added in v0.9.1
func (in *ApplicationConfig) DeepCopy() *ApplicationConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationConfig.
func (*ApplicationConfig) DeepCopyInto ¶ added in v0.9.1
func (in *ApplicationConfig) DeepCopyInto(out *ApplicationConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ApplicationList ¶ added in v0.9.1
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 ¶ added in v0.9.1
func (in *ApplicationList) DeepCopy() *ApplicationList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationList.
func (*ApplicationList) DeepCopyInto ¶ added in v0.9.1
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 ¶ added in v0.9.1
func (in *ApplicationList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ApplicationSpec ¶ added in v0.9.1
type ApplicationSpec struct { //Cmds raw command line which has the highest priority, is mutually exclusive with the AppNames parameter // it could be overwritten from ClusterSpec.CMD and cli flags, and it is not required. Cmds []string `json:"cmds,omitempty"` //LaunchApps This field allows user to specify the app names they want to launch. // it could be overwritten from ClusterSpec.APPNames and cli flags. LaunchApps []string `json:"launchApps,omitempty"` // Configs Additional configurations for the specified app //it will override the default launch command and delete command, as well as the corresponding app files. Configs []ApplicationConfig `json:"configs,omitempty"` }
ApplicationSpec defines the desired state of Application
func (*ApplicationSpec) DeepCopy ¶ added in v0.9.1
func (in *ApplicationSpec) DeepCopy() *ApplicationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationSpec.
func (*ApplicationSpec) DeepCopyInto ¶ added in v0.9.1
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 ¶ added in v0.9.1
type ApplicationStatus struct { }
ApplicationStatus defines the observed state of Application
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"` // APPNames This field allows user to specify the app name they want to run launch. APPNames []string `json:"appNames,omitempty"` Hosts []Host `json:"hosts,omitempty"` SSH v1.SSH `json:"ssh,omitempty"` ContainerRuntime ContainerRuntimeConfig `json:"containerRuntime,omitempty"` // HostAliases holds the mapping between IP and hostnames that will be injected as an entry in the // host's hosts file. HostAliases []HostAlias `json:"hostAliases,omitempty"` // Registry field contains configurations about local registry and remote registry. Registry Registry `json:"registry,omitempty"` // DataRoot set sealer rootfs directory path. // if not set, default value is "/var/lib/sealer/data" DataRoot string `json:"dataRoot,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 ContainerRuntimeConfig ¶ added in v0.9.2
type ContainerRuntimeConfig struct {
Type string `json:"type,omitempty"`
}
type Delete ¶ added in v0.9.1
type Delete struct { // raw cmds support Cmds []string `json:"cmds,omitempty"` }
type ExternalRegistry ¶ added in v0.9.0
type ExternalRegistry struct {
RegistryConfig
}
type Helm ¶ added in v0.9.1
type Helm struct { // Name will omit the chart values NAME parameter. Name string `json:"Name,omitempty"` //Chart //There are five different ways you can express the chart you want to install: //1. By chart reference: helm install mymaria example/mariadb //2. By path to a packaged chart: helm install mynginx ./nginx-1.2.3.tgz //3. By path to an unpacked chart directory: helm install mynginx ./nginx //4. By absolute URL: helm install mynginx https://example.com/charts/nginx-1.2.3.tgz //5. By chart reference and repo url: helm install --repo https://example.com/charts/ mynginx nginx Chart string `json:"chart,omitempty"` //Namespace specifies that where the chart package is installed in //it override String to fully override common.names.namespace Namespace string //CreateNamespace: create the release namespace if not present CreateNamespace bool `json:"createNamespace,omitempty"` //DisableHooks: prevent hooks from running during install DisableHooks bool `json:"disableHooks,omitempty"` //SkipCRDs: if set, no CRDs will be installed. By default, CRDs are installed if not already present SkipCRDs bool `json:"skipCRDs,omitempty"` //Timeout to wait for any individual Kubernetes operation (like Jobs for hooks) Timeout time.Duration `json:"timeout,omitempty"` // Wait: if set, will wait until all Pods, PVCs, Services, and minimum number of Pods of a Deployment, StatefulSet, or ReplicaSet // are in a ready state before marking the release as successful. It will wait for as long as Timeout Wait bool `json:"wait,omitempty"` // ValueFiles specify values in a YAML file or a URL, it can specify multiple. ValueFiles []string `json:"valueFiles,omitempty"` //set Values on the command line ,it can specify multiple or separate values with commas: key1=val1,key2=val2. Values []string `json:"values,omitempty"` }
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"` Labels map[string]string `json:"labels,omitempty"` Taints []string `json:"taints,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.
type HostAlias ¶ added in v0.9.0
type HostAlias struct { // IP address of the host file entry. IP string `json:"ip,omitempty"` // Hostnames for the above IP address. Hostnames []string `json:"hostnames,omitempty"` }
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file.
type Kubectl ¶ added in v0.9.1
type Kubectl struct { //FileNames represents the resources applied from FileNames []string `json:"fileNames,omitempty"` //Directory represents the resources applied from Directory string `json:"directory,omitempty"` // Namespace apply resources to specific namespace. Namespace string `json:"namespace,omitempty"` }
type Launch ¶ added in v0.9.1
type Launch struct { // Cmds raw cmds support, not required, exclusive with app type. Cmds []string `json:"cmds,omitempty"` }
type LocalRegistry ¶ added in v0.9.0
type LocalRegistry struct { RegistryConfig // HA indicate that whether local registry will be deployed on all master nodes. // if LocalRegistry is not specified, default value is true. HA *bool `json:"ha,omitempty"` // Insecure indicated that whether the local registry is exposed in HTTPS. // if true sealer will not generate default ssl cert. Insecure *bool `json:"insecure,omitempty"` Cert TLSCert `json:"cert,omitempty"` }
type Registry ¶ added in v0.9.0
type Registry struct { // LocalRegistry is the sealer builtin registry configuration LocalRegistry *LocalRegistry `json:"localRegistry,omitempty"` // ExternalRegistry used to serve external registry service. do not support yet. ExternalRegistry *ExternalRegistry `json:"externalRegistry,omitempty"` }
type RegistryConfig ¶ added in v0.9.0
type SubjectAltName ¶ added in v0.9.0
type TLSCert ¶ added in v0.9.0
type TLSCert struct {
SubjectAltName *SubjectAltName `json:"subjectAltName,omitempty"`
}