constants

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClusterTypeOpenShift = "openshift"
	ClusterTypeMinikube  = "minikube"
	ClusterTypeKind      = "kind"
)

Cluster type constants

View Source
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.

View Source
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.

View Source
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

View Source
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

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

func GetKubePrometheusVersion(clusterType string) string

GetKubePrometheusVersion returns the appropriate kube-prometheus version based on cluster type

func IsValidClusterType

func IsValidClusterType(clusterType string) bool

IsValidClusterType checks if the given cluster type is supported (case-insensitive)

func NormalizeClusterType

func NormalizeClusterType(clusterType string) string

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL