File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9191 PUSHGATEWAY_URL=http://localhost:9091
9292 ```
9393
94+
95+ * run
96+ ```
97+ python -m src.main
98+ ```
99+
94100## Install locally with Docker
95- * build image
101+ * build
96102 ```
97103 docker build . --tag clustersnap: local
98104 ```
99105
100- * run image
106+ * run
101107 ```
102108 docker run clustersnap: local
103109 ```
113119 ```
114120* create pod
115121 ```
116- kubectl apply -f tests/pod .yaml -n NAMESPACE
122+ NAMESPACE=tenant-test0 envsubst < tests/resources .yaml | kubectl apply -f -
117123 ```
118124
119125
Load diff This file was deleted.
Original file line number Diff line number Diff line change 11import sys
22
3- from src .helpers .pvc import Kubernetes
3+ from src .helpers .kubernetes import Kubernetes
44
55
66def main ():
@@ -11,6 +11,18 @@ def main():
1111 for pvc in kubernetes .list_pvc ():
1212 print (f"- { pvc ['name' ]} [{ pvc ['status' ]} ] - { pvc ['capacity' ]} " )
1313
14+ mounts = kubernetes .get_pvc_mount_points (pvc )
15+ if not mounts :
16+ print ("PVC is not attached to an active pod." )
17+ else :
18+ for m in mounts :
19+ print (f"pods:" )
20+ print (f"- name: { m ['pod_name' ]} " )
21+ print (f" containers:" )
22+ print (f" - name: { m ['container_name' ]} " )
23+ print (f" mountpoints:" )
24+ print (f" - name: { m ['mount_path' ]} " )
25+ print (f" readonly: { m ['read_only' ]} " )
1426
1527if __name__ == "__main__" :
1628 sys .exit (main ())
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments