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.
  • Constructor Details

    • PodTemplateFilter

      public PodTemplateFilter()
  • Method Details

    • all

      public static ExtensionList<PodTemplateFilter> all()
      Returns a list of all implementations of PodTemplateFilter.
      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 for
      podTemplates - The initial list of pod templates
      label - 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 - The KubernetesCloud instance the PodTemplate 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.