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

docs(resources): document default resource requests #478

Merged
merged 3 commits into from
Oct 20, 2022
Merged
Changes from 2 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
25 changes: 23 additions & 2 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,27 @@ spec:
subProcessMaxHeapSize: 200
```

If the sidecar's resource requests are not specified, they are set with the following defaults:

| Request | Quantity |
|---------|----------|
| defaultReportCpuRequest | 128m |
tthvo marked this conversation as resolved.
Show resolved Hide resolved
| defaultReportMemoryRequest | 256Mi |


### Resource Requirements
By default, the operator deploys Cryostat without any [resource requests or limits](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) set. Using the Cryostat custom resource, you can define resources requests and/or limits for each of the three containers in Cryostat's main pod:
By default, the operator deploys Cryostat with pre-configured resource requests:

| Request | Quantity |
|---------|----------|
| defaultCoreCpuRequest | 100m |
| defaultCoreMemoryRequest | 384Mi |
| defaultJfrDatasourceCpuRequest | 100m |
| defaultJfrDatasourceMemoryRequest | 512Mi |
| defaultGrafanaCpuRequest | 1000m |
| defaultGrafanaMemoryRequest | 256Mi |
tthvo marked this conversation as resolved.
Show resolved Hide resolved

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.
- the `datasource` container running JFR Data Source, which converts recordings into a Grafana-compatible format.
- the `grafana` container running the Grafana instance customized for Cryostat.
Expand Down Expand Up @@ -188,6 +207,8 @@ spec:
```
This example sets CPU and memory requests and limits for each container, but you may choose to define any combination of requests and limits that suits your use case.

Note that if you define limits lower than the default requests, the resource requests will be set to the value of your provided limits.

### Network Options
When running on Kubernetes, the operator requires Ingress configurations for each of its services to make them available outside of the cluster. For a `Cryostat` object named `x`, the following Ingress configurations must be specified within the `spec.networkOptions` property:
- `coreConfig` exposing the service `x` on port `8181` (or alternate specified in [Service Options](#service-options)).
Expand Down Expand Up @@ -341,7 +362,7 @@ Each `configMapName` must refer to the name of a Config Map in the same namespac

### Security Context

With [Pod Security Admission](https://kubernetes.io/docs/concepts/security/pod-security-admission/), pods must be properly configured under the enforced security standards defined globally or on namspace level to be admitted to launch.
With [Pod Security Admission](https://kubernetes.io/docs/concepts/security/pod-security-admission/), pods must be properly configured under the enforced security standards defined globally or on namespace level to be admitted to launch.

The user is responsible for ensuring the security contexts of their workloads to meet these standards. The property `spec.securityOptions` can be set to define security contexts for Cryostat application and `spec.reportOptions.securityOptions` is for its report sidecar.

Expand Down