Documentation
¶
Index ¶
- Constants
- Variables
- func CreateAttacher(client *K8sClient, p *corev1.Pod, command string) error
- func GetImageInfo(virtClient kubecli.KubevirtClient) (*kubecli.GuestfsInfo, error)
- func NewGuestfsShellCommand() *cobra.Command
- func SetImage(virtClient kubecli.KubevirtClient) (string, error)
- type K8sClient
Constants ¶
View Source
const (
// KvmDevice defines the resource as in pkg/virt-controller/services/template.go, but we don't import the package to avoid compile conflicts when the os is windows
KvmDevice = "devices.kubevirt.io/kvm"
)
Variables ¶
View Source
var CreateAttacherFunc = CreateAttacher
View Source
var CreateClientFunc = CreateClient
Following variables allow overriding the default functions (useful for unit testing)
View Source
var ImageInfoGetFunc = GetImageInfo
View Source
var ImageSetFunc = SetImage
Functions ¶
func CreateAttacher ¶ added in v1.5.0
CreateAttacher attaches the stdin, stdout, and stderr to the container shell
func GetImageInfo ¶ added in v1.5.0
func GetImageInfo(virtClient kubecli.KubevirtClient) (*kubecli.GuestfsInfo, error)
GetImageInfo gets the image info based on the information on KubeVirt CR
func NewGuestfsShellCommand ¶
NewGuestfsShellCommand returns a cobra.Command for starting libguestfs-tool pod and attach it to a pvc
Types ¶
type K8sClient ¶
type K8sClient struct { Client kubernetes.Interface VirtClient kubecli.KubevirtClient // contains filtered or unexported fields }
K8sClient holds the information of the Kubernetes client
func CreateClient ¶ added in v1.5.0
func CreateClient(virtClient kubecli.KubevirtClient) (*K8sClient, error)
Click to show internal directories.
Click to hide internal directories.