Skip to content

Commit

Permalink
set default quota backend bytes fraction as const
Browse files Browse the repository at this point in the history
  • Loading branch information
sircthulhu committed May 30, 2024
1 parent e21d436 commit 794e669
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/controller/factory/statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ import (
)

const (
etcdContainerName = "etcd"
etcdContainerName = "etcd"
defaultBackendQuotaBytesFraction = 0.95
)

func CreateOrUpdateStatefulSet(
Expand Down Expand Up @@ -259,7 +260,7 @@ func generateEtcdArgs(cluster *etcdaenixiov1alpha1.EtcdCluster) []string {
} else {
size = *cluster.Spec.Storage.VolumeClaimTemplate.Spec.Resources.Requests.Storage()
}
quota := float64(size.Value()) * 0.95
quota := float64(size.Value()) * defaultBackendQuotaBytesFraction
quota = math.Floor(quota)
if quota > 0 {
if cluster.Spec.Options == nil {
Expand Down

0 comments on commit 794e669

Please sign in to comment.