NOTE: This code is generated by AI.
Extract All Pod and related Entities (Deploy/ReplicaSet/Statefulset) with related HPA it will save these information to the file csv:
Namespace/Project Name of Pod Name of ReplicaSet/ReplicationController Name of Deployment/DeploymentConfig Name of StatefulSet Replicas HPA Name Min Pods Max Pods
As pre-requisited, you must have oc client and get,list role to all NS
# python3 ocp_to_csv.py --help
usage: ocp_to_csv.py [-h] [--exclude-ns EXCLUDE_NS]
Extract pod information and create a CSV file.
options:
-h, --help show this help message and exit
--exclude-ns EXCLUDE_NS
Namespaces to exclude (comma-separated)
example: this will extract all pod from all namespace except for those has test or dev in NS name
# python3 ocp_to_csv.py --exclude-ns=test,dev