Class KubeVirtLauncherFactory

java.lang.Object
io.jenkins.plugins.kubevirt.KubeVirtLauncherFactory

public class KubeVirtLauncherFactory extends Object
Factory for creating SSH launchers for KubeVirt agents. Supports both direct SSH connections and virtctl port-forward tunneling.
  • 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 configuration
      vmName - The name of the VM
      ip - The IP address of the VM (used for direct SSH)
      config - The cloud configuration
      callback - 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 configuration
      ip - The IP address to connect to
      callback - 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 configuration
      vmName - The name of the VM
      config - The cloud configuration
      callback - The provisioning callback for logging
      Returns:
      A configured VirtctlPortForwardLauncher instance