Class PodTemplateFilter
- java.lang.Object
-
- org.csanchez.jenkins.plugins.kubernetes.PodTemplateFilter
-
- All Implemented Interfaces:
ExtensionPoint
- Direct Known Subclasses:
PodTemplateLabelFilter
public abstract class PodTemplateFilter extends Object implements ExtensionPoint
Filters a pod template according to criteria.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description PodTemplateFilter()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static ExtensionList<PodTemplateFilter>
all()
Returns a list of all implementations ofPodTemplateFilter
.static List<PodTemplate>
applyAll(KubernetesCloud cloud, List<PodTemplate> podTemplates, Label label)
Pass the given pod templates list into all filters implementations.protected abstract PodTemplate
transform(KubernetesCloud cloud, PodTemplate podTemplate, Label label)
Transforms a pod template definition.
-
-
-
Method Detail
-
all
public static ExtensionList<PodTemplateFilter> all()
Returns a list of all implementations ofPodTemplateFilter
.- Returns:
- a list of all implementations of
PodTemplateFilter
.
-
applyAll
public static List<PodTemplate> applyAll(@NonNull KubernetesCloud cloud, @NonNull List<PodTemplate> podTemplates, @CheckForNull Label label)
Pass the given pod templates list into all filters implementations.- Parameters:
cloud
- The cloud instance the pod templates are getting considered forpodTemplates
- The initial list of pod templateslabel
- The label that was requested for provisioning- Returns:
- The pod template list after filtering
-
transform
@CheckForNull protected abstract PodTemplate transform(@NonNull KubernetesCloud cloud, @NonNull PodTemplate podTemplate, @CheckForNull Label label)
Transforms a pod template definition.- Parameters:
cloud
- TheKubernetesCloud
instance thePodTemplate
instances will be scheduled into.podTemplate
- The input pod template to process.label
- The label that was requested for provisioning- Returns:
- A new pod template after transformation. It can be null if the filter denies access to the given pod template.
-
-