operator
operator copied to clipboard
PWX-35917 Adding k8s resources retriever binary and job
Portworx Kubernetes resources retriever
This is a simple Kubernetes client written in Go. It interacts with the Kubernetes API to retrieve information about Kubernetes resources like Deployments, Pods, and Services in a specific namespace.
Prerequisites
Description
The client can run either inside a Kubernetes cluster or outside of it. When running outside, it uses a kubeconfig
file for authentication. When running inside a cluster, it uses the service account token provided by Kubernetes.
The client retrieves the list of Deployments, Pods, and Services, and saves them to individual YAML files.
How to use
This tool retrieves Kubernetes objects and Portworx volume information.
Flags:
-kubeconfig string
Path to the kubeconfig file. Specifies the path to the kubeconfig file to use for connection to the Kubernetes cluster.
-namespace string
Portworx namespace. Specifies the Kubernetes namespace in which Portworx is running. (default "portworx")
-output_dir string
Output directory path. Specifies the directory where output files will be stored. (default "/var/cores/px-k8s-retriever")
Examples:
./retriever --namespace portworx --kubeconfig /path/to/kubeconfig --output_dir /var/cores
./retriever --namespace kube-system --output_dir /tmp
Please specify --namespace, --kubeconfig (if connecting outside the cluster), and --output_dir when running the tool.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 75.75%. Comparing base (
f08ac8a
) to head (a0b052c
). Report is 11 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #1439 +/- ##
=======================================
Coverage 75.75% 75.75%
=======================================
Files 77 77
Lines 20797 20797
=======================================
Hits 15755 15755
Misses 3920 3920
Partials 1122 1122
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This PR is stale because it has been open for 90 days with no activity. Update this PR or it will be automatically closed in 30 days.