use of io.quarkiverse.operatorsdk.bundle.deployment.builders.CustomResourceManifestsBuilder in project quarkus-operator-sdk by quarkiverse.
the class BundleGenerator method prepareGeneration.
public static List<ManifestsBuilder> prepareGeneration(BundleGenerationConfiguration bundleConfiguration, BuildTimeOperatorConfiguration operatorConfiguration, Map<CSVMetadataHolder, List<AugmentedResourceInfo>> csvGroups, List<CRDInfo> crds) {
List<ManifestsBuilder> builders = new ArrayList<>();
for (Map.Entry<CSVMetadataHolder, List<AugmentedResourceInfo>> entry : csvGroups.entrySet()) {
final var labels = generateBundleLabels(entry.getKey(), bundleConfiguration, operatorConfiguration);
builders.add(new CsvManifestsBuilder(entry.getKey(), entry.getValue()));
builders.add(new AnnotationsManifestsBuilder(entry.getKey(), labels));
builders.add(new BundleDockerfileManifestsBuilder(entry.getKey(), labels));
entry.getValue().stream().map(controller -> findOwnedCustomResource(controller, crds)).filter(Objects::nonNull).map(crd -> new CustomResourceManifestsBuilder(entry.getKey(), crd)).forEach(builders::add);
}
return builders;
}
Aggregations