IBM / ibm-object-csi-driver

Object storage plugin for IBM satellite
Apache License 2.0
3 stars 8 forks source link

remove restriction on pvc creation #124

Closed ashimagarg27 closed 5 months ago

ashimagarg27 commented 5 months ago

Describe your changes

Issue ticket number and link

Checklist before requesting a review

ashimagarg27 commented 5 months ago

Test Results

~ ❯ oc get all -n kube-system | grep csi                                                                                                                                                       4s ⎈ ashima-sat/cp0u7tkd0gdarrvi9cbg/admin 14:29:49
Warning: apps.openshift.io/v1 DeploymentConfig is deprecated in v4.14+, unavailable in v4.10000+
pod/cos-s3-csi-controller-6698854987-84cr7           3/3     Running   0          54s
pod/cos-s3-csi-driver-fb6gk                          3/3     Running   0          53s
pod/cos-s3-csi-driver-t7j2c                          3/3     Running   0          53s
pod/cos-s3-csi-driver-xs9tt                          3/3     Running   0          53s
daemonset.apps/cos-s3-csi-driver         3         3         3       3            3           <none>          55s
deployment.apps/cos-s3-csi-controller       1/1     1            1           56s
replicaset.apps/cos-s3-csi-controller-6698854987       1         1         1       57s

~ ❯ oc get deployment.apps/cos-s3-csi-controller -n kube-system -o yaml | grep image                                                                                                        ✘ 1|1 ⎈ ashima-sat/cp0u7tkd0gdarrvi9cbg/admin 14:30:25
      {"apiVersion":"apps/v1","kind":"Deployment","metadata":{"annotations":{},"labels":{"app.kubernetes.io/managed-by":"kustomize","app.kubernetes.io/part-of":"ibm-object-csi-driver"},"name":"cos-s3-csi-controller","namespace":"kube-system"},"spec":{"replicas":1,"selector":{"matchLabels":{"app":"cos-s3-csi-controller","app.kubernetes.io/managed-by":"kustomize","app.kubernetes.io/part-of":"ibm-object-csi-driver"}},"template":{"metadata":{"labels":{"app":"cos-s3-csi-controller","app.kubernetes.io/managed-by":"kustomize","app.kubernetes.io/part-of":"ibm-object-csi-driver"}},"spec":{"containers":[{"args":["--csi-address=$(ADDRESS)","--timeout=180s","--v=5"],"env":[{"name":"ADDRESS","value":"/csi/csi.sock"}],"image":"k8s.gcr.io/sig-storage/csi-provisioner:v3.4.1","imagePullPolicy":"Always","name":"csi-provisioner","volumeMounts":[{"mountPath":"/csi","name":"socket-dir"}]},{"args":["--servermode=controller","--endpoint=$(CSI_ENDPOINT)","--nodeid=$(NODE_ID)","--logtostderr=true","--v=5"],"env":[{"name":"CSI_ENDPOINT","value":"unix:///csi/csi.sock"},{"name":"NODE_ID","valueFrom":{"fieldRef":{"fieldPath":"spec.nodeName"}}}],"image":"docker.io/ashimagarg/pvclimit:test","imagePullPolicy":"Always","name":"cos-csi-provisioner","volumeMounts":[{"mountPath":"/csi","name":"socket-dir"}]},{"args":["--csi-address=/csi/csi.sock"],"env":[{"name":"ADDRESS","value":"/csi/csi.sock"}],"image":"registry.k8s.io/sig-storage/livenessprobe:v2.9.0","name":"liveness-probe","volumeMounts":[{"mountPath":"/csi","name":"socket-dir"}]}],"serviceAccountName":"cos-s3-csi-controller","volumes":[{"hostPath":{"path":"/var/lib/kubelet/csi-plugins/cos.s3.csi.ibm.io","type":"DirectoryOrCreate"},"name":"socket-dir"}]}}}}
        image: k8s.gcr.io/sig-storage/csi-provisioner:v3.4.1
        imagePullPolicy: Always
        image: docker.io/ashimagarg/pvclimit:test
        imagePullPolicy: Always
        image: registry.k8s.io/sig-storage/livenessprobe:v2.9.0
        imagePullPolicy: IfNotPresent

~ ❯ oc get secret | grep csi                                                                                                                                                                      ⎈ ashima-sat/cp0u7tkd0gdarrvi9cbg/admin 14:30:43
cos-s3-csi-pvc-rclone      cos-s3-csi-driver                     6      7d20h
cos-s3-csi-pvc-s3fs        cos-s3-csi-driver                     6      7d20h

~ ❯ oc get pvc                                                                                                                                                                                    ⎈ ashima-sat/cp0u7tkd0gdarrvi9cbg/admin 14:32:38
NAME                    STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS           AGE
cos-s3-csi-pvc-rclone   Bound    pvc-10fb5007-fef5-4e07-8b1a-b2823363b661   100Gi      RWO            cos-s3-csi-rclone-sc   8s
cos-s3-csi-pvc-s3fs     Bound    pvc-01a2fd71-a250-4bc4-9b0c-1087715397f7   256Mi      RWO            cos-s3-csi-s3fs-sc     7s

~ ❯ oc get pv                                                                                                                                                                                     ⎈ ashima-sat/cp0u7tkd0gdarrvi9cbg/admin 14:32:43
NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS     CLAIM                           STORAGECLASS           REASON   AGE
pvc-01a2fd71-a250-4bc4-9b0c-1087715397f7   256Mi      RWO            Retain           Bound      default/cos-s3-csi-pvc-s3fs     cos-s3-csi-s3fs-sc              12s
pvc-10fb5007-fef5-4e07-8b1a-b2823363b661   100Gi      RWO            Retain           Bound      default/cos-s3-csi-pvc-rclone   cos-s3-csi-rclone-sc            12s

~ ❯ oc get pod                                                                                                                                                                                    ⎈ ashima-sat/cp0u7tkd0gdarrvi9cbg/admin 14:33:07
NAME          READY   STATUS    RESTARTS   AGE
cos-csi-app   1/1     Running   0          8s

~ ❯ oc exec -it cos-csi-app -- /bin/bash                                                                                                                                                          ⎈ ashima-sat/cp0u7tkd0gdarrvi9cbg/admin 14:33:10
root@cos-csi-app:/# mount | grep s3
s3fs on /data1 type fuse.s3fs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
root@cos-csi-app:/# mount | grep rclone
ibmcos:ashima-bucket02 on /data2 type fuse.rclone (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
root@cos-csi-app:/#
root@cos-csi-app:/#
root@cos-csi-app:/# lc /data1
bash: lc: command not found
root@cos-csi-app:/# ls /data1
Medibuddy_2024.pdf  new.txt  test.txt
root@cos-csi-app:/# ls /data2
Medibuddy_2024.pdf  new.txt  test.txt
root@cos-csi-app:/#
root@cos-csi-app:/#
root@cos-csi-app:/# cat /data1/test.txt
testing2
root@cos-csi-app:/# echo "s3fs" > /data1/test.txt
root@cos-csi-app:/# cat /data1/test.txt
s3fs
root@cos-csi-app:/#
root@cos-csi-app:/#
root@cos-csi-app:/# cat /data2/test.txt
s3fs
root@cos-csi-app:/# echo "rclone"  > /data2/test.txt
root@cos-csi-app:/# cat /data2/test.txt
rclone
root@cos-csi-app:/#
root@cos-csi-app:/#
root@cos-csi-app:/# exit
exit

~ ❯