Class KubernetesSlave.Builder
- java.lang.Object
-
- org.csanchez.jenkins.plugins.kubernetes.KubernetesSlave.Builder
-
- Enclosing class:
- KubernetesSlave
public static class KubernetesSlave.Builder extends Object
Builds aKubernetesSlave
instance.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KubernetesSlave
build()
Builds the resultingKubernetesSlave
instance.KubernetesSlave.Builder
cloud(KubernetesCloud cloud)
KubernetesSlave.Builder
computerLauncher(ComputerLauncher computerLauncher)
KubernetesSlave.Builder
label(String label)
KubernetesSlave.Builder
name(String name)
KubernetesSlave.Builder
nodeDescription(String nodeDescription)
KubernetesSlave.Builder
podTemplate(PodTemplate podTemplate)
KubernetesSlave.Builder
retentionStrategy(RetentionStrategy retentionStrategy)
-
-
-
Method Detail
-
name
public KubernetesSlave.Builder name(String name)
- Parameters:
name
- The name of the futureKubernetesSlave
- Returns:
- the current instance for method chaining
-
nodeDescription
public KubernetesSlave.Builder nodeDescription(String nodeDescription)
- Parameters:
nodeDescription
- The node description of the futureKubernetesSlave
- Returns:
- the current instance for method chaining
-
podTemplate
public KubernetesSlave.Builder podTemplate(PodTemplate podTemplate)
- Parameters:
podTemplate
- The pod template the futureKubernetesSlave
has been created from- Returns:
- the current instance for method chaining
-
cloud
public KubernetesSlave.Builder cloud(KubernetesCloud cloud)
- Parameters:
cloud
- The cloud that is provisioning theKubernetesSlave
instance.- Returns:
- the current instance for method chaining
-
label
public KubernetesSlave.Builder label(String label)
- Parameters:
label
- The label theKubernetesSlave
has.- Returns:
- the current instance for method chaining
-
computerLauncher
public KubernetesSlave.Builder computerLauncher(ComputerLauncher computerLauncher)
- Parameters:
computerLauncher
- The computer launcher to use to launch theKubernetesSlave
instance.- Returns:
- the current instance for method chaining
-
retentionStrategy
public KubernetesSlave.Builder retentionStrategy(RetentionStrategy retentionStrategy)
- Parameters:
retentionStrategy
- The retention strategy to use for theKubernetesSlave
instance.- Returns:
- the current instance for method chaining
-
build
public KubernetesSlave build() throws IOException, Descriptor.FormException
Builds the resultingKubernetesSlave
instance.- Returns:
- an initialized
KubernetesSlave
instance. - Throws:
IOException
Descriptor.FormException
-
-