diff options
-rw-r--r-- | test/jmx-selftest.yml | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/test/jmx-selftest.yml b/test/jmx-selftest.yml new file mode 100644 index 0000000..9b2a050 --- /dev/null +++ b/test/jmx-selftest.yml @@ -0,0 +1,41 @@ +# Sets up a pod that monitors itself, to test resource usage etc. +# kubectl exec -n test-kafka jmx-selftest-... -- /bin/sh -c 'apk add --no-cache curl && curl http://localhost:5556/metrics' +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: jmx-selftest + namespace: test-kafka +spec: + replicas: 1 + template: + metadata: + labels: + test-target: jmx-exporter + test-type: readiness + # Uncomment to test with Prometheus + #annotations: + # prometheus.io/scrape: "true" + # prometheus.io/port: "5556" + spec: + containers: + - name: monitor + image: solsson/kafka-prometheus-jmx-exporter@sha256:1f7c96c287a2dbec1d909cd8f96c0656310239b55a9a90d7fd12c81f384f1f7d + command: + - java + - -Dcom.sun.management.jmxremote.ssl=false + - -Dcom.sun.management.jmxremote.authenticate=false + - -Dcom.sun.management.jmxremote.port=5555 + - -jar + - jmx_prometheus_httpserver.jar + - "5556" + - example_configs/httpserver_sample_config.yml + ports: + - name: jmx + containerPort: 5555 + - name: slashmetrics + containerPort: 5556 + # Test run, again and again + readinessProbe: + httpGet: + path: /metrics + port: 5556 |