diff --git a/charts/redpanda/README.md b/charts/redpanda/README.md index 721fefef49..8056a9df5d 100644 --- a/charts/redpanda/README.md +++ b/charts/redpanda/README.md @@ -967,6 +967,10 @@ To create `Guaranteed` Pods for Redpanda brokers, provide both requests and limi **Default:** `":9082"` +### [statefulset.sideCars.controllers.pprofAddress](https://artifacthub.io/packages/helm/redpanda-data/redpanda?modal=values&path=statefulset.sideCars.controllers.pprofAddress) + +**Default:** `":9083"` + ### [statefulset.sideCars.controllers.resources](https://artifacthub.io/packages/helm/redpanda-data/redpanda?modal=values&path=statefulset.sideCars.controllers.resources) To create `Guaranteed` Pods for Redpanda brokers, provide both requests and limits for CPU and memory. For details, see https://kubernetes.io/docs/tasks/configure-pod-container/quality-service-pod/#create-a-pod-that-gets-assigned-a-qos-class-of-guaranteed * Every container in the Pod must have a CPU limit and a CPU request. * For every container in the Pod, the CPU limit must equal the CPU request. * Every container in the Pod must have a CPU limit and a CPU request. * For every container in the Pod, the CPU limit must equal the CPU request. To maximize efficiency, use the `static` CPU manager policy by specifying an even integer for CPU resource requests and limits. This policy gives the Pods running Redpanda brokers access to exclusive CPUs on the node. For details, see https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#static-policy diff --git a/charts/redpanda/statefulset.go b/charts/redpanda/statefulset.go index 622c90d53e..7ac2ab1a7d 100644 --- a/charts/redpanda/statefulset.go +++ b/charts/redpanda/statefulset.go @@ -965,6 +965,9 @@ func statefulSetContainerControllers(dot *helmette.Dot) *corev1.Container { fmt.Sprintf(`--metrics-bind-address=%s`, values.Statefulset.SideCars.Controllers.MetricsAddress, ), + fmt.Sprintf(`--pprof-bind-address=%s`, + values.Statefulset.SideCars.Controllers.PprofAddress, + ), fmt.Sprintf(`--additional-controllers=%s`, helmette.Join(",", values.Statefulset.SideCars.Controllers.Run), ), diff --git a/charts/redpanda/templates/_statefulset.go.tpl b/charts/redpanda/templates/_statefulset.go.tpl index 6c1f9bbaf4..4485c3afb8 100644 --- a/charts/redpanda/templates/_statefulset.go.tpl +++ b/charts/redpanda/templates/_statefulset.go.tpl @@ -504,7 +504,7 @@ {{- $volumeMounts = (concat (default (list ) $volumeMounts) (list (mustMergeOverwrite (dict "name" "" "mountPath" "" ) (dict "name" $mountName "readOnly" true "mountPath" "/var/run/secrets/kubernetes.io/serviceaccount" )))) -}} {{- end -}} {{- $_is_returning = true -}} -{{- (dict "r" (mustMergeOverwrite (dict "name" "" "resources" (dict ) ) (dict "name" "redpanda-controllers" "image" (printf `%s:%s` $values.statefulset.sideCars.controllers.image.repository $values.statefulset.sideCars.controllers.image.tag) "command" (list `/manager`) "args" (list `--operator-mode=false` (printf `--namespace=%s` $dot.Release.Namespace) (printf `--health-probe-bind-address=%s` $values.statefulset.sideCars.controllers.healthProbeAddress) (printf `--metrics-bind-address=%s` $values.statefulset.sideCars.controllers.metricsAddress) (printf `--additional-controllers=%s` (join "," $values.statefulset.sideCars.controllers.run))) "env" (list (mustMergeOverwrite (dict "name" "" ) (dict "name" "REDPANDA_HELM_RELEASE_NAME" "value" $dot.Release.Name ))) "resources" $values.statefulset.sideCars.controllers.resources "securityContext" $values.statefulset.sideCars.controllers.securityContext "volumeMounts" $volumeMounts ))) | toJson -}} +{{- (dict "r" (mustMergeOverwrite (dict "name" "" "resources" (dict ) ) (dict "name" "redpanda-controllers" "image" (printf `%s:%s` $values.statefulset.sideCars.controllers.image.repository $values.statefulset.sideCars.controllers.image.tag) "command" (list `/manager`) "args" (list `--operator-mode=false` (printf `--namespace=%s` $dot.Release.Namespace) (printf `--health-probe-bind-address=%s` $values.statefulset.sideCars.controllers.healthProbeAddress) (printf `--metrics-bind-address=%s` $values.statefulset.sideCars.controllers.metricsAddress) (printf `--pprof-bind-address=%s` $values.statefulset.sideCars.controllers.pprofAddress) (printf `--additional-controllers=%s` (join "," $values.statefulset.sideCars.controllers.run))) "env" (list (mustMergeOverwrite (dict "name" "" ) (dict "name" "REDPANDA_HELM_RELEASE_NAME" "value" $dot.Release.Name ))) "resources" $values.statefulset.sideCars.controllers.resources "securityContext" $values.statefulset.sideCars.controllers.securityContext "volumeMounts" $volumeMounts ))) | toJson -}} {{- break -}} {{- end -}} {{- end -}} diff --git a/charts/redpanda/values.go b/charts/redpanda/values.go index 8984c944b6..9091bc96da 100644 --- a/charts/redpanda/values.go +++ b/charts/redpanda/values.go @@ -584,6 +584,7 @@ type Statefulset struct { SecurityContext *corev1.SecurityContext `json:"securityContext"` HealthProbeAddress string `json:"healthProbeAddress"` MetricsAddress string `json:"metricsAddress"` + PprofAddress string `json:"pprofAddress"` Run []string `json:"run"` } `json:"controllers"` } `json:"sideCars" jsonschema:"required"` diff --git a/charts/redpanda/values.schema.json b/charts/redpanda/values.schema.json index 02d485966a..85f6496972 100644 --- a/charts/redpanda/values.schema.json +++ b/charts/redpanda/values.schema.json @@ -19045,6 +19045,9 @@ "metricsAddress": { "type": "string" }, + "pprofAddress": { + "type": "string" + }, "resources": true, "run": { "oneOf": [ diff --git a/charts/redpanda/values.yaml b/charts/redpanda/values.yaml index 59936c0187..00192519b8 100644 --- a/charts/redpanda/values.yaml +++ b/charts/redpanda/values.yaml @@ -712,6 +712,7 @@ statefulset: securityContext: {} healthProbeAddress: ":8085" metricsAddress: ":9082" + pprofAddress: ":9083" run: - all createRBAC: true diff --git a/charts/redpanda/values_partial.gen.go b/charts/redpanda/values_partial.gen.go index c7b6abd0ea..1927d33d57 100644 --- a/charts/redpanda/values_partial.gen.go +++ b/charts/redpanda/values_partial.gen.go @@ -237,6 +237,7 @@ type PartialStatefulset struct { SecurityContext *corev1.SecurityContext "json:\"securityContext,omitempty\"" HealthProbeAddress *string "json:\"healthProbeAddress,omitempty\"" MetricsAddress *string "json:\"metricsAddress,omitempty\"" + PprofAddress *string "json:\"pprofAddress,omitempty\"" Run []string "json:\"run,omitempty\"" } "json:\"controllers,omitempty\"" } "json:\"sideCars,omitempty\" jsonschema:\"required\""