Documentation
¶
Index ¶
- Constants
- func GetNamespaceFromKubernetesFlags(configFlag *genericclioptions.ConfigFlags, ...) string
- func GetPodByName(clientset kubernetes.Interface, namespace, name string, opt metav1.GetOptions) (*v1.Pod, error)
- func GetSelectedPods(clientset kubernetes.Interface, namespace string, listOpt metav1.ListOptions) ([]v1.Pod, error)
- func PortForwardAPod(req PortForwardAPodRequest) error
- type PortForwardAPodRequest
Constants ¶
View Source
const ( // AllNamespace when you use the kubernetes client in go an empty string // means all namespace AllNamespace = "" // ProfefeEnabledAnnotation is the annotation used to discrimanate when a // pod has to be profiled or not. ProfefeEnabledAnnotation = "profefe.com/enable" )
Variables ¶
This section is empty.
Functions ¶
func GetNamespaceFromKubernetesFlags ¶
func GetNamespaceFromKubernetesFlags( configFlag *genericclioptions.ConfigFlags, rbFlags *genericclioptions.ResourceBuilderFlags) string
GetNamespaceFromKubernetesFlags returns the namespace combining the namespace flags from genericclioptions.ConfigFlags and the Allnamespace option in genericclioptions.ResourceBuilderFlags
func GetPodByName ¶
func GetPodByName(clientset kubernetes.Interface, namespace, name string, opt metav1.GetOptions) (*v1.Pod, error)
GetPodByName returns a single pod with the profefe annotation enabled
func GetSelectedPods ¶
func GetSelectedPods(clientset kubernetes.Interface, namespace string, listOpt metav1.ListOptions) ([]v1.Pod, error)
GetSelectedPods returns all the pods with the profefe annotation enabled filtered by the selected labels
func PortForwardAPod ¶
func PortForwardAPod(req PortForwardAPodRequest) error
PortForwardAPod forwards the port specificed from the profefe port annotation locally.
Types ¶
type PortForwardAPodRequest ¶
Click to show internal directories.
Click to hide internal directories.