Class KubernetesSlave
java.lang.Object
hudson.model.AbstractModelObject
hudson.model.Node
hudson.model.Slave
hudson.slaves.AbstractCloudSlave
org.csanchez.jenkins.plugins.kubernetes.KubernetesSlave
- All Implemented Interfaces:
ExtensionPoint
,Describable<Node>
,ModelObject
,ReconfigurableDescribable<Node>
,Saveable
,SearchableModelObject
,SearchItem
,AccessControlled
,Serializable
,OnMaster
- Author:
- Carlos Sanchez carlos@apache.org
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builds aKubernetesSlave
instance.static final class
Nested classes/interfaces inherited from class hudson.model.Slave
Slave.JnlpJar, Slave.SlaveDescriptor
Nested classes/interfaces inherited from class hudson.model.Node
Node.InternalComputerListener, Node.Mode
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Fields inherited from class hudson.model.Node
holdOffLaunchUntilSave, SKIP_BUILD_CHECK_ON_FLYWEIGHTS
-
Constructor Summary
ModifierConstructorDescriptionprotected
KubernetesSlave
(String name, PodTemplate template, String nodeDescription, String cloudName, String labelStr, ComputerLauncher computerLauncher, RetentionStrategy rs) KubernetesSlave
(PodTemplate template, String nodeDescription, String cloudName, String labelStr, RetentionStrategy rs) Deprecated.KubernetesSlave
(PodTemplate template, String nodeDescription, KubernetesCloud cloud, Label label) Deprecated.UseKubernetesSlave.Builder
instead.KubernetesSlave
(PodTemplate template, String nodeDescription, KubernetesCloud cloud, String labelStr) Deprecated.UseKubernetesSlave.Builder
instead.KubernetesSlave
(PodTemplate template, String nodeDescription, KubernetesCloud cloud, String labelStr, RetentionStrategy rs) Deprecated.UseKubernetesSlave.Builder
instead. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
_terminate
(TaskListener listener) void
annotateTtl
(TaskListener listener) static KubernetesSlave.Builder
builder()
Returns a newKubernetesSlave.Builder
instance.createLauncher
(TaskListener listener) boolean
getCloud()
Deprecated.Please use the strongly typed getKubernetesCloud() instead.Returns the cloud instance which created this agent.Optional<io.fabric8.kubernetes.api.model.Pod>
getPod()
getPodRetention
(KubernetesCloud cloud) Makes a best effort to find the build log corresponding to this agent.int
hashCode()
protected Object
void
setNamespace
(String namespace) toString()
Methods inherited from class hudson.slaves.AbstractCloudSlave
terminate
Methods inherited from class hudson.model.Slave
getClockDifferenceCallable, getComputer, getDescriptor, getLabelAtomSet, getLabelString, getLauncher, getMode, getNodeDescription, getNodeName, getNodeProperties, getNumExecutors, getRetentionStrategy, getUserId, getWorkspaceFor, getWorkspaceRoot, setLabelString, setLauncher, setMode, setNodeDescription, setNodeName, setNodeProperties, setNumExecutors, setRetentionStrategy, setUserId
Methods inherited from class hudson.model.Node
canTake, canTake, createPath, getACL, getAssignedLabels, getChannel, getClockDifference, getDisplayName, getFileSystemProvisioner, getLabelCloud, getNodeProperty, getNodeProperty, getNodePropertyDescriptors, getSearchUrl, getSelfLabel, getTemporaryOfflineCause, isAcceptingTasks, isHoldOffLaunchUntilSave, reconfigure, save, toComputer
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface hudson.security.AccessControlled
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2
-
Constructor Details
-
KubernetesSlave
@Deprecated public KubernetesSlave(PodTemplate template, String nodeDescription, KubernetesCloud cloud, String labelStr) throws Descriptor.FormException, IOException Deprecated.UseKubernetesSlave.Builder
instead.- Throws:
Descriptor.FormException
IOException
-
KubernetesSlave
@Deprecated public KubernetesSlave(PodTemplate template, String nodeDescription, KubernetesCloud cloud, Label label) throws Descriptor.FormException, IOException Deprecated.UseKubernetesSlave.Builder
instead.- Throws:
Descriptor.FormException
IOException
-
KubernetesSlave
@Deprecated public KubernetesSlave(PodTemplate template, String nodeDescription, KubernetesCloud cloud, String labelStr, RetentionStrategy rs) throws Descriptor.FormException, IOException Deprecated.UseKubernetesSlave.Builder
instead.- Throws:
Descriptor.FormException
IOException
-
KubernetesSlave
@Deprecated @DataBoundConstructor public KubernetesSlave(PodTemplate template, String nodeDescription, String cloudName, String labelStr, RetentionStrategy rs) throws Descriptor.FormException, IOException Deprecated.UseKubernetesSlave.Builder
instead.- Throws:
Descriptor.FormException
IOException
-
KubernetesSlave
protected KubernetesSlave(String name, @NonNull PodTemplate template, String nodeDescription, String cloudName, String labelStr, ComputerLauncher computerLauncher, RetentionStrategy rs) throws Descriptor.FormException, IOException - Throws:
Descriptor.FormException
IOException
-
-
Method Details
-
getTemplate
- Throws:
IllegalStateException
-
getTemplateId
-
getTemplateOrNull
-
getRunListener
Makes a best effort to find the build log corresponding to this agent. -
getCloudName
-
setNamespace
-
getNamespace
-
getPodName
-
getRemoteFS
- Overrides:
getRemoteFS
in classSlave
-
getRootPath
- Overrides:
getRootPath
in classSlave
-
getCloud
Deprecated.Please use the strongly typed getKubernetesCloud() instead. -
getPod
-
getKubernetesCloud
Returns the cloud instance which created this agent.- Returns:
- the cloud instance which created this agent.
- Throws:
IllegalStateException
- if the cloud doesn't exist anymore, or is not aKubernetesCloud
.
-
createComputer
- Specified by:
createComputer
in classAbstractCloudSlave
-
getPodRetention
-
_terminate
- Specified by:
_terminate
in classAbstractCloudSlave
- Throws:
IOException
InterruptedException
-
toString
-
equals
-
hashCode
public int hashCode() -
createLauncher
- Overrides:
createLauncher
in classSlave
-
readResolve
- Overrides:
readResolve
in classSlave
-
builder
Returns a newKubernetesSlave.Builder
instance.- Returns:
- a new
KubernetesSlave.Builder
instance.
-
annotateTtl
-
KubernetesSlave.Builder
instead.