Documentation
¶
Index ¶
Constants ¶
const ( ClusterTypeOpenShift = "openshift" ClusterTypeMinikube = "minikube" ClusterTypeKind = "kind" )
Cluster type constants
const ( // DefaultDBCPURequest is the default CPU request for the database DefaultDBCPURequest = "0.5" // DefaultDBCPULimit is the default CPU limit for the database DefaultDBCPULimit = "0.5" // DefaultDBMemoryRequest is the default memory request for the database DefaultDBMemoryRequest = "100Mi" // DefaultDBMemoryLimit is the default memory limit for the database DefaultDBMemoryLimit = "100Mi" )
Database resource defaults for OpenShift NOTE: For Minikube/Kind clusters, no default resource limits/requests are applied for the database unless explicitly specified in the CR. This allows for more flexible resource allocation in local development environments.
const ( // DefaultKruizeCPURequest is the default CPU request for Kruize application DefaultKruizeCPURequest = "0.7" // DefaultKruizeCPULimit is the default CPU limit for Kruize application DefaultKruizeCPULimit = "0.7" // DefaultKruizeMemoryRequest is the default memory request for Kruize application DefaultKruizeMemoryRequest = "768Mi" // DefaultKruizeMemoryLimit is the default memory limit for Kruize application DefaultKruizeMemoryLimit = "768Mi" )
Kruize application resource defaults for OpenShift NOTE: For Minikube/Kind clusters, no default resource limits/requests are applied for the Kruize application unless explicitly specified in the CR. This allows for more flexible resource allocation in local development environments.
const ( // DefaultOpenShiftPVStorageSize is the default PV storage size for OpenShift DefaultOpenShiftPVStorageSize = "500Mi" // DefaultOpenShiftStorageClassName is the default storage class for OpenShift DefaultOpenShiftStorageClassName = "manual" // DefaultOpenShiftHostPath is the default host path for OpenShift PV DefaultOpenShiftHostPath = "/mnt/data" )
OpenShift PV/PVC defaults
const ( // DefaultKubernetesPVStorageSize is the default PV storage size for Kubernetes/Minikube/Kind DefaultKubernetesPVStorageSize = "1Gi" // DefaultKubernetesStorageClassName is the default storage class for Kubernetes/Minikube/Kind // Empty string causes the storageClassName field to be omitted from PV/PVC specs, // allowing Kubernetes to use the cluster's default StorageClass if one is configured. DefaultKubernetesStorageClassName = "" // DefaultKubernetesHostPath is the default host path for Kubernetes PV DefaultKubernetesHostPath = "/data/postgres" )
Kubernetes/Minikube/Kind PV/PVC defaults
Variables ¶
var SupportedClusterTypes = []string{ ClusterTypeOpenShift, ClusterTypeMinikube, ClusterTypeKind, }
SupportedClusterTypes defines all cluster types supported by Kruize
Functions ¶
func GetDefaultAutotuneImage ¶ added in v0.0.4
func GetDefaultAutotuneImage() string
GetDefaultAutotuneImage returns the cached default Autotune image. The image is resolved once at package initialization from environment variables or defaults.
func GetDefaultOptimizerImage ¶ added in v0.0.5
func GetDefaultOptimizerImage() string
GetDefaultOptimizerImage returns the cached default Optimizer image. The image is resolved once at package initialization from environment variables or defaults.
func GetDefaultUIImage ¶ added in v0.0.4
func GetDefaultUIImage() string
GetDefaultUIImage returns the cached default Autotune UI image. The image is resolved once at package initialization from environment variables or defaults.
func GetKubePrometheusVersion ¶
GetKubePrometheusVersion returns the appropriate kube-prometheus version based on cluster type
func IsValidClusterType ¶
IsValidClusterType checks if the given cluster type is supported (case-insensitive)
func NormalizeClusterType ¶
NormalizeClusterType converts user input to lowercase for internal use This allows case-insensitive cluster type matching (e.g., "OpenShift", "OPENSHIFT", "openshift" all work)
Types ¶
This section is empty.