apiVersion: apps/v1
kind: Deployment
metadata:
  name: jmxpromo-sidecar-demo
  labels:
    app: jmxpromo-sidecar-demo
spec:
  replicas: 1
  selector:
    matchLabels:
      app: jmxpromo-sidecar-demo
  template:
    metadata:
      labels:
        app: jmxpromo-sidecar-demo
    spec:
      shareProcessNamespace: true
      containers:
      - name: main
        image: flokkr/jmxpromo-sidecar
        volumeMounts:
          - name: temp
            mountPath: "/tmp"
        command: ["java"]
        args: ["Test"]
      - name: jmxpromo
        image: flokkr/jmxpromo-sidecar
        volumeMounts:
          - name: temp
            mountPath: "/tmp"
      volumes:
        - name: temp
          emptyDir:
             medium: Memory