Documentation ¶
Index ¶
- Variables
- func CreateCtrlClient(contextCluster string) error
- func CreateK8sDstClient(contextCluster string) error
- func CreateK8sSrcClient(contextCluster string) error
- func CreateK8sSrcDynClient(contextCluster string) error
- func GetKindsFor(restMapper meta.RESTMapper, resource string) []schema.GroupVersionKind
- func GetMigCluster(client ctrlclient.Client, name string) migv1alpha1.MigCluster
- func GetMigPlan(client ctrlclient.Client, name string) (migv1alpha1.MigPlan, error)
- func GetNamespace(client *kubernetes.Clientset, name string) *corev1.Namespace
- func ListDaemonSets(client *kubernetes.Clientset, namespace string) *extv1beta1.DaemonSetList
- func ListDeployments(client *kubernetes.Clientset, namespace string) *v1beta1.DeploymentList
- func ListGroupVersions(client *kubernetes.Clientset) *metav1.APIGroupList
- func ListHPAv1(client *kubernetes.Clientset, namespace string) *autoscalingv1.HorizontalPodAutoscalerList
- func ListHPAv2beta1(client *kubernetes.Clientset, namespace string) *autoscalingv2beta1.HorizontalPodAutoscalerList
- func ListHPAv2beta2(client *kubernetes.Clientset, namespace string) *autoscalingv2beta2.HorizontalPodAutoscalerList
- 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) *corev1.PersistentVolumeClaimList
- func ListPVs(client *kubernetes.Clientset, ch chan<- *corev1.PersistentVolumeList)
- func ListPods(client *kubernetes.Clientset, namespace string) *corev1.PodList
- func ListResourceQuotas(client *kubernetes.Clientset, namespace string) *corev1.ResourceQuotaList
- func ListServerResources(client *kubernetes.Clientset) []*metav1.APIResourceList
- func ListSrvResForGV(gv string)
- func ListStorageClasses(client *kubernetes.Clientset, ch chan<- *storagev1.StorageClassList)
- func NewCtrlClientorDie(config *rest.Config, options client.Options) client.Client
- func NewK8SDynClientOrDie(config *rest.Config) dynamic.Interface
- func NewK8SOrDie(config *rest.Config) *kubernetes.Clientset
- func ParseKubeConfig() error
- func RESTMapperGetGRs(client *kubernetes.Clientset) meta.RESTMapper
- type NamespaceResources
- type OpenshiftClient
- type Resources
Constants ¶
This section is empty.
Variables ¶
var ( // KubeConfig represents kubeconfig KubeConfig *clientcmdapi.Config // SrcRESTMapper is Source REST Mapper SrcRESTMapper meta.RESTMapper // DstRESTMapper is destination REST Mapper DstRESTMapper meta.RESTMapper // ClusterNames contains names of contexts and cluster ClusterNames = make(map[string]string) // CtrlClient k8s controller client for migration cluster CtrlClient client.Client // K8sSrcClient k8s api client for source cluster K8sSrcClient *kubernetes.Clientset // K8sSrcDynClient k8s api client for source cluster K8sSrcDynClient dynamic.Interface // K8sDstClient k8s api client for target cluster K8sDstClient *kubernetes.Clientset )
Functions ¶
func CreateCtrlClient ¶
CreateCtrlClient creates a k8s runtime-controller client for given context
func CreateK8sDstClient ¶
CreateK8sDstClient create api client using cluster from kubeconfig context
func CreateK8sSrcClient ¶
CreateK8sSrcClient create api client using cluster from kubeconfig context
func CreateK8sSrcDynClient ¶
CreateK8sSrcDynClient create api client using cluster from kubeconfig context
func GetKindsFor ¶
func GetKindsFor(restMapper meta.RESTMapper, resource string) []schema.GroupVersionKind
GetKindsFor lists all GVKs for a resource
func GetMigCluster ¶
func GetMigCluster(client ctrlclient.Client, name string) migv1alpha1.MigCluster
GetMigCluster get MigrationCluster
func GetMigPlan ¶
func GetMigPlan(client ctrlclient.Client, name string) (migv1alpha1.MigPlan, error)
GetMigPlan get MigrationPlan
func GetNamespace ¶
func GetNamespace(client *kubernetes.Clientset, name string) *corev1.Namespace
GetNamespace get namespace
func ListDaemonSets ¶
func ListDaemonSets(client *kubernetes.Clientset, namespace string) *extv1beta1.DaemonSetList
ListDaemonSets will collect all DS from specific namespace
func ListDeployments ¶
func ListDeployments(client *kubernetes.Clientset, namespace string) *v1beta1.DeploymentList
ListDeployments will list all deployments seeding in the selected namespace
func ListGroupVersions ¶
func ListGroupVersions(client *kubernetes.Clientset) *metav1.APIGroupList
ListGroupVersions list all GV
func ListHPAv1 ¶
func ListHPAv1(client *kubernetes.Clientset, namespace string) *autoscalingv1.HorizontalPodAutoscalerList
ListHPAv1 gets Horizontal Pod Autoscaler v1 objects
func ListHPAv2beta1 ¶
func ListHPAv2beta1(client *kubernetes.Clientset, namespace string) *autoscalingv2beta1.HorizontalPodAutoscalerList
ListHPAv2beta1 gets Horizontal Pod Autoscaler v2beta1 objects
func ListHPAv2beta2 ¶
func ListHPAv2beta2(client *kubernetes.Clientset, namespace string) *autoscalingv2beta2.HorizontalPodAutoscalerList
ListHPAv2beta2 gets Horizontal Pod Autoscaler v2beta2 objects
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) *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) *corev1.PodList
ListPods list all pods in namespace, wrapper around client-go
func ListResourceQuotas ¶
func ListResourceQuotas(client *kubernetes.Clientset, namespace string) *corev1.ResourceQuotaList
ListResourceQuotas list all quotas classes, wrapper around client-go
func ListServerResources ¶
func ListServerResources(client *kubernetes.Clientset) []*metav1.APIResourceList
ListServerResources list all resources
func ListSrvResForGV ¶
func ListSrvResForGV(gv string)
func ListStorageClasses ¶
func ListStorageClasses(client *kubernetes.Clientset, ch chan<- *storagev1.StorageClassList)
ListStorageClasses list all storage classes, wrapper around client-go
func NewCtrlClientorDie ¶
NewCtrlClientorDie gets a controller client or die
func NewK8SDynClientOrDie ¶
NewK8SDynClientOrDie init k8s client or panic
func NewK8SOrDie ¶
func NewK8SOrDie(config *rest.Config) *kubernetes.Clientset
NewK8SOrDie init k8s client or panic
func RESTMapperGetGRs ¶
func RESTMapperGetGRs(client *kubernetes.Clientset) meta.RESTMapper
RESTMapperGetGRs lists all GVKs for a resource
Types ¶
type NamespaceResources ¶
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 Resources ¶
type Resources struct { NamespaceResources *NamespaceResources SrcOnlyGVKs map[string]map[string][]schema.GroupVersionKind SrcGapGVKs map[string]map[string][]schema.GroupVersionKind DstGapGVKs map[string]map[string][]schema.GroupVersionKind }
Resources represent api resources used in report