kind: Pod
apiVersion: v1
metadata:
  name: storage-plugin-pod
spec:
  containers:
    - name: storage-container
      image: 10.140.132.215:5001/armada-master/storage-file-plugin:latest # user can also use alchemyregistry.hursley.ibm.com:5000/armada-master/storage-file-plugin:latest
      securityContext:
        capabilities:
          add:
            - DAC_READ_SEARCH
      args:
        - "-provisioner=kubernetes.io/ibmc-file"
        - "-kubeconfig=/mnt/nfs/etc/kubernetes/admin-kubeconfig"
      env:
        - name: POD_IP
          valueFrom:
            fieldRef:
              fieldPath: status.podIP
        - name: STORAGE_CONFIG_PATH  # Storage plugin config path where secrets are mounted, this should be similar to secret mount path
          value: /etc/storage_ibmc   # same as secret mount path
        - name: CERT_PATH
          value: /mnt/nfs/etc/kubernetes/cert
      volumeMounts:
        - name:  certificate-path
          mountPath: /mnt/nfs
          readOnly: true
        - name: storagesecret
          mountPath: /etc/storage_ibmc
      imagePullPolicy: "IfNotPresent"
  volumes:
    - name: certificate-path
      persistentVolumeClaim:
        claimName: kubx-masters-nfs
    - name: storagesecret # resource name for secrets
      secret:
        secretName: storage-secret # secrets name which was created by using storage-secret.toml file
