Skip to content

Aladdin-97/ocp-to-csv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

ocp-to-csv

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

Run

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 

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages