Documentation ¶
Overview ¶
Package v1alpha1 contains v1alpha1 version's types in apps.nebula-graph.io group.
+groupName=apps.nebula-graph.io
Package v1alpha1 contains API Schema definitions for the apps v1alpha1 API group +kubebuilder:object:generate=true +groupName=apps.nebula-graph.io
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type ComponentPhase
- type ComponentStatus
- type ComponentType
- type GraphdServiceSpec
- type GraphdSpec
- type MetadSpec
- type NebulaCluster
- func (nc *NebulaCluster) ComponentByType(typ ComponentType) (NebulaClusterComponentter, error)
- func (in *NebulaCluster) DeepCopy() *NebulaCluster
- func (in *NebulaCluster) DeepCopyInto(out *NebulaCluster)
- func (in *NebulaCluster) DeepCopyObject() runtime.Object
- func (nc *NebulaCluster) GenerateOwnerReferences() []metav1.OwnerReference
- func (nc *NebulaCluster) GetClusterName() string
- func (nc *NebulaCluster) GetMetadEndpoints() []string
- func (nc *NebulaCluster) GetMetadThriftConnAddress() string
- func (nc *NebulaCluster) GraphdComponent() NebulaClusterComponentter
- func (nc *NebulaCluster) IsPVReclaimEnabled() bool
- func (nc *NebulaCluster) MetadComponent() NebulaClusterComponentter
- func (nc *NebulaCluster) StoragedComponent() NebulaClusterComponentter
- type NebulaClusterComponentter
- type NebulaClusterCondition
- type NebulaClusterConditionType
- type NebulaClusterList
- type NebulaClusterSpec
- type NebulaClusterStatus
- type PodSpec
- type ServiceSpec
- type StorageClaim
- type StoragedSpec
- type WorkloadReference
- type WorkloadStatus
Constants ¶
const ( GraphdComponentType = ComponentType("graphd") GraphdPortNameThrift = "thrift" GraphdPortNameHTTP = "http" GraphdPortNameHTTP2 = "http2" )
const ( MetadComponentType = ComponentType("metad") MetadPortNameThrift = "thrift" MetadPortNameHTTP = "http" MetadPortNameHTTP2 = "http2" )
const ( StoragedComponentType = ComponentType("storaged") StoragedPortNameThrift = "thrift" StoragedPortNameHTTP = "http" StoragedPortNameHTTP2 = "http2" StoragedPortNameAdmin = "admin" )
const ( // nolint: revive GraphdConfigTemplate = `` /* 3079-byte string literal not displayed */ // nolint: revive MetadhConfigTemplate = `` /* 1896-byte string literal not displayed */ // nolint: revive StoragedConfigTemplate = `` /* 4399-byte string literal not displayed */ )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "apps.nebula-graph.io", Version: "v1alpha1"} SchemeGroupVersion = GroupVersion // 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 ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource is required by pkg/client/listers/...
Types ¶
type ComponentPhase ¶
type ComponentPhase string
ComponentPhase is the current state of component
const ( // RunningPhase represents normal state of nebula cluster. RunningPhase ComponentPhase = "Running" // UpgradePhase represents the upgrade state of nebula cluster. UpgradePhase ComponentPhase = "Upgrade" // ScaleInPhase represents the scaling state of nebula cluster. ScaleInPhase ComponentPhase = "ScaleIn" // ScaleOutPhase represents the scaling state of nebula cluster. ScaleOutPhase ComponentPhase = "ScaleOut" // UpdatePhase represents update state of nebula cluster. UpdatePhase ComponentPhase = "Update" )
type ComponentStatus ¶
type ComponentStatus struct { Version string `json:"version,omitempty"` Phase ComponentPhase `json:"phase,omitempty"` Workload WorkloadStatus `json:"workload,omitempty"` }
ComponentStatus is the status and version of a nebula component.
func (*ComponentStatus) DeepCopy ¶
func (in *ComponentStatus) DeepCopy() *ComponentStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentStatus.
func (*ComponentStatus) DeepCopyInto ¶
func (in *ComponentStatus) DeepCopyInto(out *ComponentStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentType ¶
type ComponentType string
ComponentType is the type of NebulaCluster Component: graphd, metad or storaged +k8s:deepcopy-gen=false
func (ComponentType) String ¶
func (typ ComponentType) String() string
type GraphdServiceSpec ¶
type GraphdServiceSpec struct { ServiceSpec `json:",inline"` // LoadBalancerIP is the loadBalancerIP of service // +optional LoadBalancerIP *string `json:"loadBalancerIP,omitempty"` // ExternalTrafficPolicy of the service // +optional ExternalTrafficPolicy *corev1.ServiceExternalTrafficPolicyType `json:"externalTrafficPolicy,omitempty"` }
GraphdServiceSpec is the service spec of graphd
func (*GraphdServiceSpec) DeepCopy ¶
func (in *GraphdServiceSpec) DeepCopy() *GraphdServiceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GraphdServiceSpec.
func (*GraphdServiceSpec) DeepCopyInto ¶
func (in *GraphdServiceSpec) DeepCopyInto(out *GraphdServiceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GraphdSpec ¶
type GraphdSpec struct { PodSpec `json:",inline"` // Config defines a graphd configuration load into ConfigMap Config map[string]string `json:"config,omitempty"` // Service defines a k8s service of Graphd cluster. // +optional Service *GraphdServiceSpec `json:"service,omitempty"` // K8S persistent volume claim for Graphd log volume. // +optional LogVolumeClaim *StorageClaim `json:"logVolumeClaim,omitempty"` }
GraphdSpec defines the desired state of Graphd
func (*GraphdSpec) DeepCopy ¶
func (in *GraphdSpec) DeepCopy() *GraphdSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GraphdSpec.
func (*GraphdSpec) DeepCopyInto ¶
func (in *GraphdSpec) DeepCopyInto(out *GraphdSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MetadSpec ¶
type MetadSpec struct { PodSpec `json:",inline"` // Config defines a metad configuration load into ConfigMap Config map[string]string `json:"config,omitempty"` // Service defines a Kubernetes service of Metad cluster. // +optional Service *ServiceSpec `json:"service,omitempty"` // K8S persistent volume claim for Metad log volume. // +optional LogVolumeClaim *StorageClaim `json:"logVolumeClaim,omitempty"` // K8S persistent volume claim for Metad data volume. // +optional DataVolumeClaim *StorageClaim `json:"dataVolumeClaim,omitempty"` }
MetadSpec defines the desired state of Metad
func (*MetadSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetadSpec.
func (*MetadSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NebulaCluster ¶
type NebulaCluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec NebulaClusterSpec `json:"spec,omitempty"` Status NebulaClusterStatus `json:"status,omitempty"` }
NebulaCluster is the Schema for the nebulaclusters API
func (*NebulaCluster) ComponentByType ¶
func (nc *NebulaCluster) ComponentByType(typ ComponentType) (NebulaClusterComponentter, error)
func (*NebulaCluster) DeepCopy ¶
func (in *NebulaCluster) DeepCopy() *NebulaCluster
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NebulaCluster.
func (*NebulaCluster) DeepCopyInto ¶
func (in *NebulaCluster) DeepCopyInto(out *NebulaCluster)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NebulaCluster) DeepCopyObject ¶
func (in *NebulaCluster) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*NebulaCluster) GenerateOwnerReferences ¶
func (nc *NebulaCluster) GenerateOwnerReferences() []metav1.OwnerReference
func (*NebulaCluster) GetClusterName ¶
func (nc *NebulaCluster) GetClusterName() string
func (*NebulaCluster) GetMetadEndpoints ¶
func (nc *NebulaCluster) GetMetadEndpoints() []string
func (*NebulaCluster) GetMetadThriftConnAddress ¶
func (nc *NebulaCluster) GetMetadThriftConnAddress() string
func (*NebulaCluster) GraphdComponent ¶
func (nc *NebulaCluster) GraphdComponent() NebulaClusterComponentter
func (*NebulaCluster) IsPVReclaimEnabled ¶ added in v0.9.0
func (nc *NebulaCluster) IsPVReclaimEnabled() bool
func (*NebulaCluster) MetadComponent ¶
func (nc *NebulaCluster) MetadComponent() NebulaClusterComponentter
func (*NebulaCluster) StoragedComponent ¶
func (nc *NebulaCluster) StoragedComponent() NebulaClusterComponentter
type NebulaClusterComponentter ¶
type NebulaClusterComponentter interface { GetUpdateRevision() string GetReplicas() int32 GetImage() string GetConfig() map[string]string GetConfigMapKey() string GetResources() *corev1.ResourceRequirements GetPodEnvVars() []corev1.EnvVar GetPodAnnotations() map[string]string GetPodLabels() map[string]string GetLogStorageResources() *corev1.ResourceRequirements GetDataStorageResources() *corev1.ResourceRequirements NodeSelector() map[string]string Affinity() *corev1.Affinity Tolerations() []corev1.Toleration SidecarContainers() []corev1.Container SidecarVolumes() []corev1.Volume ReadinessProbe() *corev1.Probe IsHeadlessService() bool GetServiceSpec() *ServiceSpec GetServiceName() string GetServiceFQDN() string GetPodFQDN(int32) string GetPort(string) int32 GetConnAddress(string) string GetPodConnAddresses(portName string, ordinal int32) string GetHeadlessConnAddresses(string) []string IsReady() bool GenerateLabels() map[string]string GenerateContainerPorts() []corev1.ContainerPort GenerateVolumeMounts() []corev1.VolumeMount GenerateVolumes() []corev1.Volume GenerateVolumeClaim() ([]corev1.PersistentVolumeClaim, error) GenerateWorkload(gvk schema.GroupVersionKind, cm *corev1.ConfigMap, enableEvenPodsSpread bool) (*unstructured.Unstructured, error) GenerateService() *corev1.Service GenerateConfigMap() *corev1.ConfigMap UpdateComponentStatus(status *ComponentStatus) // contains filtered or unexported methods }
NebulaClusterComponentter is the interface for component +k8s:deepcopy-gen=false
type NebulaClusterCondition ¶
type NebulaClusterCondition struct { // Type of the condition. Type NebulaClusterConditionType `json:"type"` // Status of the condition, one of True, False, Unknown. Status corev1.ConditionStatus `json:"status"` // The last time this condition was updated. LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"` // Last time the condition transitioned from one status to another. // +optional LastTransitionTime metav1.Time `json:"lastTransitionTime,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"` }
NebulaClusterCondition describes the state of a nebula cluster at a certain point.
func (*NebulaClusterCondition) DeepCopy ¶
func (in *NebulaClusterCondition) DeepCopy() *NebulaClusterCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NebulaClusterCondition.
func (*NebulaClusterCondition) DeepCopyInto ¶
func (in *NebulaClusterCondition) DeepCopyInto(out *NebulaClusterCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NebulaClusterConditionType ¶
type NebulaClusterConditionType string
NebulaClusterConditionType represents a nebula cluster condition value.
const ( // NebulaClusterReady indicates that the nebula cluster is ready or not. // This is defined as: // - All workloads are up to date (currentRevision == updateRevision). // - All nebula component pods are healthy. NebulaClusterReady NebulaClusterConditionType = "Ready" )
type NebulaClusterList ¶
type NebulaClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []NebulaCluster `json:"items"` }
NebulaClusterList contains a list of NebulaCluster
func (*NebulaClusterList) DeepCopy ¶
func (in *NebulaClusterList) DeepCopy() *NebulaClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NebulaClusterList.
func (*NebulaClusterList) DeepCopyInto ¶
func (in *NebulaClusterList) DeepCopyInto(out *NebulaClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NebulaClusterList) DeepCopyObject ¶
func (in *NebulaClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NebulaClusterSpec ¶
type NebulaClusterSpec struct { // graphd spec Graphd *GraphdSpec `json:"graphd"` // Metad spec Metad *MetadSpec `json:"metad"` // Storaged spec Storaged *StoragedSpec `json:"storaged"` // +optional Reference WorkloadReference `json:"reference,omitempty"` // +kubebuilder:default=default-scheduler // +optional SchedulerName string `json:"schedulerName"` // Flag to enable/disable pv reclaim while the nebula cluster deleted , default false // +optional EnablePVReclaim *bool `json:"enablePVReclaim,omitempty"` // +kubebuilder:default=Always ImagePullPolicy *corev1.PullPolicy `json:"imagePullPolicy,omitempty"` // +optional ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"` // +optional NodeSelector map[string]string `json:"nodeSelector,omitempty"` // +optional Affinity *corev1.Affinity `json:"affinity,omitempty"` // +optional Tolerations []corev1.Toleration `json:"toleration,omitempty"` // UpdatePolicy indicates how pods should be updated // +optional UpdatePolicy string `json:"strategy,omitempty"` }
NebulaClusterSpec defines the desired state of NebulaCluster
func (*NebulaClusterSpec) DeepCopy ¶
func (in *NebulaClusterSpec) DeepCopy() *NebulaClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NebulaClusterSpec.
func (*NebulaClusterSpec) DeepCopyInto ¶
func (in *NebulaClusterSpec) DeepCopyInto(out *NebulaClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NebulaClusterStatus ¶
type NebulaClusterStatus struct { Graphd ComponentStatus `json:"graphd,omitempty"` Metad ComponentStatus `json:"metad,omitempty"` Storaged ComponentStatus `json:"storaged,omitempty"` Conditions []NebulaClusterCondition `json:"conditions,omitempty"` }
NebulaClusterStatus defines the observed state of NebulaCluster
func (*NebulaClusterStatus) DeepCopy ¶
func (in *NebulaClusterStatus) DeepCopy() *NebulaClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NebulaClusterStatus.
func (*NebulaClusterStatus) DeepCopyInto ¶
func (in *NebulaClusterStatus) DeepCopyInto(out *NebulaClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodSpec ¶
type PodSpec struct { // K8S deployment replicas setting. // +kubebuilder:validation:Minimum=0 Replicas *int32 `json:"replicas,omitempty"` // K8S resources settings. // +optional Resources *corev1.ResourceRequirements `json:"resources,omitempty"` // Container environment variables. // +optional EnvVars []corev1.EnvVar `json:"env,omitempty"` // +kubebuilder:default=vesoft/graphd // +optional Image string `json:"image,omitempty"` // Version tag for docker images // +optional Version string `json:"version,omitempty"` // K8S pod annotations. // +optional Annotations map[string]string `json:"annotations,omitempty"` // +optional Labels map[string]string `json:"labels,omitempty"` // K8S nodeSelector. // +optional NodeSelector map[string]string `json:"nodeSelector,omitempty"` // +optional Affinity *corev1.Affinity `json:"affinity,omitempty"` // +optional Tolerations []corev1.Toleration `json:"tolerations,omitempty"` // +optional SidecarContainers []corev1.Container `json:"sidecarContainers,omitempty"` // +optional SidecarVolumes []corev1.Volume `json:"sidecarVolumes,omitempty"` // +optional ReadinessProbe *corev1.Probe `json:"readinessProbe,omitempty"` }
PodSpec is a common set of k8s resource configs for nebula components.
func (*PodSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSpec.
func (*PodSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceSpec ¶
type ServiceSpec struct { Type corev1.ServiceType `json:"type,omitempty"` // +optional Annotations map[string]string `json:"annotations,omitempty"` // +optional Selector map[string]string `json:"selector,omitempty"` // ClusterIP is the clusterIP of service // +optional ClusterIP *string `json:"clusterIP,omitempty"` // +optional PublishNotReadyAddresses bool `json:"publishNotReadyAddresses,omitempty"` }
ServiceSpec is a common set of k8s service configs.
func (*ServiceSpec) DeepCopy ¶
func (in *ServiceSpec) DeepCopy() *ServiceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceSpec.
func (*ServiceSpec) DeepCopyInto ¶
func (in *ServiceSpec) DeepCopyInto(out *ServiceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StorageClaim ¶
type StorageClaim struct { // Resources represents the minimum resources the volume should have. // +optional Resources corev1.ResourceRequirements `json:"resources,omitempty"` // Name of the StorageClass required by the claim. // +optional StorageClassName *string `json:"storageClassName,omitempty"` }
StorageClaim contains details of storages
func (*StorageClaim) DeepCopy ¶
func (in *StorageClaim) DeepCopy() *StorageClaim
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageClaim.
func (*StorageClaim) DeepCopyInto ¶
func (in *StorageClaim) DeepCopyInto(out *StorageClaim)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StoragedSpec ¶
type StoragedSpec struct { PodSpec `json:",inline"` // Config defines a storaged configuration load into ConfigMap Config map[string]string `json:"config,omitempty"` // Service defines a Kubernetes service of Storaged cluster. // +optional Service *ServiceSpec `json:"service,omitempty"` // K8S persistent volume claim for Storaged log volume. // +optional LogVolumeClaim *StorageClaim `json:"logVolumeClaim,omitempty"` // K8S persistent volume claim for Storaged data volume. // +optional DataVolumeClaim *StorageClaim `json:"dataVolumeClaim,omitempty"` // Flag to enable/disable auto balance data and leader while the nebula storaged scale out , default false // +optional EnableAutoBalance *bool `json:"enableAutoBalance,omitempty"` }
StoragedSpec defines the desired state of Storaged
func (*StoragedSpec) DeepCopy ¶
func (in *StoragedSpec) DeepCopy() *StoragedSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StoragedSpec.
func (*StoragedSpec) DeepCopyInto ¶
func (in *StoragedSpec) DeepCopyInto(out *StoragedSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkloadReference ¶
type WorkloadReference struct { // Name of the referenced CustomResourceDefinition. // eg. statefulsets.apps Name string `json:"name"` // Version indicate which version should be used if CRD has multiple versions // by default it will use the first one if not specified Version string `json:"version,omitempty"` }
A WorkloadReference refers to a CustomResourceDefinition by name.
func (*WorkloadReference) DeepCopy ¶
func (in *WorkloadReference) DeepCopy() *WorkloadReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadReference.
func (*WorkloadReference) DeepCopyInto ¶
func (in *WorkloadReference) DeepCopyInto(out *WorkloadReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkloadStatus ¶
type WorkloadStatus struct { // ObservedGeneration is the most recent generation observed for this Workload. It corresponds to the // Workload's generation, which is updated on mutation by the API Server. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` // The number of ready replicas. // +optional ReadyReplicas int32 `json:"readyReplicas,omitempty"` // Replicas is the most recently observed number of replicas. Replicas int32 `json:"replicas"` // The number of pods in current version. UpdatedReplicas int32 `json:"updatedReplicas"` // The number of ready current revision replicas for this Workload. // +optional UpdatedReadyReplicas int32 `json:"updatedReadyReplicas,omitempty"` // Count of hash collisions for the Workload. // +optional CollisionCount *int32 `json:"collisionCount,omitempty"` // CurrentRevision, if not empty, indicates the current version of the Workload. CurrentRevision string `json:"currentRevision"` // updateRevision, if not empty, indicates the version of the Workload used to generate Pods in the sequence UpdateRevision string `json:"updateRevision,omitempty"` }
WorkloadStatus describes the status of a specified workload.
func (*WorkloadStatus) DeepCopy ¶
func (in *WorkloadStatus) DeepCopy() *WorkloadStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadStatus.
func (*WorkloadStatus) DeepCopyInto ¶
func (in *WorkloadStatus) DeepCopyInto(out *WorkloadStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.