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