Search in sources :

Example 1 with CustomResourceManifestsBuilder

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;
}
Also used : CRDInfo(io.quarkiverse.operatorsdk.runtime.CRDInfo) BundleDockerfileManifestsBuilder(io.quarkiverse.operatorsdk.bundle.deployment.builders.BundleDockerfileManifestsBuilder) BuildTimeOperatorConfiguration(io.quarkiverse.operatorsdk.runtime.BuildTimeOperatorConfiguration) HashMap(java.util.HashMap) CSVMetadataHolder(io.quarkiverse.operatorsdk.bundle.runtime.CSVMetadataHolder) ManifestsBuilder(io.quarkiverse.operatorsdk.bundle.deployment.builders.ManifestsBuilder) ArrayList(java.util.ArrayList) Objects(java.util.Objects) List(java.util.List) BundleGenerationConfiguration(io.quarkiverse.operatorsdk.bundle.runtime.BundleGenerationConfiguration) Map(java.util.Map) AnnotationsManifestsBuilder(io.quarkiverse.operatorsdk.bundle.deployment.builders.AnnotationsManifestsBuilder) CsvManifestsBuilder(io.quarkiverse.operatorsdk.bundle.deployment.builders.CsvManifestsBuilder) CustomResourceManifestsBuilder(io.quarkiverse.operatorsdk.bundle.deployment.builders.CustomResourceManifestsBuilder) BundleDockerfileManifestsBuilder(io.quarkiverse.operatorsdk.bundle.deployment.builders.BundleDockerfileManifestsBuilder) ManifestsBuilder(io.quarkiverse.operatorsdk.bundle.deployment.builders.ManifestsBuilder) AnnotationsManifestsBuilder(io.quarkiverse.operatorsdk.bundle.deployment.builders.AnnotationsManifestsBuilder) CsvManifestsBuilder(io.quarkiverse.operatorsdk.bundle.deployment.builders.CsvManifestsBuilder) CustomResourceManifestsBuilder(io.quarkiverse.operatorsdk.bundle.deployment.builders.CustomResourceManifestsBuilder) CustomResourceManifestsBuilder(io.quarkiverse.operatorsdk.bundle.deployment.builders.CustomResourceManifestsBuilder) ArrayList(java.util.ArrayList) BundleDockerfileManifestsBuilder(io.quarkiverse.operatorsdk.bundle.deployment.builders.BundleDockerfileManifestsBuilder) CSVMetadataHolder(io.quarkiverse.operatorsdk.bundle.runtime.CSVMetadataHolder) AnnotationsManifestsBuilder(io.quarkiverse.operatorsdk.bundle.deployment.builders.AnnotationsManifestsBuilder) Objects(java.util.Objects) ArrayList(java.util.ArrayList) List(java.util.List) HashMap(java.util.HashMap) Map(java.util.Map) CsvManifestsBuilder(io.quarkiverse.operatorsdk.bundle.deployment.builders.CsvManifestsBuilder)

Aggregations

AnnotationsManifestsBuilder (io.quarkiverse.operatorsdk.bundle.deployment.builders.AnnotationsManifestsBuilder)1 BundleDockerfileManifestsBuilder (io.quarkiverse.operatorsdk.bundle.deployment.builders.BundleDockerfileManifestsBuilder)1 CsvManifestsBuilder (io.quarkiverse.operatorsdk.bundle.deployment.builders.CsvManifestsBuilder)1 CustomResourceManifestsBuilder (io.quarkiverse.operatorsdk.bundle.deployment.builders.CustomResourceManifestsBuilder)1 ManifestsBuilder (io.quarkiverse.operatorsdk.bundle.deployment.builders.ManifestsBuilder)1 BundleGenerationConfiguration (io.quarkiverse.operatorsdk.bundle.runtime.BundleGenerationConfiguration)1 CSVMetadataHolder (io.quarkiverse.operatorsdk.bundle.runtime.CSVMetadataHolder)1 BuildTimeOperatorConfiguration (io.quarkiverse.operatorsdk.runtime.BuildTimeOperatorConfiguration)1 CRDInfo (io.quarkiverse.operatorsdk.runtime.CRDInfo)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 List (java.util.List)1 Map (java.util.Map)1 Objects (java.util.Objects)1