Package io.jenkins.plugins.kubevirt
Class KubeVirtLauncherFactory
java.lang.Object
io.jenkins.plugins.kubevirt.KubeVirtLauncherFactory
Factory for creating SSH launchers for KubeVirt agents.
Supports both direct SSH connections and virtctl port-forward tunneling.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateDirectSshLauncher(KubeVirtTemplate template, String ip, ProvisioningCallback callback) Creates a direct SSH launcher that connects directly to the VM's IP address.createLauncher(KubeVirtTemplate template, String vmName, String ip, KubeVirtCloudConfig config, ProvisioningCallback callback) Creates the appropriate launcher based on the template configuration.createVirtctlLauncher(KubeVirtTemplate template, String vmName, KubeVirtCloudConfig config, ProvisioningCallback callback) Creates a virtctl port-forward launcher that tunnels SSH through the Kubernetes API.
-
Constructor Details
-
KubeVirtLauncherFactory
public KubeVirtLauncherFactory()
-
-
Method Details
-
createLauncher
public ComputerLauncher createLauncher(KubeVirtTemplate template, String vmName, String ip, KubeVirtCloudConfig config, ProvisioningCallback callback) Creates the appropriate launcher based on the template configuration.- Parameters:
template- The VM template configurationvmName- The name of the VMip- The IP address of the VM (used for direct SSH)config- The cloud configurationcallback- The provisioning callback for logging- Returns:
- A configured ComputerLauncher instance
-
createDirectSshLauncher
public ComputerLauncher createDirectSshLauncher(KubeVirtTemplate template, String ip, ProvisioningCallback callback) Creates a direct SSH launcher that connects directly to the VM's IP address.- Parameters:
template- The VM template configurationip- The IP address to connect tocallback- The provisioning callback for logging- Returns:
- A configured SSHLauncher instance
-
createVirtctlLauncher
public ComputerLauncher createVirtctlLauncher(KubeVirtTemplate template, String vmName, KubeVirtCloudConfig config, ProvisioningCallback callback) Creates a virtctl port-forward launcher that tunnels SSH through the Kubernetes API.- Parameters:
template- The VM template configurationvmName- The name of the VMconfig- The cloud configurationcallback- The provisioning callback for logging- Returns:
- A configured VirtctlPortForwardLauncher instance
-