From 6035dd6f940a79705dd4f51d34d240ebef0528fa Mon Sep 17 00:00:00 2001 From: Oleksandr Shalbanov Date: Tue, 19 Nov 2024 20:45:25 +0200 Subject: [PATCH] feat(chart): add requestTimeout for core-agent container Signed-off-by: Oleksandr Shalbanov --- chart/README.md | 2 ++ .../mayastor/agents/core/agent-core-deployment.yaml | 5 ++++- chart/values.yaml | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/chart/README.md b/chart/README.md index a9f9c2614..f0ffedf9b 100644 --- a/chart/README.md +++ b/chart/README.md @@ -70,10 +70,12 @@ This removes all the Kubernetes components associated with the chart and deletes | agents.​core.​capacity.​thin.​volumeCommitment | When creating replicas for an existing volume, each replica pool must have at least this much free space percentage of the volume size. Example: if this value is 40, the pool has 40GiB free, then the max volume size allowed to be created on the pool is 100GiB. | `"40%"` | | agents.​core.​capacity.​thin.​volumeCommitmentInitial | Same as the `volumeCommitment` argument, but applicable only when creating replicas for a new volume. | `"40%"` | | agents.​core.​logLevel | Log level for the core service | `"info"` | +| agents.​core.​minTimeouts | Enable minimal timeouts for core agents | `true` | | agents.​core.​priorityClassName | Set PriorityClass, overrides global. If both local and global are not set, the final deployment manifest has a mayastor custom critical priority class assigned to the pod by default. Refer the `templates/_helpers.tpl` and `templates/mayastor/agents/core/agent-core-deployment.yaml` for more details. | `""` | | agents.​core.​rebuild.​maxConcurrent | The maximum number of system-wide rebuilds permitted at any given time. If set to an empty string, there are no limits. | `""` | | agents.​core.​rebuild.​partial.​enabled | Partial rebuild uses a log of missed IO to rebuild replicas which have become temporarily faulted, hence a bit faster, depending on the log size. | `true` | | agents.​core.​rebuild.​partial.​waitPeriod | If a faulted replica comes back online within this time period then it will be rebuilt using the partial rebuild capability. Otherwise, the replica will be fully rebuilt. A blank value "" means internally derived value will be used. | `""` | +| agents.​core.​requestTimeout | Request timeout for core agents | `"5s"` | | agents.​core.​resources.​limits.​cpu | Cpu limits for core agents | `"1000m"` | | agents.​core.​resources.​limits.​memory | Memory limits for core agents | `"128Mi"` | | agents.​core.​resources.​requests.​cpu | Cpu requests for core agents | `"500m"` | diff --git a/chart/templates/mayastor/agents/core/agent-core-deployment.yaml b/chart/templates/mayastor/agents/core/agent-core-deployment.yaml index 271ebec72..dfe8e7f35 100644 --- a/chart/templates/mayastor/agents/core/agent-core-deployment.yaml +++ b/chart/templates/mayastor/agents/core/agent-core-deployment.yaml @@ -47,7 +47,10 @@ spec: imagePullPolicy: {{ .Values.image.pullPolicy }} args: - "--store={{ include "etcdUrl" . }}" - - "--request-timeout={{ .Values.base.default_req_timeout }}" + - "--request-timeout={{ default .Values.base.default_req_timeout .Values.agents.core.requestTimeout }}" + {{- if not .Values.agents.core.minTimeouts }} + - "--no-min-timeouts" + {{- end }} - "--cache-period={{ .Values.base.cache_poll_period }}"{{ if .Values.base.jaeger.enabled }} - "--jaeger={{ include "jaeger_url" . }}"{{ end }} - "--grpc-server-addr=[::]:50051" diff --git a/chart/values.yaml b/chart/values.yaml index c2ff98d95..a4e40a219 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -157,6 +157,11 @@ jaeger-operator: agents: core: + # -- Request timeout for core agents + # Default value is defined in .base.default_req_timeout + requestTimeout: + # -- Enable minimal timeouts + minTimeouts: true # -- Log level for the core service logLevel: info capacity: