Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetClusterNamespaces ¶
func GetClusterNamespaces(clientset *kubernetes.Clientset) (*corev1.NamespaceList, error)
GetClusterNamespaces gets a namespace list from the cluster
func NewK8sClientSet ¶
func NewK8sClientSet(kubeconfigPath string) (*kubernetes.Clientset, error)
NewK8sClientSet creates a k8s clientset if the kubeconfigPath is empty, it attempts to get an in-cluster client
Types ¶
type K8sEnvRequest ¶
type K8sEnvRequest struct { Artifacts []*PodData `json:"artifacts"` Type string `json:"type"` Id string `json:"id"` }
K8sEnvRequest represents the PUT request body to be sent to kosli from k8s
type PodData ¶
type PodData struct { PodName string `json:"podName"` Namespace string `json:"namespace"` Digests map[string]string `json:"digests"` CreationTimestamp int64 `json:"creationTimestamp"` Owners []metav1.OwnerReference `json:"owners"` }
PodData represents the harvested pod data
func GetPodsData ¶
func GetPodsData(includNamespaces []string, excludeNamespaces []string, clientset *kubernetes.Clientset, logger *logger.Logger) ([]*PodData, error)
GetPodsData lists pods in the target namespace(s) of a target cluster and creates a list of PodData objects for them
func NewPodData ¶
NewPodData creates a PodData object from a k8s pod
Click to show internal directories.
Click to hide internal directories.