use of org.eclipse.jkube.kit.config.resource.ResourceServiceConfig in project jkube by eclipse.
the class ResourceMojo method initJKubeServiceHubBuilder.
@Override
protected JKubeServiceHub.JKubeServiceHubBuilder initJKubeServiceHubBuilder(JavaProject javaProject) {
realResourceDir = ResourceUtil.getFinalResourceDir(resourceDir, environment);
final ResourceServiceConfig resourceServiceConfig = ResourceServiceConfig.builder().project(javaProject).resourceDir(realResourceDir).targetDir(targetDir).resourceFileType(resourceFileType).resourceConfig(resources).resourceFilesProcessor(resourceFiles -> mavenFilterFiles(resourceFiles, workDir)).interpolateTemplateParameters(interpolateTemplateParameters).build();
return super.initJKubeServiceHubBuilder(javaProject).resourceService(new LazyBuilder<>(() -> new DefaultResourceService(resourceServiceConfig)));
}
use of org.eclipse.jkube.kit.config.resource.ResourceServiceConfig in project jkube by eclipse.
the class KubernetesResourceTask method initJKubeServiceHubBuilder.
@Override
protected JKubeServiceHub.JKubeServiceHubBuilder initJKubeServiceHubBuilder() {
JKubeServiceHub.JKubeServiceHubBuilder builder = super.initJKubeServiceHubBuilder();
ResourceConfig resourceConfig = kubernetesExtension.resources;
if (kubernetesExtension.getNamespaceOrNull() != null) {
resourceConfig = ResourceConfig.toBuilder(resourceConfig).namespace(kubernetesExtension.getNamespaceOrNull()).build();
}
final ResourceServiceConfig resourceServiceConfig = ResourceServiceConfig.builder().project(kubernetesExtension.javaProject).resourceDir(resolveResourceSourceDirectory()).targetDir(kubernetesExtension.getResourceTargetDirectoryOrDefault()).resourceFileType(kubernetesExtension.getResourceFileTypeOrDefault()).resourceConfig(resourceConfig).interpolateTemplateParameters(kubernetesExtension.getInterpolateTemplateParametersOrDefault()).resourceFilesProcessor(this::gradleFilterFiles).build();
builder.resourceService(new LazyBuilder<>(() -> new DefaultResourceService(resourceServiceConfig)));
return builder;
}
Aggregations