Class PodTemplate
java.lang.Object
hudson.model.AbstractDescribableImpl<PodTemplate>
org.csanchez.jenkins.plugins.kubernetes.PodTemplate
- All Implemented Interfaces:
Describable<PodTemplate>
,Saveable
,Serializable
public class PodTemplate
extends AbstractDescribableImpl<PodTemplate>
implements Serializable, Saveable
Kubernetes Pod Template
- Author:
- Nicolas De Loof
- See Also:
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPodTemplate
(String id) PodTemplate
(String image, List<? extends PodVolume> volumes) Deprecated.PodTemplate
(PodTemplate from) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAnnotations
(List<PodAnnotation> annotations) void
addEnvVars
(List<TemplateEnvVar> envVars) void
addImagePullSecrets
(List<PodImagePullSecret> imagePullSecrets) io.fabric8.kubernetes.api.model.Pod
build
(io.fabric8.kubernetes.client.KubernetesClient client, KubernetesSlave slave) Deprecated.io.fabric8.kubernetes.api.model.Pod
build
(KubernetesSlave slave) Build a Pod object from a PodTemplateorg.kohsuke.stapler.HttpResponse
doConfigSubmit
(org.kohsuke.stapler.StaplerRequest req, PodTemplateGroup owner) org.kohsuke.stapler.HttpResponse
doDoDelete
(PodTemplateGroup owner) Deletes the template.int
getArgs()
Deprecated.Deprecated.Deprecated.Deprecated.getId()
int
getImage()
Deprecated.int
getLabel()
protected static MessageDigest
Digest function that is used to compute the kubernetes label "jenkins/label-digest" Not used for security.getName()
Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Run<?,
?> getRun()
int
getYaml()
getYamls()
io.fabric8.kubernetes.api.model.Pod
boolean
Deprecated.boolean
Deprecated.boolean
boolean
boolean
boolean
Deprecated.boolean
boolean
protected Object
void
save()
Empty implementation of Saveable interface.void
setActiveDeadlineSeconds
(int i) void
setActiveDeadlineSecondsStr
(String activeDeadlineSeconds) void
setAlwaysPullImage
(boolean alwaysPullImage) Deprecated.void
setAnnotations
(List<PodAnnotation> annotations) void
Deprecated.void
setCapOnlyOnAlivePods
(boolean capOnlyOnAlivePods) Deprecated.void
setCommand
(String command) Deprecated.void
setContainers
(List<ContainerTemplate> items) void
setEnvVars
(List<TemplateEnvVar> envVars) void
setHostNetwork
(Boolean hostNetwork) void
setIdleMinutes
(int i) void
setIdleMinutesStr
(String idleMinutes) void
setImagePullSecrets
(List<PodImagePullSecret> imagePullSecrets) void
setInheritFrom
(String inheritFrom) void
setInheritYamlMergeStrategy
(boolean inheritYamlMergeStrategy) void
setInstanceCap
(int instanceCap) void
setInstanceCapStr
(String instanceCapStr) void
void
setListener
(TaskListener listener) void
void
setNamespace
(String namespace) void
setNodeProperties
(List<? extends NodeProperty<?>> properties) void
setNodeSelector
(String nodeSelector) void
setNodeUsageMode
(Node.Mode nodeUsageMode) void
setNodeUsageMode
(String nodeUsageMode) void
setPodRetention
(PodRetention podRetention) void
setPrivileged
(boolean privileged) Deprecated.void
setReadonlyFromUi
(boolean readonlyFromUi) void
setRemoteFs
(String remoteFs) Deprecated.void
setResourceLimitCpu
(String resourceLimitCpu) Deprecated.void
setResourceLimitMemory
(String resourceLimitMemory) Deprecated.void
setResourceRequestCpu
(String resourceRequestCpu) Deprecated.void
setResourceRequestMemory
(String resourceRequestMemory) Deprecated.void
void
setRunAsGroup
(String runAsGroup) void
setRunAsUser
(String runAsUser) void
setSchedulerName
(String schedulerName) void
setServiceAccount
(String serviceAccount) void
setShowRawYaml
(boolean showRawYaml) void
setSlaveConnectTimeout
(int slaveConnectTimeout) void
setSlaveConnectTimeoutStr
(String slaveConnectTimeoutStr) void
setSupplementalGroups
(String supplementalGroups) void
setTerminationGracePeriodSeconds
(Long terminationGracePeriodSeconds) void
setVolumes
(List<PodVolume> items) void
setWorkspaceVolume
(WorkspaceVolume workspaceVolume) void
void
setYamlMergeStrategy
(YamlMergeStrategy yamlMergeStrategy) void
toString()
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Field Details
-
DEFAULT_SLAVE_JENKINS_CONNECTION_TIMEOUT
Connection timeout expiration in seconds, default to 1000 seconds -
JENKINS_LABEL
- See Also:
-
JENKINS_LABEL_DIGEST
- See Also:
-
-
Constructor Details
-
PodTemplate
public PodTemplate() -
PodTemplate
-
PodTemplate
-
PodTemplate
Deprecated.
-
-
Method Details
-
getLabelDigestFunction
Digest function that is used to compute the kubernetes label "jenkins/label-digest" Not used for security. -
getId
-
getYamlMergeStrategy
-
getResolvedYamlMergeStrategy
-
setYamlMergeStrategy
@DataBoundSetter public void setYamlMergeStrategy(@CheckForNull YamlMergeStrategy yamlMergeStrategy) -
getYamlsPod
public io.fabric8.kubernetes.api.model.Pod getYamlsPod() -
getInheritFrom
-
setInheritFrom
-
setName
-
getName
-
getNamespace
-
setNamespace
-
getImage
Deprecated. -
setCommand
Deprecated. -
getCommand
Deprecated. -
setArgs
Deprecated. -
getArgs
Deprecated. -
getDisplayName
Deprecated. -
setRemoteFs
Deprecated. -
getRemoteFs
Deprecated. -
setInstanceCap
@DataBoundSetter public void setInstanceCap(int instanceCap) -
getInstanceCap
public int getInstanceCap() -
setSlaveConnectTimeout
@DataBoundSetter public void setSlaveConnectTimeout(int slaveConnectTimeout) -
getSlaveConnectTimeout
public int getSlaveConnectTimeout() -
setInstanceCapStr
-
getInstanceCapStr
-
setSlaveConnectTimeoutStr
-
getSlaveConnectTimeoutStr
-
setIdleMinutes
@DataBoundSetter public void setIdleMinutes(int i) -
getIdleMinutes
public int getIdleMinutes() -
setActiveDeadlineSeconds
@DataBoundSetter public void setActiveDeadlineSeconds(int i) -
getActiveDeadlineSeconds
public int getActiveDeadlineSeconds() -
setIdleMinutesStr
-
getIdleMinutesStr
-
setActiveDeadlineSecondsStr
-
getActiveDeadlineSecondsStr
-
getLabelSet
-
getLabelsMap
-
setLabel
-
getLabel
-
setNodeSelector
-
getNodeSelector
-
setNodeUsageMode
-
setNodeUsageMode
-
getNodeUsageMode
-
setPrivileged
Deprecated. -
isPrivileged
Deprecated. -
setRunAsUser
-
getRunAsUser
-
getRunAsUserAsLong
-
setRunAsGroup
-
getRunAsGroup
-
getRunAsGroupAsLong
-
setSupplementalGroups
-
getSupplementalGroups
-
setHostNetwork
-
isHostNetwork
public boolean isHostNetwork() -
isHostNetworkSet
public boolean isHostNetworkSet() -
getServiceAccount
-
setServiceAccount
-
getSchedulerName
-
setSchedulerName
-
setAlwaysPullImage
Deprecated. -
isAlwaysPullImage
Deprecated. -
setCapOnlyOnAlivePods
Deprecated. -
isCapOnlyOnAlivePods
Deprecated. -
getEnvVars
-
addEnvVars
-
doDoDelete
@POST public org.kohsuke.stapler.HttpResponse doDoDelete(@AncestorInPath PodTemplateGroup owner) throws IOException Deletes the template.- Throws:
IOException
-
doConfigSubmit
@POST public org.kohsuke.stapler.HttpResponse doConfigSubmit(org.kohsuke.stapler.StaplerRequest req, @AncestorInPath PodTemplateGroup owner) throws IOException, javax.servlet.ServletException, Descriptor.FormException - Throws:
IOException
javax.servlet.ServletException
Descriptor.FormException
-
setEnvVars
-
getAnnotations
-
addAnnotations
-
setAnnotations
-
getImagePullSecrets
-
addImagePullSecrets
-
setImagePullSecrets
-
setNodeProperties
-
getNodeProperties
-
getResourceRequestMemory
Deprecated. -
setResourceRequestMemory
Deprecated. -
getResourceLimitCpu
Deprecated. -
setResourceLimitCpu
Deprecated. -
getResourceLimitMemory
Deprecated. -
setResourceLimitMemory
Deprecated. -
getResourceRequestCpu
Deprecated. -
setResourceRequestCpu
Deprecated. -
setVolumes
-
getVolumes
-
getWorkspaceVolume
-
setWorkspaceVolume
-
setContainers
-
getContainers
-
getYaml
- Returns:
- The persisted yaml fragment
-
setYaml
-
getYamls
-
setYamls
-
getPodRetention
-
setPodRetention
-
getListener
- See Also:
-
getListenerOrNull
- See Also:
-
setListener
-
getTerminationGracePeriodSeconds
-
setTerminationGracePeriodSeconds
-
readResolve
-
build
@Deprecated public io.fabric8.kubernetes.api.model.Pod build(io.fabric8.kubernetes.client.KubernetesClient client, KubernetesSlave slave) Deprecated. -
build
Build a Pod object from a PodTemplate- Parameters:
slave
-
-
getDescriptionForLogging
Deprecated.UseSerialization.asYaml(build(KubernetesSlave))
instead. -
isInheritYamlMergeStrategy
public boolean isInheritYamlMergeStrategy() -
setInheritYamlMergeStrategy
@DataBoundSetter public void setInheritYamlMergeStrategy(boolean inheritYamlMergeStrategy) -
isShowRawYaml
public boolean isShowRawYaml() -
setShowRawYaml
@DataBoundSetter public void setShowRawYaml(boolean showRawYaml) -
save
public void save()Empty implementation of Saveable interface. This interface is used for DescribableList implementation -
isReadonlyFromUi
public boolean isReadonlyFromUi() -
setReadonlyFromUi
public void setReadonlyFromUi(boolean readonlyFromUi) -
setRun
-
getRun
-
toString
-
Serialization.asYaml(build(KubernetesSlave))
instead.