Skip to content

Commit

Permalink
Change the default operator pprof port
Browse files Browse the repository at this point in the history
  • Loading branch information
RafalKorepta committed Dec 9, 2024
1 parent a849f9b commit b0a8f61
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 1 deletion.
4 changes: 4 additions & 0 deletions charts/redpanda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions charts/redpanda/statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
),
Expand Down
2 changes: 1 addition & 1 deletion charts/redpanda/templates/_statefulset.go.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
Expand Down
5 changes: 5 additions & 0 deletions charts/redpanda/testdata/template-cases.golden.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -21781,6 +21781,7 @@ spec:
- --namespace=default
- --health-probe-bind-address=:8085
- --metrics-bind-address=:9082
- --pprof-bind-address=:9083
- --additional-controllers=all
command:
- /manager
Expand Down Expand Up @@ -50579,6 +50580,7 @@ spec:
- --namespace=default
- --health-probe-bind-address=:8085
- --metrics-bind-address=:9082
- --pprof-bind-address=:9083
- --additional-controllers=all
command:
- /manager
Expand Down Expand Up @@ -107222,6 +107224,7 @@ spec:
- --namespace=default
- --health-probe-bind-address=:8085
- --metrics-bind-address=:9082
- --pprof-bind-address=:9083
- --additional-controllers=all
command:
- /manager
Expand Down Expand Up @@ -110465,6 +110468,7 @@ spec:
- --namespace=default
- --health-probe-bind-address=:8085
- --metrics-bind-address=:9082
- --pprof-bind-address=:9083
- --additional-controllers=all
command:
- /manager
Expand Down Expand Up @@ -112102,6 +112106,7 @@ spec:
- --namespace=default
- --health-probe-bind-address=:8085
- --metrics-bind-address=:9082
- --pprof-bind-address=:9083
- --additional-controllers=all
command:
- /manager
Expand Down
1 change: 1 addition & 0 deletions charts/redpanda/values.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
3 changes: 3 additions & 0 deletions charts/redpanda/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -19045,6 +19045,9 @@
"metricsAddress": {
"type": "string"
},
"pprofAddress": {
"type": "string"
},
"resources": true,
"run": {
"oneOf": [
Expand Down
1 change: 1 addition & 0 deletions charts/redpanda/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,7 @@ statefulset:
securityContext: {}
healthProbeAddress: ":8085"
metricsAddress: ":9082"
pprofAddress: ":9083"
run:
- all
createRBAC: true
Expand Down
1 change: 1 addition & 0 deletions charts/redpanda/values_partial.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b0a8f61

Please sign in to comment.