Package io.fabric8.jenkins.openshiftsync
Class PodTemplateUtils
- java.lang.Object
-
- io.fabric8.jenkins.openshiftsync.PodTemplateUtils
-
public class PodTemplateUtils extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
CONFIGMAP
protected static String
isType
protected static ConcurrentHashMap<String,String>
podTemplateToApiType
protected static ConcurrentHashMap<String,List<org.csanchez.jenkins.plugins.kubernetes.PodTemplate>>
trackedPodTemplates
-
Constructor Summary
Constructors Constructor Description PodTemplateUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static void
addAgents(List<org.csanchez.jenkins.plugins.kubernetes.PodTemplate> slaves, String type, String uid, String apiObjName, String namespace)
protected static void
addPodTemplate(String type, String apiObjName, String namespace, List<org.csanchez.jenkins.plugins.kubernetes.PodTemplate> podTemplates, org.csanchez.jenkins.plugins.kubernetes.PodTemplate podTemplate)
static void
addPodTemplate(org.csanchez.jenkins.plugins.kubernetes.PodTemplate podTemplate)
protected static void
addPodTemplateFromConfigMap(io.fabric8.kubernetes.api.model.ConfigMap configMap)
protected static void
addPodTemplateFromImageStreamTag(List<org.csanchez.jenkins.plugins.kubernetes.PodTemplate> results, io.fabric8.openshift.api.model.ImageStream imageStream, io.fabric8.openshift.api.model.TagReference tagRef)
protected static boolean
configMapContainsSlave(io.fabric8.kubernetes.api.model.ConfigMap configMap)
protected static void
deleteAgents(List<org.csanchez.jenkins.plugins.kubernetes.PodTemplate> slaves, String type, String uid, String apiObjName, String namespace)
protected static List<org.csanchez.jenkins.plugins.kubernetes.PodTemplate>
extractPodTemplatesFromImageStreamTags(io.fabric8.openshift.api.model.ImageStream imageStream)
static List<org.csanchez.jenkins.plugins.kubernetes.PodTemplate>
getPodTemplates()
protected static List<org.csanchez.jenkins.plugins.kubernetes.PodTemplate>
getPodTemplatesListFromImageStreams(io.fabric8.openshift.api.model.ImageStream imageStream)
protected static boolean
hasOneAndOnlyOneWithSomethingAfter(String str, String substr)
static boolean
hasPodTemplate(org.csanchez.jenkins.plugins.kubernetes.PodTemplate podTemplate)
protected static boolean
hasSlaveLabelOrAnnotation(Map<String,String> map)
protected static boolean
isReservedPodTemplateName(String name)
protected static List<org.csanchez.jenkins.plugins.kubernetes.PodTemplate>
onlyTrackPodTemplate(String type, String apiObjName, String namespace, List<org.csanchez.jenkins.plugins.kubernetes.PodTemplate> podTemplates, org.csanchez.jenkins.plugins.kubernetes.PodTemplate podTemplate)
protected static org.csanchez.jenkins.plugins.kubernetes.PodTemplate
podTemplateFromData(String name, String image, Map<String,String> map)
static org.csanchez.jenkins.plugins.kubernetes.PodTemplate
podTemplateInit(String name, String image, String label)
static List<org.csanchez.jenkins.plugins.kubernetes.PodTemplate>
podTemplatesFromConfigMap(io.fabric8.kubernetes.api.model.ConfigMap configMap)
protected static void
purgeTemplates(String type, String uid, String apiObjName, String namespace)
protected static void
removePodTemplate(String type, String apiObjName, String namespace, org.csanchez.jenkins.plugins.kubernetes.PodTemplate podTemplate)
static void
removePodTemplate(org.csanchez.jenkins.plugins.kubernetes.PodTemplate podTemplate)
protected static void
trackPodTemplates(String uid, List<org.csanchez.jenkins.plugins.kubernetes.PodTemplate> podTemplatesToTrack)
protected static void
updateAgents(List<org.csanchez.jenkins.plugins.kubernetes.PodTemplate> slaves, String type, String uid, String apiObjName, String namespace)
protected static void
updateTrackedPodTemplatesMap(String uid, List<org.csanchez.jenkins.plugins.kubernetes.PodTemplate> finalSlaveList)
-
-
-
Field Detail
-
CONFIGMAP
protected static final String CONFIGMAP
- See Also:
- Constant Field Values
-
isType
protected static final String isType
- See Also:
- Constant Field Values
-
trackedPodTemplates
protected static final ConcurrentHashMap<String,List<org.csanchez.jenkins.plugins.kubernetes.PodTemplate>> trackedPodTemplates
-
podTemplateToApiType
protected static final ConcurrentHashMap<String,String> podTemplateToApiType
-
-
Method Detail
-
hasOneAndOnlyOneWithSomethingAfter
protected static boolean hasOneAndOnlyOneWithSomethingAfter(String str, String substr)
-
podTemplateInit
public static org.csanchez.jenkins.plugins.kubernetes.PodTemplate podTemplateInit(String name, String image, String label)
-
removePodTemplate
public static void removePodTemplate(org.csanchez.jenkins.plugins.kubernetes.PodTemplate podTemplate)
-
getPodTemplates
public static List<org.csanchez.jenkins.plugins.kubernetes.PodTemplate> getPodTemplates()
-
hasPodTemplate
public static boolean hasPodTemplate(org.csanchez.jenkins.plugins.kubernetes.PodTemplate podTemplate)
-
addPodTemplate
public static void addPodTemplate(org.csanchez.jenkins.plugins.kubernetes.PodTemplate podTemplate)
-
purgeTemplates
protected static void purgeTemplates(String type, String uid, String apiObjName, String namespace)
-
updateTrackedPodTemplatesMap
protected static void updateTrackedPodTemplatesMap(String uid, List<org.csanchez.jenkins.plugins.kubernetes.PodTemplate> finalSlaveList)
-
trackPodTemplates
protected static void trackPodTemplates(String uid, List<org.csanchez.jenkins.plugins.kubernetes.PodTemplate> podTemplatesToTrack)
-
onlyTrackPodTemplate
protected static List<org.csanchez.jenkins.plugins.kubernetes.PodTemplate> onlyTrackPodTemplate(String type, String apiObjName, String namespace, List<org.csanchez.jenkins.plugins.kubernetes.PodTemplate> podTemplates, org.csanchez.jenkins.plugins.kubernetes.PodTemplate podTemplate)
-
addPodTemplate
protected static void addPodTemplate(String type, String apiObjName, String namespace, List<org.csanchez.jenkins.plugins.kubernetes.PodTemplate> podTemplates, org.csanchez.jenkins.plugins.kubernetes.PodTemplate podTemplate)
-
removePodTemplate
protected static void removePodTemplate(String type, String apiObjName, String namespace, org.csanchez.jenkins.plugins.kubernetes.PodTemplate podTemplate)
-
isReservedPodTemplateName
protected static boolean isReservedPodTemplateName(String name)
-
getPodTemplatesListFromImageStreams
protected static List<org.csanchez.jenkins.plugins.kubernetes.PodTemplate> getPodTemplatesListFromImageStreams(io.fabric8.openshift.api.model.ImageStream imageStream)
-
extractPodTemplatesFromImageStreamTags
protected static List<org.csanchez.jenkins.plugins.kubernetes.PodTemplate> extractPodTemplatesFromImageStreamTags(io.fabric8.openshift.api.model.ImageStream imageStream)
-
addPodTemplateFromImageStreamTag
protected static void addPodTemplateFromImageStreamTag(List<org.csanchez.jenkins.plugins.kubernetes.PodTemplate> results, io.fabric8.openshift.api.model.ImageStream imageStream, io.fabric8.openshift.api.model.TagReference tagRef)
-
podTemplateFromData
protected static org.csanchez.jenkins.plugins.kubernetes.PodTemplate podTemplateFromData(String name, String image, Map<String,String> map)
-
podTemplatesFromConfigMap
public static List<org.csanchez.jenkins.plugins.kubernetes.PodTemplate> podTemplatesFromConfigMap(io.fabric8.kubernetes.api.model.ConfigMap configMap)
-
configMapContainsSlave
protected static boolean configMapContainsSlave(io.fabric8.kubernetes.api.model.ConfigMap configMap)
-
hasSlaveLabelOrAnnotation
protected static boolean hasSlaveLabelOrAnnotation(Map<String,String> map)
-
addAgents
protected static void addAgents(List<org.csanchez.jenkins.plugins.kubernetes.PodTemplate> slaves, String type, String uid, String apiObjName, String namespace)
-
updateAgents
protected static void updateAgents(List<org.csanchez.jenkins.plugins.kubernetes.PodTemplate> slaves, String type, String uid, String apiObjName, String namespace)
-
deleteAgents
protected static void deleteAgents(List<org.csanchez.jenkins.plugins.kubernetes.PodTemplate> slaves, String type, String uid, String apiObjName, String namespace)
-
addPodTemplateFromConfigMap
protected static void addPodTemplateFromConfigMap(io.fabric8.kubernetes.api.model.ConfigMap configMap)
-
-