Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the operator v1alpha1 API group +kubebuilder:object:generate=true +groupName=operator.openyurt.io
Index ¶
- Constants
- Variables
- type ComponentConfig
- type ImageMeta
- type NodeCondition
- type NodeSet
- type NodeType
- type Phase
- type YurtCluster
- type YurtClusterList
- type YurtClusterSpec
- type YurtClusterStatus
- type YurtClusterStatusFailure
- type YurtHubSpec
- type YurtHubSpecTemplate
- type YurtTunnelAgentSpec
- type YurtTunnelServerSpec
- type YurtTunnelSpec
Constants ¶
const ( // DefaultYurtVersion defines the default yurt version (image tag) DefaultYurtVersion = "v0.6.1" // DefaultYurtImageRepository defines the default repository for the yurt component images DefaultYurtImageRepository = "docker.io/openyurt" // DefaultPodManifestsPath defines the default path of Pod manifests DefaultPodManifestsPath = "/etc/kubernetes/manifests" // DefaultKubeadmConfPath defines the default path to kubelet service conf DefaultKubeadmConfPath = "/etc/systemd/system/kubelet.service.d/10-kubeadm.conf" // DefaultYurtTunnelPublicPort defines the default public port for tunnel server DefaultYurtTunnelPublicPort = 32502 )
const ( // YurtClusterFinalizer is the finalizer used by the YurtCluster controller to // cleanup the cluster resources when a YurtCluster is being deleted. YurtClusterFinalizer = "cluster.operator.openyurt.io" // SingletonYurtClusterInstanceName defines the global singleton instance name of YurtCluster SingletonYurtClusterInstanceName = "cluster" )
const ( // PhaseInvalid is the state when the YurtCluster is invalid PhaseInvalid = Phase("Invalid") // PhaseConverting is the state when the YurtCluster is converting PhaseConverting = Phase("Converting") // PhaseDeleting is the state when the YurtCluster is deleting PhaseDeleting = Phase("Deleting") // PhaseSucceed is the state when the YurtCluster is ready PhaseSucceed = Phase("Succeed") )
const ( // NodeConditionReasonCloudNodeConvert represents the reason for cloud node convert NodeConditionReasonCloudNodeConvert = "CloudNodeConvert" // NodeConditionReasonEdgeNodeConvert represents the reason for edge node convert NodeConditionReasonEdgeNodeConvert = "EdgeNodeConvert" // NodeConditionReasonNodeRevert represents the reason for normal node revert NodeConditionReasonNodeRevert = "NodeRevert" )
Variables ¶
var ( // TrueBoolPrt is a bool pointer to true TrueBoolPrt = pointer.BoolPtr(true) // FalseBoolPrt is a bool pointer to false FalseBoolPrt = pointer.BoolPtr(false) )
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "operator.openyurt.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 )
Functions ¶
This section is empty.
Types ¶
type ComponentConfig ¶
type ComponentConfig struct { // ImageMeta allows to customize the image used for the yurt component // +optional ImageMeta `json:",inline"` // Enabled indicates whether the yurt component has been enabled // +optional Enabled *bool `json:"enabled,omitempty"` // ExtraArgs is an extra set of flags to pass to the OpenYurt component. // A key in this map is the flag name as it appears on the // command line except without leading dash(es). ExtraArgs map[string]string `json:"extraArgs,omitempty"` }
ComponentConfig defines the common config for the yurt components
func (*ComponentConfig) DeepCopy ¶
func (in *ComponentConfig) DeepCopy() *ComponentConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentConfig.
func (*ComponentConfig) DeepCopyInto ¶
func (in *ComponentConfig) DeepCopyInto(out *ComponentConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ImageMeta ¶
type ImageMeta struct { // Repository sets the container registry to pull images from. // If not set, the ImageRepository defined in YurtClusterSpec will be used instead. // +optional Repository string `json:"repository,omitempty"` // Tag allows to specify a tag for the image. // If not set, the tag related to the YurtVersion defined in YurtClusterSpec will be used instead. // +optional Tag string `json:"tag,omitempty"` }
ImageMeta allows to customize the image used for components that are not originated from the OpenYurt release process
func (*ImageMeta) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageMeta.
func (*ImageMeta) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeCondition ¶
type NodeCondition struct { // The status for the condition's last transition. // +optional Status string `json:"status,omitempty"` // The reason for the condition's last transition. // +optional Reason string `json:"reason,omitempty"` // A human readable message indicating details about the transition. // +optional Message string `json:"message,omitempty"` // The last time this condition was updated. // +optional LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` // The generation observed by the node agent controller. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` }
NodeCondition describes the state of a node at a certain point
func (*NodeCondition) DeepCopy ¶
func (in *NodeCondition) DeepCopy() *NodeCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeCondition.
func (*NodeCondition) DeepCopyInto ¶
func (in *NodeCondition) DeepCopyInto(out *NodeCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeSet ¶
type NodeSet struct { // Names defines the node names to be selected // +optional Names []string `json:"names,omitempty"` // NamePattern defines the regular expression to select nodes based on node name // +optional NamePattern string `json:"namePattern,omitempty"` // Selector defines the label selector to select nodes // +optional Selector *corev1.NodeSelector `json:"selector,omitempty"` // ExcludedNames defines the node names to be excluded // +optional ExcludedNames []string `json:"excludedNames,omitempty"` // ExcludedNamePattern defines the regular expression to exclude nodes based on node name // +optional ExcludedNamePattern string `json:"excludedNamePattern,omitempty"` }
NodeSet defines a set of Kubernetes nodes. It will merge the nodes that selected by Names, NamePattern, and Selector, and then remove the nodes that match ExcludedNames and ExcludedNamePattern as the final set of nodes.
func (*NodeSet) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSet.
func (*NodeSet) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type YurtCluster ¶
type YurtCluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec YurtClusterSpec `json:"spec,omitempty"` Status YurtClusterStatus `json:"status,omitempty"` }
YurtCluster is the Schema for the yurtclusters API
func (*YurtCluster) Complete ¶
func (in *YurtCluster) Complete()
Complete completes all the required fields with the default value
func (*YurtCluster) DeepCopy ¶
func (in *YurtCluster) DeepCopy() *YurtCluster
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new YurtCluster.
func (*YurtCluster) DeepCopyInto ¶
func (in *YurtCluster) DeepCopyInto(out *YurtCluster)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*YurtCluster) DeepCopyObject ¶
func (in *YurtCluster) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type YurtClusterList ¶
type YurtClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []YurtCluster `json:"items"` }
YurtClusterList contains a list of YurtCluster
func (*YurtClusterList) DeepCopy ¶
func (in *YurtClusterList) DeepCopy() *YurtClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new YurtClusterList.
func (*YurtClusterList) DeepCopyInto ¶
func (in *YurtClusterList) DeepCopyInto(out *YurtClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*YurtClusterList) DeepCopyObject ¶
func (in *YurtClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type YurtClusterSpec ¶
type YurtClusterSpec struct { // ImageRepository sets the container registry to pull images from. // If empty, `docker.io/openyurt` will be used by default // +optional ImageRepository string `json:"imageRepository,omitempty"` // YurtVersion is the target version of OpenYurt // +optional YurtVersion string `json:"yurtVersion,omitempty"` // CloudNodes defines the node set with cloud role. // +optional CloudNodes NodeSet `json:"cloudNodes,omitempty"` // EdgeNodes defines the node set with edge role. // +optional EdgeNodes NodeSet `json:"edgeNodes,omitempty"` // YurtHub defines the configuration for yurt-hub // +optional YurtHub YurtHubSpec `json:"yurtHub,omitempty"` // YurtTunnel defines the configuration for yurt tunnel // +optional YurtTunnel YurtTunnelSpec `json:"yurtTunnel,omitempty"` }
YurtClusterSpec defines the desired state of YurtCluster
func (*YurtClusterSpec) DeepCopy ¶
func (in *YurtClusterSpec) DeepCopy() *YurtClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new YurtClusterSpec.
func (*YurtClusterSpec) DeepCopyInto ¶
func (in *YurtClusterSpec) DeepCopyInto(out *YurtClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type YurtClusterStatus ¶
type YurtClusterStatus struct { // Phase represents the current phase of the yurt cluster // +optional Phase Phase `json:"phase,omitempty"` // FailureReason indicates that there is a problem reconciling the state, and // will be set to a token value suitable for programmatic interpretation. // +optional FailureReason *YurtClusterStatusFailure `json:"failureReason,omitempty"` // FailureMessage indicates that there is a fatal problem reconciling the // state, and will be set to a descriptive error message. // +optional FailureMessage *string `json:"failureMessage,omitempty"` // NodeConditions holds the info about node conditions // +optional NodeConditions map[string]NodeCondition `json:"nodeConditions,omitempty"` // The generation observed by the operator controller. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` }
YurtClusterStatus defines the observed state of YurtCluster
func (*YurtClusterStatus) DeepCopy ¶
func (in *YurtClusterStatus) DeepCopy() *YurtClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new YurtClusterStatus.
func (*YurtClusterStatus) DeepCopyInto ¶
func (in *YurtClusterStatus) DeepCopyInto(out *YurtClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type YurtClusterStatusFailure ¶
type YurtClusterStatusFailure string
YurtClusterStatusFailure defines errors states for YurtCluster objects.
const ( // InvalidConfigurationYurtClusterError indicates a state that must be fixed before progress can be made. InvalidConfigurationYurtClusterError YurtClusterStatusFailure = "InvalidConfiguration" )
type YurtHubSpec ¶
type YurtHubSpec struct { // Cloud defines the yurt-hub configuration about cloud nodes // +optional Cloud YurtHubSpecTemplate `json:"cloud,omitempty"` // Edge defines the yurt-hub configuration about edge nodes // +optional Edge YurtHubSpecTemplate `json:"edge,omitempty"` // PodManifestsPath defines the path to the directory on edge node containing static pod files // +optional PodManifestsPath string `json:"podManifestsPath,omitempty"` // KubeadmConfPath defines the path to kubelet service conf that is used by kubelet component // to join the cluster on the edge node // +optional KubeadmConfPath string `json:"kubeadmConfPath,omitempty"` }
YurtHubSpec defines the configuration for yurt-hub
func (*YurtHubSpec) DeepCopy ¶
func (in *YurtHubSpec) DeepCopy() *YurtHubSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new YurtHubSpec.
func (*YurtHubSpec) DeepCopyInto ¶
func (in *YurtHubSpec) DeepCopyInto(out *YurtHubSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type YurtHubSpecTemplate ¶
type YurtHubSpecTemplate struct { // ComponentConfig defines the common config for the yurt components // +optional ComponentConfig `json:",inline"` }
YurtHubSpecTemplate defines the configuration template for yurt-hub
func (*YurtHubSpecTemplate) DeepCopy ¶
func (in *YurtHubSpecTemplate) DeepCopy() *YurtHubSpecTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new YurtHubSpecTemplate.
func (*YurtHubSpecTemplate) DeepCopyInto ¶
func (in *YurtHubSpecTemplate) DeepCopyInto(out *YurtHubSpecTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type YurtTunnelAgentSpec ¶
type YurtTunnelAgentSpec struct { // ComponentConfig defines the common config for the yurt components // +optional ComponentConfig `json:",inline"` }
YurtTunnelAgentSpec defines the configuration for tunnel agent
func (*YurtTunnelAgentSpec) DeepCopy ¶
func (in *YurtTunnelAgentSpec) DeepCopy() *YurtTunnelAgentSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new YurtTunnelAgentSpec.
func (*YurtTunnelAgentSpec) DeepCopyInto ¶
func (in *YurtTunnelAgentSpec) DeepCopyInto(out *YurtTunnelAgentSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type YurtTunnelServerSpec ¶
type YurtTunnelServerSpec struct { // ComponentConfig defines the common config for the yurt components // +optional ComponentConfig `json:",inline"` // ServerCount defines the replicas for the tunnel server Pod. // Its value should be greater than or equal to the number of API Server. // Operator will automatically override this value if it is less than the number of API Server. // +optional ServerCount int `json:"serverCount,omitempty"` // PublicIP defines the public IP for tunnel server listen on. // If this field is empty, the tunnel agent will use NodePort Service to connect to the tunnel server. // +optional PublicIP string `json:"publicIP,omitempty"` // PublicPort defines the public port for tunnel server listen on. // +optional PublicPort int `json:"publicPort,omitempty"` }
YurtTunnelServerSpec defines the configuration for tunnel server
func (*YurtTunnelServerSpec) DeepCopy ¶
func (in *YurtTunnelServerSpec) DeepCopy() *YurtTunnelServerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new YurtTunnelServerSpec.
func (*YurtTunnelServerSpec) DeepCopyInto ¶
func (in *YurtTunnelServerSpec) DeepCopyInto(out *YurtTunnelServerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type YurtTunnelSpec ¶
type YurtTunnelSpec struct { // Server defines the configuration for tunnel server // +optional Server YurtTunnelServerSpec `json:"server,omitempty"` // Agent defines the configuration for tunnel agent // +optional Agent YurtTunnelAgentSpec `json:"agent,omitempty"` }
YurtTunnelSpec defines the configuration for yurt tunnel
func (*YurtTunnelSpec) DeepCopy ¶
func (in *YurtTunnelSpec) DeepCopy() *YurtTunnelSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new YurtTunnelSpec.
func (*YurtTunnelSpec) DeepCopyInto ¶
func (in *YurtTunnelSpec) DeepCopyInto(out *YurtTunnelSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.