Documentation ¶
Index ¶
- Variables
- func CreateK8sClient(contextCluster string) error
- func CreateO7tClient(contextCluster string) error
- func ListClusterRoles(client *OpenshiftClient, ch chan<- *o7tauthv1.ClusterRoleList)
- func ListClusterRolesBindings(client *OpenshiftClient, ch chan<- *o7tauthv1.ClusterRoleBindingList)
- func ListDaemonSets(client *kubernetes.Clientset, namespace string, ...)
- func ListDeployments(client *kubernetes.Clientset, namespace string, ...)
- func ListGroups(client *OpenshiftClient, ch chan<- *o7tuserv1.GroupList)
- func ListNamespaces(client *kubernetes.Clientset, ch chan<- *corev1.NamespaceList)
- func ListNodes(client *kubernetes.Clientset, ch chan<- *corev1.NodeList)
- func ListPVCs(client *kubernetes.Clientset, namespace string, ...)
- func ListPVs(client *kubernetes.Clientset, ch chan<- *corev1.PersistentVolumeList)
- func ListPods(client *kubernetes.Clientset, namespace string, ch chan<- *corev1.PodList)
- func ListQuotas(client *OpenshiftClient, ch chan<- *o7tquotav1.ClusterResourceQuotaList)
- func ListResourceQuotas(client *kubernetes.Clientset, namespace string, ...)
- func ListRoles(client *OpenshiftClient, namespace string, ch chan<- *o7tauthv1.RoleList)
- func ListRoutes(client *OpenshiftClient, namespace string, ch chan<- *o7troutev1.RouteList)
- func ListSCC(client *OpenshiftClient, ...)
- func ListStorageClasses(client *kubernetes.Clientset, ch chan<- *storagev1.StorageClassList)
- func ListUsers(client *OpenshiftClient, ch chan<- *o7tuserv1.UserList)
- func NewK8SOrDie(config *rest.Config) *kubernetes.Clientset
- func ParseKubeConfig() error
- type NamespaceResources
- type OpenshiftClient
- type RBACResources
- type Resources
Constants ¶
This section is empty.
Variables ¶
var ( // KubeConfig represents kubeconfig KubeConfig *clientcmdapi.Config // ClusterNames contains names of contexts and cluster ClusterNames = make(map[string]string) // K8sClient k8s api client for source cluster K8sClient *kubernetes.Clientset // O7tClient openshift api client for source cluster O7tClient *OpenshiftClient )
Functions ¶
func CreateK8sClient ¶
CreateK8sClient create api client using cluster from kubeconfig context
func CreateO7tClient ¶
CreateO7tClient create api client using cluster from kubeconfig context
func ListClusterRoles ¶
func ListClusterRoles(client *OpenshiftClient, ch chan<- *o7tauthv1.ClusterRoleList)
ListClusterRoles list all storage classes, wrapper around client-go
func ListClusterRolesBindings ¶
func ListClusterRolesBindings(client *OpenshiftClient, ch chan<- *o7tauthv1.ClusterRoleBindingList)
ListClusterRolesBindings list all storage classes, wrapper around client-go
func ListDaemonSets ¶
func ListDaemonSets(client *kubernetes.Clientset, namespace string, ch chan<- *extv1beta1.DaemonSetList)
ListDaemonSets will collect all DS from specific namespace
func ListDeployments ¶
func ListDeployments(client *kubernetes.Clientset, namespace string, ch chan<- *v1beta1.DeploymentList)
ListDeployments will list all deployments seeding in the selected namespace
func ListGroups ¶
func ListGroups(client *OpenshiftClient, ch chan<- *o7tuserv1.GroupList)
ListGroups list all users, wrapper around client-go
func ListNamespaces ¶
func ListNamespaces(client *kubernetes.Clientset, ch chan<- *corev1.NamespaceList)
ListNamespaces list all namespaces, wrapper around client-go
func ListNodes ¶
func ListNodes(client *kubernetes.Clientset, ch chan<- *corev1.NodeList)
ListNodes list all nodes, wrapper around client-go
func ListPVCs ¶
func ListPVCs(client *kubernetes.Clientset, namespace string, ch chan<- *corev1.PersistentVolumeClaimList)
ListPVCs list all PVs, wrapper around client-go
func ListPVs ¶
func ListPVs(client *kubernetes.Clientset, ch chan<- *corev1.PersistentVolumeList)
ListPVs list all PVs, wrapper around client-go
func ListPods ¶
func ListPods(client *kubernetes.Clientset, namespace string, ch chan<- *corev1.PodList)
ListPods list all pods in namespace, wrapper around client-go
func ListQuotas ¶
func ListQuotas(client *OpenshiftClient, ch chan<- *o7tquotav1.ClusterResourceQuotaList)
ListQuotas list all cluster quotas classes, wrapper around client-go
func ListResourceQuotas ¶
func ListResourceQuotas(client *kubernetes.Clientset, namespace string, ch chan<- *corev1.ResourceQuotaList)
ListResourceQuotas list all quotas classes, wrapper around client-go
func ListRoles ¶
func ListRoles(client *OpenshiftClient, namespace string, ch chan<- *o7tauthv1.RoleList)
ListRoles list all storage classes, wrapper around client-go
func ListRoutes ¶
func ListRoutes(client *OpenshiftClient, namespace string, ch chan<- *o7troutev1.RouteList)
ListRoutes list all routes classes, wrapper around client-go
func ListSCC ¶
func ListSCC(client *OpenshiftClient, ch chan<- *o7tsecurityv1.SecurityContextConstraintsList)
ListSCC list all security context constraints, wrapper around client-go
func ListStorageClasses ¶
func ListStorageClasses(client *kubernetes.Clientset, ch chan<- *storagev1.StorageClassList)
ListStorageClasses list all storage classes, wrapper around client-go
func ListUsers ¶
func ListUsers(client *OpenshiftClient, ch chan<- *o7tuserv1.UserList)
ListUsers list all users, wrapper around client-go
func NewK8SOrDie ¶
func NewK8SOrDie(config *rest.Config) *kubernetes.Clientset
NewK8SOrDie init k8s client or panic
Types ¶
type NamespaceResources ¶
type NamespaceResources struct { NamespaceName string DaemonSetList *extv1beta1.DaemonSetList DeploymentList *v1beta1.DeploymentList PodList *corev1.PodList ResourceQuotaList *corev1.ResourceQuotaList RolesList *o7tauthv1.RoleList RouteList *o7troutev1.RouteList PVCList *corev1.PersistentVolumeClaimList }
NamespaceResources holds all resources that belong to a namespace
type OpenshiftClient ¶
type OpenshiftClient struct {
// contains filtered or unexported fields
}
OpenshiftClient - Client to interact with openshift api
func NewO7tOrDie ¶
func NewO7tOrDie(config *rest.Config) *OpenshiftClient
NewO7tOrDie - Create a new openshift client if needed, returns reference
type RBACResources ¶
type RBACResources struct { UsersList *o7tuserv1.UserList GroupList *o7tuserv1.GroupList ClusterRolesList *o7tauthv1.ClusterRoleList ClusterRolesBindingsList *o7tauthv1.ClusterRoleBindingList SecurityContextConstraintsList *o7tsecurityv1.SecurityContextConstraintsList }
RBACResources contains all resources related to RBAC report
type Resources ¶
type Resources struct { QuotaList *o7tquotav1.ClusterResourceQuotaList NodeList *corev1.NodeList PersistentVolumeList *corev1.PersistentVolumeList StorageClassList *storagev1.StorageClassList NamespaceList []NamespaceResources RBACResources RBACResources }
Resources represent api resources used in report