Adjust resources limits (#1588)

* Adjust resources

* updated the values

---------

Co-authored-by: Alon Girmonsky <1990761+alongir@users.noreply.github.com>
This commit is contained in:
Volodymyr Stoiko 2024-08-20 18:55:06 +03:00 committed by GitHub
parent b34cc21bcf
commit a3fea3b610
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 33 additions and 23 deletions

View File

@ -36,9 +36,14 @@ const (
ContainerPortStr = "80" ContainerPortStr = "80"
) )
type ResourceLimits struct { type ResourceLimitsHub struct {
CPU string `yaml:"cpu" json:"cpu" default:"750m"` CPU string `yaml:"cpu" json:"cpu" default:"1000m"`
Memory string `yaml:"memory" json:"memory" default:"1Gi"` Memory string `yaml:"memory" json:"memory" default:"1500Mi"`
}
type ResourceLimitsWorker struct {
CPU string `yaml:"cpu" json:"cpu" default:"1200m"`
Memory string `yaml:"memory" json:"memory" default:"2000Mi"`
} }
type ResourceRequests struct { type ResourceRequests struct {
@ -46,8 +51,13 @@ type ResourceRequests struct {
Memory string `yaml:"memory" json:"memory" default:"50Mi"` Memory string `yaml:"memory" json:"memory" default:"50Mi"`
} }
type ResourceRequirements struct { type ResourceRequirementsHub struct {
Limits ResourceLimits `yaml:"limits" json:"limits"` Limits ResourceLimitsHub `yaml:"limits" json:"limits"`
Requests ResourceRequests `yaml:"requests" json:"requests"`
}
type ResourceRequirementsWorker struct {
Limits ResourceLimitsHub `yaml:"limits" json:"limits"`
Requests ResourceRequests `yaml:"requests" json:"requests"` Requests ResourceRequests `yaml:"requests" json:"requests"`
} }
@ -85,9 +95,9 @@ type DockerConfig struct {
} }
type ResourcesConfig struct { type ResourcesConfig struct {
Hub ResourceRequirements `yaml:"hub" json:"hub"` Hub ResourceRequirementsHub `yaml:"hub" json:"hub"`
Sniffer ResourceRequirements `yaml:"sniffer" json:"sniffer"` Sniffer ResourceRequirementsWorker `yaml:"sniffer" json:"sniffer"`
Tracer ResourceRequirements `yaml:"tracer" json:"tracer"` Tracer ResourceRequirementsWorker `yaml:"tracer" json:"tracer"`
} }
type Role struct { type Role struct {
@ -172,7 +182,7 @@ type TapConfig struct {
PersistentStorage bool `yaml:"persistentStorage" json:"persistentStorage" default:"false"` PersistentStorage bool `yaml:"persistentStorage" json:"persistentStorage" default:"false"`
PersistentStorageStatic bool `yaml:"persistentStorageStatic" json:"persistentStorageStatic" default:"false"` PersistentStorageStatic bool `yaml:"persistentStorageStatic" json:"persistentStorageStatic" default:"false"`
EfsFileSytemIdAndPath string `yaml:"efsFileSytemIdAndPath" json:"efsFileSytemIdAndPath" default:""` EfsFileSytemIdAndPath string `yaml:"efsFileSytemIdAndPath" json:"efsFileSytemIdAndPath" default:""`
StorageLimit string `yaml:"storageLimit" json:"storageLimit" default:"500Mi"` StorageLimit string `yaml:"storageLimit" json:"storageLimit" default:"5000Mi"`
StorageClass string `yaml:"storageClass" json:"storageClass" default:"standard"` StorageClass string `yaml:"storageClass" json:"storageClass" default:"standard"`
DryRun bool `yaml:"dryRun" json:"dryRun" default:"false"` DryRun bool `yaml:"dryRun" json:"dryRun" default:"false"`
Resources ResourcesConfig `yaml:"resources" json:"resources"` Resources ResourcesConfig `yaml:"resources" json:"resources"`

View File

@ -28,31 +28,31 @@ tap:
persistentStorage: false persistentStorage: false
persistentStorageStatic: false persistentStorageStatic: false
efsFileSytemIdAndPath: "" efsFileSytemIdAndPath: ""
storageLimit: 500Mi storageLimit: 3000Mi
storageClass: standard storageClass: standard
dryRun: false dryRun: false
resources: resources:
hub: hub:
limits: limits:
cpu: 750m cpu: 1000m
memory: 1Gi memory: 1500Mi
requests: requests:
cpu: 50m cpu: 300m
memory: 50Mi memory: 500Mi
sniffer: sniffer:
limits: limits:
cpu: 750m cpu: 1000m
memory: 1Gi memory: 1500Mi
requests: requests:
cpu: 50m cpu: 300m
memory: 50Mi memory: 500Mi
tracer: tracer:
limits: limits:
cpu: 750m cpu: 1000m
memory: 1Gi memory: 1500Mi
requests: requests:
cpu: 50m cpu: 300m
memory: 50Mi memory: 500Mi
serviceMesh: true serviceMesh: true
tls: true tls: true
packetCapture: best packetCapture: best