Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jmx support #134

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,4 @@ Configure your Infinispan cluster by specifying values in the `deploy.*` section
| `deploy.volumeMounts` | Add custome volume mounts to infinispan | `[]` | - |
| `deploy.volumes` | Add custome volumes to infinispan | `[]` | - |
| `deploy.infinispan` | Infinispan Server configuration. | - | You should not change the default socket bindings or the security realm and endpoints named "metrics". Modifying these default properties can result in unexpected behavior and loss of service. |
| `deploy.jmx.enabled` | Enable or disable JMX support. | false | Setting the value to 'true' will enable jmx support. |
1 change: 1 addition & 0 deletions README.md.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,4 @@ Configure your {brandname} cluster by specifying values in the `deploy.*` sectio
| `deploy.volumeMounts` | Add custome volume mounts to infinispan | `[]` | - |
| `deploy.volumes` | Add custome volumes to infinispan | `[]` | - |
| `deploy.infinispan` | {brandname} Server configuration. | - | You should not change the default socket bindings or the security realm and endpoints named "metrics". Modifying these default properties can result in unexpected behavior and loss of service. |
| `deploy.jmx.enabled` | Enable or disable JMX support. | false | Setting the value to 'true' will enable jmx support. |
6 changes: 6 additions & 0 deletions templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,11 @@ spec:
{{- if and (eq (.Values.deploy.expose.type) "NodePort") (.Values.deploy.expose.nodePort) }}
nodePort: {{ .Values.deploy.expose.nodePort }}
{{- end}}
- port: 9999
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should only expose this port if jmx is enabled and I don't think we want to expose it via a nodeport as the port value from the template .Values.deploy.expose.nodePort will already be used by the "infinispan" port defined above.

I think the code should be more like:

   {{- if .Values.deploy.jmx.enabled }}
    - port: 9999
      protocol: TCP
      name: jmx
   {{- end}}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated . Thanks

protocol: TCP
name: jmx
{{- if and (eq (.Values.deploy.expose.type) "NodePort") (.Values.deploy.expose.nodePort) }}
nodePort: {{ .Values.deploy.expose.nodePort }}
{{- end}}
selector:
{{- include "infinispan-helm-charts.selectorLabels" . | nindent 4 }}
8 changes: 8 additions & 0 deletions templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ spec:
- --logging-config=/etc/config/log4j2.xml
- --bind-address=0.0.0.0
- -Djgroups.dns.query={{ printf "%s-ping.%s.svc.%s" (include "infinispan-helm-charts.name" .) .Release.Namespace .Values.deploy.clusterDomain }}
{{- if .Values.deploy.jmx.enabled }}
- --jmx 9999
{{- end }}
ports:
- containerPort: 8888
name: ping
Expand All @@ -94,6 +97,11 @@ spec:
- containerPort: 11223
name: infinispan-met
protocol: TCP
{{- if .Values.deploy.jmx.enabled }}
- containerPort: 9999
name: jmx
protocol: TCP
{{- end }}
livenessProbe:
failureThreshold: 5
httpGet:
Expand Down
13 changes: 13 additions & 0 deletions values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,19 @@
"null"
]
},
"jmx": {
"description": "Configuration for jmx support",
"properties": {
"enabled": {
"description": "Enable or disable JMX support",
"type": "boolean"
}
},
"type": [
"object",
"null"
]
},
"securityContext": {
"description": "Defines the securityContext policy used by the cluster's StatefulSet.",
"type": [
Expand Down
13 changes: 13 additions & 0 deletions values.schema.json.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,19 @@
"null"
]
},
"jmx": {
"description": "Configuration for jmx support",
"properties": {
"enabled": {
"description": "Enable or disable JMX support",
"type": "boolean"
}
},
"type": [
"object",
"null"
]
},
"securityContext": {
"description": "Defines the securityContext policy used by the cluster's StatefulSet.",
"type": [
Expand Down
3 changes: 3 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ deploy:

nodeSelector: {}

jmx:
enabled: false

securityContext: {}

volumeMounts: []
Expand Down
Loading