aboutsummaryrefslogtreecommitdiff
path: root/test/jmx-selftest.yml
blob: 2d28b14f0dec7657b947a9be681f088ec6c89e97 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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:40a6ab24ccac0ed5acb8c02dccfbb1f5924fd97f46c0450e0245686c24138b53
        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