Skip to content

Commit

Permalink
fix: ensure that ping & pong reconcilers are assigned to same bundle
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Laprun <claprun@redhat.com>
  • Loading branch information
metacosm committed Jul 3, 2024
1 parent 4e75d06 commit 354064b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ CSVMetadataBuildItem gatherCSVMetadata(KubernetesConfig kubernetesConfig,

final var sharedMetadataHolders = getSharedMetadataHolders(defaultName, defaultVersion, defaultReplaces, index);
final var csvGroups = new HashMap<CSVMetadataHolder, List<ReconcilerAugmentedClassInfo>>();

ClassUtils.getKnownReconcilers(index, log)
.forEach(reconcilerInfo -> {
// figure out which group should be used to generate CSV
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
import io.quarkiverse.operatorsdk.annotations.CSVMetadata;
import io.quarkiverse.operatorsdk.annotations.SharedCSVMetadata;

@CSVMetadata(bundleName = "pingpong-operator")
@CSVMetadata(bundleName = PingPongOperatorCSVMetadata.BUNDLE_NAME)
@SuppressWarnings("unused")
public class PingPongOperatorCSVMetadata implements SharedCSVMetadata {
public static final String BUNDLE_NAME = "pingpong-operator";
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package io.quarkiverse.operatorsdk.samples.pingpong;

import static io.javaoperatorsdk.operator.api.reconciler.Constants.WATCH_CURRENT_NAMESPACE;
import static io.quarkiverse.operatorsdk.samples.pingpong.PingPongOperatorCSVMetadata.BUNDLE_NAME;

import jakarta.inject.Inject;

Expand All @@ -25,7 +26,7 @@
import io.javaoperatorsdk.operator.api.reconciler.UpdateControl;
import io.quarkiverse.operatorsdk.annotations.CSVMetadata;

@CSVMetadata(bundleName = "pingpong-operator")
@CSVMetadata(bundleName = BUNDLE_NAME)
@ControllerConfiguration(namespaces = WATCH_CURRENT_NAMESPACE)
@SuppressWarnings("unused")
public class PingReconciler implements Reconciler<Ping> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@
package io.quarkiverse.operatorsdk.samples.pingpong;

import static io.javaoperatorsdk.operator.api.reconciler.Constants.WATCH_CURRENT_NAMESPACE;
import static io.quarkiverse.operatorsdk.samples.pingpong.PingPongOperatorCSVMetadata.BUNDLE_NAME;

import io.javaoperatorsdk.operator.api.reconciler.Context;
import io.javaoperatorsdk.operator.api.reconciler.ControllerConfiguration;
import io.javaoperatorsdk.operator.api.reconciler.Reconciler;
import io.javaoperatorsdk.operator.api.reconciler.UpdateControl;
import io.quarkiverse.operatorsdk.annotations.CSVMetadata;

@CSVMetadata(bundleName = BUNDLE_NAME)
@ControllerConfiguration(namespaces = WATCH_CURRENT_NAMESPACE)
@SuppressWarnings("unused")
public class PongReconciler implements Reconciler<Pong> {
Expand Down

0 comments on commit 354064b

Please sign in to comment.