Skip to content

Commit c2ae4dd

Browse files
committed
docs
1 parent 02e34ff commit c2ae4dd

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

operator-framework/src/test/java/io/javaoperatorsdk/operator/PrimaryToSecondaryDependentIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class PrimaryToSecondaryDependentIT {
3535
void testPrimaryToSecondaryInDependentResources() {
3636
var reconciler = operator.getReconcilerOfType(PrimaryToSecondaryDependentReconciler.class);
3737
var cm = operator.create(configMap(DO_NOT_RECONCILE));
38-
var cr = operator.create(testCustomResource());
38+
operator.create(testCustomResource());
3939

4040
await().pollDelay(Duration.ofMillis(250)).untilAsserted(() -> {
4141
assertThat(reconciler.getNumberOfExecutions()).isPositive();

operator-framework/src/test/java/io/javaoperatorsdk/operator/sample/primarytosecondaydependent/PrimaryToSecondaryDependentReconciler.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
import static io.javaoperatorsdk.operator.sample.primarytosecondaydependent.PrimaryToSecondaryDependentReconciler.CONFIG_MAP;
2020
import static io.javaoperatorsdk.operator.sample.primarytosecondaydependent.PrimaryToSecondaryDependentReconciler.CONFIG_MAP_EVENT_SOURCE;
2121

22+
/**
23+
* Sample showcases how it is possible to do a primary to secondary mapper for a dependent resource.
24+
* Note that this is usually just used with read only resources. So it has limited usage, one reason
25+
* to use it is to have nice condition on that resource within a workflow.
26+
*/
2227
@ControllerConfiguration(dependents = {@Dependent(type = ConfigMapDependent.class,
2328
name = CONFIG_MAP,
2429
reconcilePrecondition = ConfigMapReconcilePrecondition.class,

0 commit comments

Comments
 (0)