Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

next #798

Draft
wants to merge 30 commits into
base: main
Choose a base branch
from
Draft

next #798

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
3cacfb0
feat: JOSDK 5.0.0-SNAPSHOT upgrade, remove ResourceEventFilter support
metacosm Jan 22, 2024
98c6b79
feat: update retry configuration support to only apply to GenericRetry
metacosm Jan 23, 2024
b49f82d
feat: WorkflowReconcileResult is not optional anymore
metacosm Jan 23, 2024
5a704a1
chore: change version to 7.0.0-SNAPSHOT
metacosm Jan 25, 2024
0da2c50
feat: adapt code to Workflow now being a separate annotation
metacosm Mar 20, 2024
0cf5128
feat: remove ResourceDiscriminator
metacosm Mar 25, 2024
89c0dbb
feat: install a shutdown hook if termination timeout is set
metacosm Mar 26, 2024
34d5fb1
fix: override getPrimaryResource as default implementation doesn't work
metacosm Apr 25, 2024
1da9eb8
fix: replace update with patch calls
metacosm Apr 25, 2024
2d752dd
docs: precise & unify comments on why some getters are required
metacosm May 2, 2024
a3d2f76
feat: add support for explicit workflow exception handling
metacosm May 2, 2024
fc35c14
feat: add defensive cloning configuration
metacosm May 2, 2024
f7828b7
fix: adapt to EventSource changes
metacosm May 2, 2024
9572222
fix: remove now removed ObservedGenerationAwareStatus interface
metacosm May 15, 2024
80d3c70
wip: make things "compile" with independent-config JOSDK branch
metacosm Jun 12, 2024
bca4a48
feat: adapt to changes in KubernetesDependent configuration
metacosm Jun 12, 2024
07ba665
fix: remove now unneeded classes
metacosm Jun 20, 2024
fe9bfd8
fix: no need to reconfigure spec
metacosm Jun 20, 2024
dd76563
wip: make things "compile" with independent-config JOSDK branch
metacosm Jun 12, 2024
1ddfec4
feat: adapt to informer configuration changes
metacosm Jun 28, 2024
6881e8a
feat: update to informer configuration changes for controller (#895)
metacosm Jul 4, 2024
1cdf31e
chore: revert to use Quarkus 3.12.1
metacosm Jul 4, 2024
eb10b9b
refactor: rename based on JOSDK changes
metacosm Jul 12, 2024
d2f216f
refactor: remove now unneeded code
metacosm Aug 12, 2024
c8977f5
refactor: use WithTestResource
metacosm Jul 4, 2024
2787bbe
refactor: access informer-related config from InformerConfiguration
metacosm Aug 16, 2024
c5a59fe
fix: adapt after rebase
metacosm Aug 29, 2024
e64f3da
fix: adapt to changes after rebase
metacosm Sep 3, 2024
63b5566
chore: doc updates after plugin update (missed earlier)
metacosm Sep 6, 2024
c14a081
fix: update WatchAllReconciler configuration after rebase
metacosm Sep 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion annotations/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.quarkiverse.operatorsdk</groupId>
<artifactId>quarkus-operator-sdk-parent</artifactId>
<version>6.8.1-SNAPSHOT</version>
<version>7.0.0-SNAPSHOT</version>
</parent>

<artifactId>quarkus-operator-sdk-annotations</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.quarkiverse.operatorsdk</groupId>
<artifactId>quarkus-operator-sdk-parent</artifactId>
<version>6.8.1-SNAPSHOT</version>
<version>7.0.0-SNAPSHOT</version>
</parent>
<artifactId>quarkus-operator-sdk-bom</artifactId>
<name>Quarkus - Operator SDK - BOM</name>
Expand Down
2 changes: 1 addition & 1 deletion build-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.quarkiverse.operatorsdk</groupId>
<artifactId>quarkus-operator-sdk-parent</artifactId>
<version>6.8.1-SNAPSHOT</version>
<version>7.0.0-SNAPSHOT</version>
</parent>
<artifactId>quarkus-operator-sdk-build-parent</artifactId>
<packaging>pom</packaging>
Expand Down
2 changes: 1 addition & 1 deletion bundle-generator/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.quarkiverse.operatorsdk</groupId>
<artifactId>quarkus-operator-sdk-bundle-generator-parent</artifactId>
<version>6.8.1-SNAPSHOT</version>
<version>7.0.0-SNAPSHOT</version>
</parent>

<name>Quarkus - Operator SDK - Bundle Generator - Deployment</name>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.quarkiverse.operatorsdk.bundle.sources;

import io.javaoperatorsdk.operator.api.config.informer.Informer;
import io.javaoperatorsdk.operator.api.reconciler.Context;
import io.javaoperatorsdk.operator.api.reconciler.ControllerConfiguration;
import io.javaoperatorsdk.operator.api.reconciler.Reconciler;
Expand All @@ -9,7 +10,7 @@

@CSVMetadata(bundleName = "second-operator")
@RBACRule(apiGroups = SecondReconciler.RBAC_RULE_GROUP, resources = SecondReconciler.RBAC_RULE_RES, verbs = SecondReconciler.RBAC_RULE_VERBS)
@ControllerConfiguration(namespaces = "foo")
@ControllerConfiguration(informer = @Informer(namespaces = "foo"))
public class SecondReconciler implements Reconciler<Second> {
public static final String RBAC_RULE_GROUP = "halkyon.io";
public static final String RBAC_RULE_RES = "SomeResource";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@
import io.javaoperatorsdk.operator.api.reconciler.ControllerConfiguration;
import io.javaoperatorsdk.operator.api.reconciler.Reconciler;
import io.javaoperatorsdk.operator.api.reconciler.UpdateControl;
import io.javaoperatorsdk.operator.api.reconciler.Workflow;
import io.javaoperatorsdk.operator.api.reconciler.dependent.Dependent;
import io.quarkiverse.operatorsdk.annotations.CSVMetadata;
import io.quarkiverse.operatorsdk.annotations.CSVMetadata.Annotations;
import io.quarkiverse.operatorsdk.annotations.CSVMetadata.Annotations.Annotation;
import io.quarkiverse.operatorsdk.annotations.CSVMetadata.RequiredCRD;

@CSVMetadata(bundleName = ThirdReconciler.BUNDLE_NAME, requiredCRDs = @RequiredCRD(kind = SecondExternal.KIND, name = "externalagains."
+ SecondExternal.GROUP, version = SecondExternal.VERSION), replaces = "1.0.0", annotations = @Annotations(skipRange = ">=1.0.0 <1.0.3", capabilities = "Test", repository = "should be overridden by property", others = @Annotation(name = "foo", value = "bar")))
@ControllerConfiguration(name = ThirdReconciler.NAME, dependents = {
@Workflow(dependents = {
@Dependent(type = ExternalDependentResource.class),
@Dependent(name = "pod1", type = PodDependentResource.class),
@Dependent(name = "pod2", type = PodDependentResource.class)
})
@CSVMetadata(bundleName = ThirdReconciler.BUNDLE_NAME, requiredCRDs = @RequiredCRD(kind = SecondExternal.KIND, name = "externalagains."
+ SecondExternal.GROUP, version = SecondExternal.VERSION), replaces = "1.0.0", annotations = @Annotations(skipRange = ">=1.0.0 <1.0.3", capabilities = "Test", repository = "should be overridden by property", others = @Annotation(name = "foo", value = "bar")))
@ControllerConfiguration(name = ThirdReconciler.NAME)
public class ThirdReconciler implements Reconciler<Third> {

public static final String NAME = "third";
Expand Down
2 changes: 1 addition & 1 deletion bundle-generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.quarkiverse.operatorsdk</groupId>
<artifactId>quarkus-operator-sdk-build-parent</artifactId>
<version>6.8.1-SNAPSHOT</version>
<version>7.0.0-SNAPSHOT</version>
<relativePath>../build-parent/pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion bundle-generator/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.quarkiverse.operatorsdk</groupId>
<artifactId>quarkus-operator-sdk-bundle-generator-parent</artifactId>
<version>6.8.1-SNAPSHOT</version>
<version>7.0.0-SNAPSHOT</version>
</parent>

<name>Quarkus - Operator SDK - Bundle Generator - Runtime</name>
Expand Down
2 changes: 1 addition & 1 deletion cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>io.quarkiverse.operatorsdk</groupId>
<artifactId>quarkus-operator-sdk-build-parent</artifactId>
<version>6.8.1-SNAPSHOT</version>
<version>7.0.0-SNAPSHOT</version>
<relativePath>../build-parent/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion common-deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>io.quarkiverse.operatorsdk</groupId>
<artifactId>quarkus-operator-sdk-build-parent</artifactId>
<version>6.8.1-SNAPSHOT</version>
<version>7.0.0-SNAPSHOT</version>
<relativePath>../build-parent/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import io.javaoperatorsdk.operator.api.reconciler.ControllerConfiguration;
import io.javaoperatorsdk.operator.api.reconciler.Ignore;
import io.javaoperatorsdk.operator.api.reconciler.Reconciler;
import io.javaoperatorsdk.operator.api.reconciler.Workflow;
import io.javaoperatorsdk.operator.api.reconciler.dependent.DependentResource;
import io.quarkiverse.operatorsdk.annotations.AdditionalRBACRoleRefs;
import io.quarkiverse.operatorsdk.annotations.AdditionalRBACRules;
Expand All @@ -24,6 +25,7 @@ private Constants() {
public static final DotName CUSTOM_RESOURCE = DotName.createSimple(CustomResource.class.getName());
public static final DotName HAS_METADATA = DotName.createSimple(HasMetadata.class.getName());
public static final DotName CONTROLLER_CONFIGURATION = DotName.createSimple(ControllerConfiguration.class.getName());
public static final DotName WORKFLOW = DotName.createSimple(Workflow.class.getName());
public static final DotName DEPENDENT_RESOURCE = DotName.createSimple(DependentResource.class.getName());
public static final DotName CONFIGURED = DotName.createSimple(Configured.class.getName());
public static final DotName ANNOTATION_CONFIGURABLE = DotName.createSimple(AnnotationConfigurable.class.getName());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package io.quarkiverse.operatorsdk.common;

import static io.quarkiverse.operatorsdk.common.Constants.CONTROLLER_CONFIGURATION;
import static io.quarkiverse.operatorsdk.common.Constants.CUSTOM_RESOURCE;
import static io.quarkiverse.operatorsdk.common.Constants.HAS_METADATA;
import static io.quarkiverse.operatorsdk.common.Constants.RECONCILER;
import static io.quarkiverse.operatorsdk.common.Constants.*;

import java.util.Collection;
import java.util.Collections;
Expand Down Expand Up @@ -48,10 +45,10 @@ protected void doAugment(IndexView index, Logger log, Map<String, Object> contex

// extract dependent information
final var reconciler = classInfo();
final var controllerAnnotation = reconciler.declaredAnnotation(CONTROLLER_CONFIGURATION);
final var workflow = reconciler.declaredAnnotation(WORKFLOW);
dependentResourceInfos = Collections.emptyList();
if (controllerAnnotation != null) {
final var dependents = controllerAnnotation.value("dependents");
if (workflow != null) {
final var dependents = workflow.value("dependents");
if (dependents != null) {
final var dependentAnnotations = dependents.asNestedArray();
var dependentResources = Collections.<String, DependentResourceAugmentedClassInfo> emptyMap();
Expand Down
2 changes: 1 addition & 1 deletion common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.quarkiverse.operatorsdk</groupId>
<artifactId>quarkus-operator-sdk-build-parent</artifactId>
<version>6.8.1-SNAPSHOT</version>
<version>7.0.0-SNAPSHOT</version>
<relativePath>../build-parent/pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion core/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.quarkiverse.operatorsdk</groupId>
<artifactId>quarkus-operator-sdk-core-parent</artifactId>
<version>6.8.1-SNAPSHOT</version>
<version>7.0.0-SNAPSHOT</version>
</parent>
<artifactId>quarkus-operator-sdk-deployment</artifactId>
<name>Quarkus - Operator SDK - Core - Deployment</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import io.javaoperatorsdk.operator.processing.dependent.kubernetes.KubernetesDependentResource;
import io.javaoperatorsdk.operator.processing.dependent.kubernetes.KubernetesDependentResourceConfig;
import io.quarkiverse.operatorsdk.annotations.RBACVerbs;
import io.quarkiverse.operatorsdk.runtime.DependentResourceSpecMetadata;
import io.quarkiverse.operatorsdk.runtime.QuarkusControllerConfiguration;

public class AddClusterRolesDecorator extends ResourceProvidingDecorator<KubernetesListBuilder> {
Expand Down Expand Up @@ -106,10 +105,10 @@ private static String getKeyFor(PolicyRule rule) {
@SuppressWarnings("unchecked")
private static Set<PolicyRule> getClusterRolePolicyRulesFromDependentResources(QuarkusControllerConfiguration<?> cri) {
Set<PolicyRule> rules = new LinkedHashSet<>();
final Map<String, DependentResourceSpecMetadata<?, ?, ?>> dependentsMetadata = cri.getDependentsMetadata();
final var dependentsMetadata = cri.dependentsMetadata();
dependentsMetadata.forEach((name, spec) -> {
final var dependentResourceClass = spec.getDependentResourceClass();
final var associatedResourceClass = spec.getDependentType();
final var associatedResourceClass = spec.getResourceClass();

// only process Kubernetes dependents
if (HasMetadata.class.isAssignableFrom(associatedResourceClass)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,24 @@
import io.fabric8.kubernetes.api.model.rbac.RoleBindingBuilder;
import io.fabric8.kubernetes.api.model.rbac.RoleRef;
import io.fabric8.kubernetes.api.model.rbac.RoleRefBuilder;
import io.javaoperatorsdk.operator.api.config.informer.InformerConfiguration;
import io.quarkiverse.operatorsdk.runtime.BuildTimeOperatorConfiguration;
import io.quarkiverse.operatorsdk.runtime.QuarkusControllerConfiguration;

@SuppressWarnings("rawtypes")
public class AddRoleBindingsDecorator extends ResourceProvidingDecorator<KubernetesListBuilder> {

private static final Logger log = Logger.getLogger(AddRoleBindingsDecorator.class);
protected static final String RBAC_AUTHORIZATION_GROUP = "rbac.authorization.k8s.io";
public static final String CLUSTER_ROLE = "ClusterRole";
protected static final String RBAC_AUTHORIZATION_GROUP = "rbac.authorization.k8s.io";
public static final RoleRef CRD_VALIDATING_ROLE_REF = new RoleRef(RBAC_AUTHORIZATION_GROUP, CLUSTER_ROLE,
JOSDK_CRD_VALIDATING_CLUSTER_ROLE_NAME);
protected static final String SERVICE_ACCOUNT = "ServiceAccount";
private final Collection<QuarkusControllerConfiguration<?>> configs;
private final BuildTimeOperatorConfiguration operatorConfiguration;
private static final Logger log = Logger.getLogger(AddRoleBindingsDecorator.class);
private static final ConcurrentMap<QuarkusControllerConfiguration, List<HasMetadata>> cachedBindings = new ConcurrentHashMap<>();
private static final Optional<String> deployNamespace = ConfigProvider.getConfig()
.getOptionalValue("quarkus.kubernetes.namespace", String.class);
public static final RoleRef CRD_VALIDATING_ROLE_REF = new RoleRef(RBAC_AUTHORIZATION_GROUP, CLUSTER_ROLE,
JOSDK_CRD_VALIDATING_CLUSTER_ROLE_NAME);
private final Collection<QuarkusControllerConfiguration<?>> configs;
private final BuildTimeOperatorConfiguration operatorConfiguration;

public AddRoleBindingsDecorator(Collection<QuarkusControllerConfiguration<?>> configs,
BuildTimeOperatorConfiguration operatorConfiguration) {
Expand All @@ -60,7 +61,8 @@ private List<HasMetadata> bindingsFor(QuarkusControllerConfiguration<?> controll
final var controllerName = controllerConfiguration.getName();

// retrieve which namespaces should be used to generate either from annotation or from the build time configuration
final var desiredWatchedNamespaces = controllerConfiguration.getNamespaces();
final InformerConfiguration<?> informerConfig = controllerConfiguration.getInformerConfig();
final var desiredWatchedNamespaces = informerConfig.getNamespaces();

// if we validate the CRDs, also create a binding for the CRD validating role
List<HasMetadata> itemsToAdd;
Expand All @@ -75,7 +77,7 @@ private List<HasMetadata> bindingsFor(QuarkusControllerConfiguration<?> controll
}

final var roleBindingName = getRoleBindingName(controllerName);
if (controllerConfiguration.watchCurrentNamespace()) {
if (informerConfig.watchCurrentNamespace()) {
// create a RoleBinding that will be applied in the current namespace if watching only the current NS
itemsToAdd.add(createRoleBinding(roleBindingName, serviceAccountName, null,
createDefaultRoleRef(controllerName)));
Expand All @@ -85,7 +87,7 @@ private List<HasMetadata> bindingsFor(QuarkusControllerConfiguration<?> controll
final var specificRoleBindingName = getSpecificRoleBindingName(controllerName, roleRef);
itemsToAdd.add(createRoleBinding(specificRoleBindingName, serviceAccountName, null, roleRef));
});
} else if (controllerConfiguration.watchAllNamespaces()) {
} else if (informerConfig.watchAllNamespaces()) {
itemsToAdd.add(createClusterRoleBinding(serviceAccountName, controllerName,
getClusterRoleBindingName(controllerName), "watch all namespaces",
null));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ BuildTimeConfigurationServiceBuildItem createBuildTimeConfigurationService(Versi
buildTimeConfig.closeClientOnStop(),
buildTimeConfig.stopOnInformerErrorDuringStartup(),
buildTimeConfig.enableSSA(),
buildTimeConfig.activateLeaderElectionForProfiles());
buildTimeConfig.activateLeaderElectionForProfiles(),
buildTimeConfig.defensiveCloning());
return new BuildTimeConfigurationServiceBuildItem(service);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,17 @@
import io.quarkiverse.operatorsdk.common.Constants;
import io.quarkiverse.operatorsdk.common.ResourceAssociatedAugmentedClassInfo;
import io.quarkiverse.operatorsdk.deployment.devui.commands.ConsoleCommands;
import io.quarkiverse.operatorsdk.runtime.*;
import io.quarkiverse.operatorsdk.runtime.AppEventListener;
import io.quarkiverse.operatorsdk.runtime.BuildTimeOperatorConfiguration;
import io.quarkiverse.operatorsdk.runtime.ConfigurationServiceRecorder;
import io.quarkiverse.operatorsdk.runtime.KubernetesClientObjectMapperCustomizer;
import io.quarkiverse.operatorsdk.runtime.KubernetesClientSerializationCustomizer;
import io.quarkiverse.operatorsdk.runtime.NoOpMetricsProvider;
import io.quarkiverse.operatorsdk.runtime.OperatorHealthCheck;
import io.quarkiverse.operatorsdk.runtime.OperatorProducer;
import io.quarkiverse.operatorsdk.runtime.QuarkusConfigurationService;
import io.quarkiverse.operatorsdk.runtime.QuarkusControllerConfiguration;
import io.quarkiverse.operatorsdk.runtime.RunTimeOperatorConfiguration;
import io.quarkus.arc.deployment.AdditionalBeanBuildItem;
import io.quarkus.arc.deployment.SyntheticBeanBuildItem;
import io.quarkus.arc.deployment.UnremovableBeanBuildItem;
Expand All @@ -33,7 +43,12 @@
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.annotations.ExecutionTime;
import io.quarkus.deployment.annotations.Record;
import io.quarkus.deployment.builditem.*;
import io.quarkus.deployment.builditem.AdditionalIndexedClassesBuildItem;
import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
import io.quarkus.deployment.builditem.ConsoleCommandBuildItem;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import io.quarkus.deployment.builditem.IndexDependencyBuildItem;
import io.quarkus.deployment.builditem.RunTimeConfigurationDefaultBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ForceNonWeakReflectiveClassBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveHierarchyBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveHierarchyIgnoreWarningBuildItem;
Expand Down Expand Up @@ -179,28 +194,6 @@ AnnotationConfigurablesBuildItem gatherAnnotationConfigurables(
return new AnnotationConfigurablesBuildItem(configurableInfos);
}

/**
* Gathers the CustomResource implementations that are not part of the application index because they are part of an
* external, reusable module for example.
*
* <p>
* Note that this will be obsolete once <a href="https://github.com/quarkusio/quarkus/pull/38586">Quarkus #38586</a> is
* usable
* </p>
*/
@BuildStep
void gatherOutOfAppCustomResourceImplementations(CombinedIndexBuildItem combinedIndexBuildItem,
ApplicationIndexBuildItem applicationIndexBuildItem,
BuildProducer<QOSDKReflectiveClassBuildItem> reflectiveClassProducer) {
final var combinedIndex = combinedIndexBuildItem.getIndex();
final var appIndex = applicationIndexBuildItem.getIndex();

// only add the CRs found in the combined index that were not already in the application one since Quarkus should already handle these
final var crsFromCombined = combinedIndex.getAllKnownSubclasses(Constants.CUSTOM_RESOURCE);
crsFromCombined.removeAll(appIndex.getAllKnownSubclasses(Constants.CUSTOM_RESOURCE));
crsFromCombined.forEach(ci -> reflectiveClassProducer.produce(new QOSDKReflectiveClassBuildItem(ci.name().toString())));
}

@BuildStep
void registerClassesForReflection(
List<QOSDKReflectiveClassBuildItem> toRegister,
Expand Down Expand Up @@ -248,7 +241,7 @@ void initializeRuntimeNamespacesFromBuildTimeValues(
ControllerConfigurationsBuildItem configurations,
BuildProducer<RunTimeConfigurationDefaultBuildItem> runtimeConfig) {
configurations.getControllerConfigs().forEach((name, configuration) -> {
final var namespaces = String.join(",", configuration.getNamespaces());
final var namespaces = String.join(",", configuration.getInformerConfig().getNamespaces());
runtimeConfig.produce(new RunTimeConfigurationDefaultBuildItem(
"quarkus.operator-sdk.controllers." + configuration.getName() + ".namespaces",
namespaces));
Expand Down Expand Up @@ -302,10 +295,10 @@ void ignoreNonIndexedClassesWarningsInReflectiveHierarchy(
private void registerAssociatedClassesForReflection(BuildProducer<ReflectiveHierarchyBuildItem> reflectionClasses,
BuildProducer<ForceNonWeakReflectiveClassBuildItem> forcedReflectionClasses,
Set<String> classNamesToRegister) {
// todo: use builder API when/if https://github.com/quarkusio/quarkus/pull/38679 is available
classNamesToRegister.forEach(cn -> {
reflectionClasses.produce(new ReflectiveHierarchyBuildItem.Builder()
.type(Type.create(DotName.createSimple(cn), Type.Kind.CLASS)).build());
reflectionClasses.produce(
ReflectiveHierarchyBuildItem.builder(Type.create(DotName.createSimple(cn), Type.Kind.CLASS))
.build());
forcedReflectionClasses.produce(
new ForceNonWeakReflectiveClassBuildItem(cn));
log.infov("Registered ''{0}'' for reflection", cn);
Expand Down
Loading
Loading