apiVersion: piraeus.io/v1
kind: LinstorSatelliteConfiguration
metadata:
  name: cozystack-plunger
spec:
  internalTLS:
    certManager:
      name: linstor-internal-ca
      kind: Issuer
  podTemplate:
    spec:
      containers:
      - name: plunger
        image: {{ include "cozy.linstor.version.satellite" . }}
        command:
        - "/scripts/plunger-satellite.sh"
        securityContext:
          capabilities:
            add:
            - NET_ADMIN
            - SYS_ADMIN
            drop:
            - ALL
          privileged: true
          # make some room for live debugging
          readOnlyRootFilesystem: false
        volumeMounts:
        - mountPath: /dev
          name: dev
        - mountPath: /var/lib/drbd
          name: var-lib-drbd
        - mountPath: /var/lib/linstor.d
          name: var-lib-linstor-d
        - mountPath: /etc/lvm
          name: container-etc-lvm
        - mountPath: /etc/lvm/archive
          name: etc-lvm-archive
        - mountPath: /etc/lvm/backup
          name: etc-lvm-backup
        - mountPath: /run/lock/lvm
          name: run-lock-lvm
        - mountPath: /run/lvm
          name: run-lvm
        - mountPath: /run/udev
          name: run-udev
          readOnly: true
        - mountPath: /scripts
          name: script-volume
          readOnly: true
      - name: drbd-logger
        image: {{ include "cozy.linstor.version.satellite" . }}
        command:
        - "/scripts/plunger-drbd-logger.sh"
        securityContext:
          capabilities:
            add:
            - NET_ADMIN
            - SYS_ADMIN
            drop:
            - ALL
          privileged: true
          readOnlyRootFilesystem: false
        volumeMounts:
        - mountPath: /dev
          name: dev
        - mountPath: /var/lib/drbd
          name: var-lib-drbd
        - mountPath: /var/lib/linstor.d
          name: var-lib-linstor-d
        - mountPath: /scripts
          name: script-volume
          readOnly: true
      volumes:
      - name: script-volume
        configMap:
          name: linstor-plunger
          defaultMode: 0755
