ibm-ecm / container-samples

Instructions and sample files for deploying with Kubernetes.
24 stars 24 forks source link

simplified storage setup same PVC per app. #17

Closed TiloGit closed 4 years ago

TiloGit commented 4 years ago

can we use same pvc per application like

         existing_pvc_for_css_cfgstore: "css-storage-pvc"
         existing_pvc_for_css_logstore: "css-storage-pvc"
         existing_pvc_for_css_tmpstore: "css-storage-pvc"
         existing_pvc_for_index: "css-storage-pvc"
         existing_pvc_for_css_customstore: "css-storage-pvc"

Looks like K8 doesn't like that. Tested on AKS with AzureFile Storage

Volumes:
  css-cfg-stor:
    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:  css-storage-pvc
    ReadOnly:   false
  css-log-stor:
    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:  css-storage-pvc
    ReadOnly:   false
  css-tmp-stor:
    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:  css-storage-pvc
    ReadOnly:   false
  custom-stor:
    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:  css-storage-pvc
    ReadOnly:   false
  index-stor:
    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:  css-storage-pvc
    ReadOnly:   false
...
QoS Class:       Burstable
Node-Selectors:  <none>
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type     Reason       Age                  From                               Message
  ----     ------       ----                 ----                               -------
  Warning  FailedMount  2m9s (x39 over 88m)  kubelet, aks-agentpool-999-2  Unable to mount volumes for pod "mydemo-css-deploy-1-6b54dbbf44-wnrds_vffnoperator(c55a9d78-1e57-4ed9-89f9-4334d4fdf71c)": timeout expired waiting for volumes to attach or mount for pod "vffnoperator"/"mydemo-css-deploy-1-6b54dbbf44-wnrds". list of unmounted volumes=[css-cfg-stor css-log-stor custom-stor index-stor]. list of unattachedvolumes=[css-cfg-stor css-log-stor css-tmp-stor custom-stor index-stor fncm-custom-keystore-volume default-token-82wvs]
lpchitta commented 4 years ago

You cannot use the same PVC for all . You will need one for each.

TiloGit commented 4 years ago

thanks for clarifying that. Would be great if playbook check that. Even better if we can get playbook create PVC for us (Dynamic Volume Provisioning). So just have the storage class set in the CR YAML>

lpchitta commented 4 years ago

We are working on providing that feature to create dynamic volume provisioning based on storage class. I will close this.