use of org.eclipse.jkube.kit.enricher.api.EnricherContext in project jkube by eclipse.
the class AbstractHealthCheckEnricherTest method createEnricher.
protected AbstractHealthCheckEnricher createEnricher(Properties properties, Map<String, String> pi) {
JavaProject project = JavaProject.builder().properties(new Properties()).build();
project.getProperties().putAll(properties);
final JKubeEnricherContext.JKubeEnricherContextBuilder enricherContextBuilder = JKubeEnricherContext.builder().project(project).log(log);
if (pi != null && !pi.isEmpty()) {
enricherContextBuilder.processingInstructions(pi);
}
EnricherContext context = enricherContextBuilder.build();
AbstractHealthCheckEnricher enricher = new AbstractHealthCheckEnricher(context, "basic") {
@Override
protected Probe getLivenessProbe() {
return getReadinessProbe();
}
@Override
protected Probe getReadinessProbe() {
return new ProbeBuilder().withNewHttpGet().withHost("localhost").withNewPort(8080).endHttpGet().build();
}
};
return enricher;
}
use of org.eclipse.jkube.kit.enricher.api.EnricherContext in project jkube by eclipse.
the class PodAnnotationEnricherTest method setUp.
@Before
public void setUp() {
Properties properties = new Properties();
klb = new KubernetesListBuilder();
EnricherContext context = JKubeEnricherContext.builder().project(JavaProject.builder().properties(properties).build()).build();
podAnnotationEnricher = new PodAnnotationEnricher(context);
}
Aggregations