apiVersion: apps/v1
kind: Deployment
metadata:
  name: shmwrapper
  namespace: shmwrapper
spec:
  replicas: 1
  selector:
    matchLabels:
      app: shmwrapper
  template:
    metadata:
      labels:
        app: shmwrapper
    spec:
      containers:
        - name: shmwrapper-writer
          image: alpine:3.12.0
          command: ["/bin/sh"]
          args: ["-c", "apk add --no-cache gcc musl-dev curl make unzip
            && curl https://github.com/idrissneumann/shmwrapper/archive/master.zip -L -o shmwrapper.zip
            && unzip shmwrapper.zip
            && cd shmwrapper-master
            && make all_without_test
            && make test_write
          "]
        - name: shmwrapper-reader
          image: alpine:3.12.0
          command: ["/bin/sh"]
          args: ["-c", "apk add --no-cache gcc musl-dev curl make unzip
            && curl https://github.com/idrissneumann/shmwrapper/archive/master.zip -L -o shmwrapper.zip
            && unzip shmwrapper.zip
            && cd shmwrapper-master
            && make all_without_test
            && sleep 2
            && make test_read
            && make test_clear
          "]
