Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PWX-35917 Adding k8s resources retriever binary and job #1439

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

camartinez04
Copy link
Collaborator

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.

Copy link

codecov bot commented Jul 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant