Documentation
¶
Index ¶
- Constants
- func FileStorageToPVC(clusterName string, datanodeGroupName string, fs v1alpha1.FileStorageAccessor, ...) *corev1.PersistentVolumeClaim
- func GenerateConfigMap(namespace, resourceName string, configData []byte) (*corev1.ConfigMap, error)
- func GeneratePodMonitor(namespace, resourceName string, promSpec *v1alpha1.PrometheusMonitorSpec) (*monitoringv1.PodMonitor, error)
- func GeneratePodTemplateSpec(kind v1alpha1.RoleKind, template *v1alpha1.PodTemplateSpec) *corev1.PodTemplateSpec
- func GetMetaHTTPServiceURL(cluster *v1alpha1.GreptimeDBCluster) string
- func GetPVCs(ctx context.Context, k8sClient client.Client, namespace, resourceName string, ...) ([]corev1.PersistentVolumeClaim, error)
- func LogsPipelineName(namespace, name string) string
- func MonitoringServiceName(name string) string
- func MountConfigDir(template *corev1.PodTemplateSpec, configMapName string)
- func ResourceName(name string, roleKind v1alpha1.RoleKind, extraNames ...string) string
- func SetMaintenanceMode(metaHTTPServiceURL string, enabled bool) error
- type FileStorageType
Constants ¶
View Source
const (
// FileStorageTypeLabelKey is the key for PVC labels that indicate the type of file storage.
FileStorageTypeLabelKey = "app.greptime.io/fileStorageType"
)
Variables ¶
This section is empty.
Functions ¶
func FileStorageToPVC ¶
func FileStorageToPVC(clusterName string, datanodeGroupName string, fs v1alpha1.FileStorageAccessor, fsType FileStorageType, kind v1alpha1.RoleKind) *corev1.PersistentVolumeClaim
func GenerateConfigMap ¶
func GeneratePodMonitor ¶
func GeneratePodMonitor(namespace, resourceName string, promSpec *v1alpha1.PrometheusMonitorSpec) (*monitoringv1.PodMonitor, error)
func GeneratePodTemplateSpec ¶
func GeneratePodTemplateSpec(kind v1alpha1.RoleKind, template *v1alpha1.PodTemplateSpec) *corev1.PodTemplateSpec
func GetMetaHTTPServiceURL ¶ added in v0.4.0
func GetMetaHTTPServiceURL(cluster *v1alpha1.GreptimeDBCluster) string
func GetPVCs ¶
func GetPVCs(ctx context.Context, k8sClient client.Client, namespace, resourceName string, fsType FileStorageType) ([]corev1.PersistentVolumeClaim, error)
func LogsPipelineName ¶ added in v0.1.1
func MonitoringServiceName ¶ added in v0.1.1
func MountConfigDir ¶
func MountConfigDir(template *corev1.PodTemplateSpec, configMapName string)
func ResourceName ¶
ResourceName returns the resource name for the given name and role kind. The format will be `${name}-${roleKind}-${extraNames[0]}-${extraNames[1]}...`. If extraNames are provided, they will be appended to the resource name. For example, - If the name is `my-cluster` and the role kind is `datanode`, the resource name will be `my-cluster-datanode`. - If the name is `my-cluster` and the role kind is `datanode` and the extra names `read`, the resource name will be `my-cluster-datanode-read`.
func SetMaintenanceMode ¶ added in v0.4.0
SetMaintenanceMode requests the metasrv to set the maintenance mode.
Types ¶
type FileStorageType ¶
type FileStorageType string
const ( FileStorageTypeDatanode FileStorageType = "datanode" FileStorageTypeWAL FileStorageType = "wal" FileStorageTypeCache FileStorageType = "cache" )
Click to show internal directories.
Click to hide internal directories.