Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deployment): adjust resource requests #617

Merged
merged 4 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,21 +156,21 @@ If the sidecar's resource requests are not specified, they are set with the foll

| Request | Quantity |
|---------|----------|
| Reports Container CPU | 128m |
| Reports Container Memory | 256Mi |
| Reports Container CPU | 200m |
| Reports Container Memory | 384Mi |


### Resource Requirements
By default, the operator deploys Cryostat with pre-configured resource requests:

| Request | Quantity |
|---------|----------|
| Cryostat container CPU | 100m |
| Cryostat container Memory | 384Mi |
| JFR Data Source container CPU | 100m |
| JFR Data Source container Memory | 512Mi |
| Cryostat container CPU | 500m |
| Cryostat container Memory | 256Mi |
| JFR Data Source container CPU | 200m |
| JFR Data Source container Memory | 384Mi |
| Grafana container CPU | 100m |
| Grafana container Memory | 256Mi |
| Grafana container Memory | 120Mi |

Using the Cryostat custom resource, you can define resources requests and/or limits for each of the three containers in Cryostat's main pod:
- the `core` container running the Cryostat backend and web application. If setting a memory limit for this container, we recommend at least 768MiB.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ type TLSConfig struct {
}

const (
defaultCoreCpuRequest string = "100m"
defaultCoreMemoryRequest string = "384Mi"
defaultJfrDatasourceCpuRequest string = "100m"
defaultJfrDatasourceMemoryRequest string = "512Mi"
defaultCoreCpuRequest string = "500m"
defaultCoreMemoryRequest string = "256Mi"
defaultJfrDatasourceCpuRequest string = "200m"
defaultJfrDatasourceMemoryRequest string = "384Mi"
defaultGrafanaCpuRequest string = "100m"
defaultGrafanaMemoryRequest string = "256Mi"
defaultReportCpuRequest string = "128m"
defaultReportMemoryRequest string = "256Mi"
defaultGrafanaMemoryRequest string = "120Mi"
defaultReportCpuRequest string = "200m"
defaultReportMemoryRequest string = "384Mi"
)

func NewDeploymentForCR(cr *model.CryostatInstance, specs *ServiceSpecs, imageTags *ImageTags,
Expand Down
14 changes: 7 additions & 7 deletions internal/test/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -2655,8 +2655,8 @@ func (r *TestResources) NewApiServerWithApplicationURL() *configv1.APIServer {
func newCoreContainerDefaultResource() *corev1.ResourceRequirements {
return &corev1.ResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse("100m"),
corev1.ResourceMemory: resource.MustParse("384Mi"),
corev1.ResourceCPU: resource.MustParse("500m"),
corev1.ResourceMemory: resource.MustParse("256Mi"),
},
}
}
Expand All @@ -2683,8 +2683,8 @@ func (r *TestResources) NewCoreContainerResource(cr *model.CryostatInstance) *co
func newDatasourceContainerDefaultResource() *corev1.ResourceRequirements {
return &corev1.ResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse("100m"),
corev1.ResourceMemory: resource.MustParse("512Mi"),
corev1.ResourceCPU: resource.MustParse("200m"),
corev1.ResourceMemory: resource.MustParse("384Mi"),
},
}
}
Expand Down Expand Up @@ -2712,7 +2712,7 @@ func newGrafanaContainerDefaultResource() *corev1.ResourceRequirements {
return &corev1.ResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse("100m"),
corev1.ResourceMemory: resource.MustParse("256Mi"),
corev1.ResourceMemory: resource.MustParse("120Mi"),
},
}
}
Expand All @@ -2739,8 +2739,8 @@ func (r *TestResources) NewGrafanaContainerResource(cr *model.CryostatInstance)
func newReportContainerDefaultResource() *corev1.ResourceRequirements {
return &corev1.ResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse("128m"),
corev1.ResourceMemory: resource.MustParse("256Mi"),
corev1.ResourceCPU: resource.MustParse("200m"),
corev1.ResourceMemory: resource.MustParse("384Mi"),
},
}
}
Expand Down
Loading