diff --git a/charts/sentry/README.md b/charts/sentry/README.md index 44846cca7..938a5491b 100644 --- a/charts/sentry/README.md +++ b/charts/sentry/README.md @@ -780,6 +780,7 @@ Note: this table is incomplete, so have a look at the values.yaml in case you mi | sentry.subscriptionConsumerTransactions.topologySpreadConstraints | list | `[]` | | | sentry.subscriptionConsumerTransactions.volumes | list | `[]` | | | sentry.taskBroker.affinity | object | `{}` | | +| sentry.taskBroker.brokers | list | (see `values.yaml`) | One broker StatefulSet per item (`name`, `topic`, `consumerGroup`, `replicas`, optional `resources` merged with `sentry.taskBroker.resources`). | | sentry.taskBroker.containerSecurityContext | object | `{}` | | | sentry.taskBroker.enabled | bool | `true` | | | sentry.taskBroker.env | list | `[]` | | @@ -790,7 +791,7 @@ Note: this table is incomplete, so have a look at the values.yaml in case you mi | sentry.taskBroker.persistence.storageClass | string | `""` | | | sentry.taskBroker.priorityClassName | string | `""` | | | sentry.taskBroker.replicas | int | `1` | | -| sentry.taskBroker.resources | object | `{}` | | +| sentry.taskBroker.resources | object | `{}` | Default container resources for task broker pods; merged with each broker’s `resources` in `sentry.taskBroker.brokers`. | | sentry.taskBroker.securityContext | object | `{}` | | | sentry.taskBroker.sidecars | list | `[]` | | | sentry.taskBroker.tolerations | list | `[]` | | @@ -812,13 +813,14 @@ Note: this table is incomplete, so have a look at the values.yaml in case you mi | sentry.taskWorker.nodeSelector | object | `{}` | | | sentry.taskWorker.priorityClassName | string | `""` | | | sentry.taskWorker.replicas | int | `1` | | -| sentry.taskWorker.resources | object | `{}` | | +| sentry.taskWorker.resources | object | `{}` | Default container resources for task worker pods; merged with each worker’s `resources` in `sentry.taskWorker.workers`. | | sentry.taskWorker.securityContext | object | `{}` | | | sentry.taskWorker.sidecars | list | `[]` | | | sentry.taskWorker.tolerations | list | `[]` | | | sentry.taskWorker.topologySpreadConstraints | list | `[]` | | | sentry.taskWorker.volumeMounts | list | `[]` | | | sentry.taskWorker.volumes | list | `[]` | | +| sentry.taskWorker.workers | list | (see `values.yaml`) | One task worker Deployment per item (`name`, `brokerName`, `brokerReplicas`, `replicas`, `concurrency`, optional `resources` merged with `sentry.taskWorker.resources`, optional `autoscaling` overriding `sentry.taskWorker.autoscaling`). | | sentry.web.affinity | object | `{}` | | | sentry.web.autoscaling.enabled | bool | `false` | | | sentry.web.autoscaling.maxReplicas | int | `5` | | diff --git a/charts/sentry/templates/sentry/taskbroker/statefulset-taskbroker.yaml b/charts/sentry/templates/sentry/taskbroker/statefulset-taskbroker.yaml index adaa24b87..1d0c43ed9 100644 --- a/charts/sentry/templates/sentry/taskbroker/statefulset-taskbroker.yaml +++ b/charts/sentry/templates/sentry/taskbroker/statefulset-taskbroker.yaml @@ -102,8 +102,9 @@ spec: ports: - containerPort: 50051 name: grpc +{{- $taskBrokerResources := mergeOverwrite (deepCopy (default dict $root.Values.sentry.taskBroker.resources)) (deepCopy (default dict $broker.resources)) }} resources: -{{ toYaml $root.Values.sentry.taskBroker.resources | indent 10 }} +{{ toYaml $taskBrokerResources | indent 10 }} {{- if $root.Values.sentry.taskBroker.containerSecurityContext }} securityContext: {{ toYaml $root.Values.sentry.taskBroker.containerSecurityContext | indent 10 }} diff --git a/charts/sentry/templates/sentry/taskworker/deployment-taskworker.yaml b/charts/sentry/templates/sentry/taskworker/deployment-taskworker.yaml index 57d500400..c22e02cfa 100644 --- a/charts/sentry/templates/sentry/taskworker/deployment-taskworker.yaml +++ b/charts/sentry/templates/sentry/taskworker/deployment-taskworker.yaml @@ -114,8 +114,9 @@ spec: {{- if $root.Values.sentry.taskWorker.env }} {{ toYaml $root.Values.sentry.taskWorker.env | indent 8 }} {{- end }} +{{- $taskWorkerResources := mergeOverwrite (deepCopy (default dict $root.Values.sentry.taskWorker.resources)) (deepCopy (default dict $worker.resources)) }} resources: -{{ toYaml $root.Values.sentry.taskWorker.resources | indent 10 }} +{{ toYaml $taskWorkerResources | indent 10 }} {{- if $root.Values.sentry.taskWorker.containerSecurityContext }} securityContext: {{ toYaml $root.Values.sentry.taskWorker.containerSecurityContext | indent 10 }} diff --git a/charts/sentry/values.yaml b/charts/sentry/values.yaml index 84ac76532..6495b2593 100644 --- a/charts/sentry/values.yaml +++ b/charts/sentry/values.yaml @@ -358,6 +358,7 @@ sentry: # persistentVolumeClaimRetentionPolicy: # whenDeleted: Retain # or Delete # whenScaled: Retain # or Delete + # brokers[].resources -- Optional per-broker container resources; merged over taskBroker.resources (broker keys win). brokers: - name: default topic: taskworker @@ -420,6 +421,7 @@ sentry: initialDelaySeconds: 10 periodSeconds: 10 timeoutSeconds: 5 + # workers[].resources -- Optional per-worker container resources; merged over taskWorker.resources (worker keys win). workers: - name: default brokerName: default