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,PersistenceRoot,ReconfigurableDescribable<Node>,Saveable,SearchableModelObject,SearchItem,AccessControlled,Serializable,OnMaster
- Author:
- Carlos Sanchez carlos@apache.org
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilds aKubernetesSlaveinstance.static final classNested classes/interfaces inherited from class hudson.model.Slave
Slave.JnlpJar, Slave.SlaveDescriptorNested 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
ConstructorsModifierConstructorDescriptionprotectedKubernetesSlave(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.Builderinstead.KubernetesSlave(PodTemplate template, String nodeDescription, KubernetesCloud cloud, String labelStr) Deprecated.UseKubernetesSlave.Builderinstead.KubernetesSlave(PodTemplate template, String nodeDescription, KubernetesCloud cloud, String labelStr, RetentionStrategy rs) Deprecated.UseKubernetesSlave.Builderinstead. -
Method Summary
Modifier and TypeMethodDescriptionprotected void_terminate(TaskListener listener) voidannotateTtl(TaskListener listener) static KubernetesSlave.Builderbuilder()Returns a newKubernetesSlave.Builderinstance.createLauncher(TaskListener listener) booleangetCloud()Deprecated.Please use the strongly typed getKubernetesCloud() instead.Returns the cloud instance which created this agent.Optional<io.fabric8.kubernetes.api.model.Pod> getPod()GetPodreference for this agent.getPodRetention(KubernetesCloud cloud) Makes a best effort to find the build log corresponding to this agent.inthashCode()protected ObjectvoidsetNamespace(String namespace) Methods inherited from class hudson.slaves.AbstractCloudSlave
terminateMethods inherited from class hudson.model.Slave
getClockDifferenceCallable, getComputer, getDescriptor, getLabelAtomSet, getLabelString, getLauncher, getMode, getNodeDescription, getNodeName, getNodeProperties, getNumExecutors, getRetentionStrategy, getUserId, getWorkspaceFor, getWorkspaceRoot, save, setLabelString, setLauncher, setMode, setNodeDescription, setNodeName, setNodeProperties, setNumExecutors, setRetentionStrategy, setUserId, toStringMethods inherited from class hudson.model.Node
canTake, canTake, createPath, getACL, getAssignedLabels, getChannel, getClockDifference, getConfigFile, getDisplayName, getFileSystemProvisioner, getLabelCloud, getNodeProperty, getNodeProperty, getNodePropertyDescriptors, getRootDir, getSearchUrl, getSelfLabel, getTemporaryOfflineCause, isAcceptingTasks, isHoldOffLaunchUntilSave, onLoad, reconfigure, reconfigure, toComputerMethods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError, sendError, sendError, sendErrorMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface hudson.security.AccessControlled
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2Methods inherited from interface hudson.search.SearchItem
getSearchGroup, getSearchIcon
-
Constructor Details
-
KubernetesSlave
@Deprecated public KubernetesSlave(PodTemplate template, String nodeDescription, KubernetesCloud cloud, String labelStr) throws Descriptor.FormException, IOException Deprecated.UseKubernetesSlave.Builderinstead.- Throws:
Descriptor.FormExceptionIOException
-
KubernetesSlave
@Deprecated public KubernetesSlave(PodTemplate template, String nodeDescription, KubernetesCloud cloud, Label label) throws Descriptor.FormException, IOException Deprecated.UseKubernetesSlave.Builderinstead.- Throws:
Descriptor.FormExceptionIOException
-
KubernetesSlave
@Deprecated public KubernetesSlave(PodTemplate template, String nodeDescription, KubernetesCloud cloud, String labelStr, RetentionStrategy rs) throws Descriptor.FormException, IOException Deprecated.UseKubernetesSlave.Builderinstead.- Throws:
Descriptor.FormExceptionIOException
-
KubernetesSlave
@Deprecated @DataBoundConstructor public KubernetesSlave(PodTemplate template, String nodeDescription, String cloudName, String labelStr, RetentionStrategy rs) throws Descriptor.FormException, IOException Deprecated.UseKubernetesSlave.Builderinstead.- Throws:
Descriptor.FormExceptionIOException
-
KubernetesSlave
protected KubernetesSlave(String name, @NonNull PodTemplate template, String nodeDescription, String cloudName, String labelStr, ComputerLauncher computerLauncher, RetentionStrategy rs) throws Descriptor.FormException, IOException - Throws:
Descriptor.FormExceptionIOException
-
-
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:
getRemoteFSin classSlave
-
getRootPath
- Overrides:
getRootPathin classSlave
-
getCloud
Deprecated.Please use the strongly typed getKubernetesCloud() instead. -
getPod
GetPodreference for this agent. If it hasn't been assigned yet or the reference was lost due to restart, it will be looked up.- Returns:
- assigned pod, or empty if not assigned or no longer exists
-
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:
createComputerin classAbstractCloudSlave
-
getPodRetention
-
_terminate
- Specified by:
_terminatein classAbstractCloudSlave- Throws:
IOExceptionInterruptedException
-
equals
-
hashCode
public int hashCode() -
createLauncher
- Overrides:
createLauncherin classSlave
-
readResolve
- Overrides:
readResolvein classSlave
-
builder
Returns a newKubernetesSlave.Builderinstance.- Returns:
- a new
KubernetesSlave.Builderinstance.
-
annotateTtl
-
KubernetesSlave.Builderinstead.