diff --git a/charts/streams-app/README.md b/charts/streams-app/README.md index 526c7dbd..bf44c98d 100644 --- a/charts/streams-app/README.md +++ b/charts/streams-app/README.md @@ -79,9 +79,11 @@ Alternatively, a YAML file that specifies the values for the parameters can be p ### JMX Configuration -| Parameter | Description | Default | -|------------|---------------------------------------------------|---------| -| `jmx.port` | The jmx port which JMX style metrics are exposed. | `5555` | +| Parameter | Description | Default | +|---------------|-------------------------------------------------------------------------|-------------| +| `jmx.enabled` | Whether or not to open JMX port for remote access (e.g., for debugging) | `false` | +| `jmx.port` | The JMX port which JMX style metrics are exposed. | `5555` | +| `jmx.host` | The host to use for JMX remote access. | `localhost` | ### Prometheus JMX Exporter Configuration diff --git a/charts/streams-app/templates/deployment.yaml b/charts/streams-app/templates/deployment.yaml index f6320fc5..e418633f 100644 --- a/charts/streams-app/templates/deployment.yaml +++ b/charts/streams-app/templates/deployment.yaml @@ -174,6 +174,10 @@ spec: value: '-Dcom.sun.management.jmxremote.port={{ .Values.jmx.port }} -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false + {{- if .Values.jmx.enabled }} + -Djava.rmi.server.hostname={{ .Values.jmx.host }} + -Dcom.sun.management.jmxremote.rmi.port={{ .Values.jmx.port }} + {{- end }} -XX:MaxRAMPercentage={{ printf "%.1f" .Values.javaOptions.maxRAMPercentage }} {{ .Values.javaOptions.others | join " " }}' {{- if or (.Values.files) (and .Values.persistence.enabled .Values.statefulSet) (.Values.secretFilesRefs) }} @@ -207,7 +211,7 @@ spec: protocol: {{ .protocol | quote }} {{- end }} {{- end }} - {{- if .Values.prometheus.jmx.enabled }} + {{- if .Values.jmx.enabled }} - containerPort: {{ .Values.jmx.port }} name: jmx {{- end }} diff --git a/charts/streams-app/values.yaml b/charts/streams-app/values.yaml index 1add0c52..2c6eec6c 100644 --- a/charts/streams-app/values.yaml +++ b/charts/streams-app/values.yaml @@ -92,7 +92,9 @@ readinessProbe: {} ## Kafka Connect JMX Settings ## ref: https://kafka.apache.org/documentation/#connect_monitoring jmx: + enabled: false port: 5555 + host: localhost autoscaling: enabled: false