@@ -133,7 +133,7 @@ Deleted (or set to be garbage collected). The following example shows how to cre
133
133
134
134
``` java
135
135
136
- @KubernetesDependent (labelSelector = WebPageManagedDependentsReconciler . SELECTOR )
136
+ @KubernetesDependent (informer = @Informer ( labelSelector = SELECTOR ) )
137
137
class DeploymentDependentResource extends CRUDKubernetesDependentResource<Deployment , WebPage > {
138
138
139
139
@Override
@@ -174,7 +174,8 @@ JOSDK will take the appropriate steps to wire everything together and call your
174
174
` DependentResource ` implementations ` reconcile ` method before your primary resource is reconciled.
175
175
This makes sense in most use cases where the logic associated with the primary resource is
176
176
usually limited to status handling based on the state of the secondary resources and the
177
- resources are not dependent on each other.
177
+ resources are not dependent on each other. As an alternative, you can also invoke reconciliation explicitly,
178
+ event for managed workflows.
178
179
179
180
See [ Workflows] ( https://javaoperatorsdk.io/docs/workflows ) for more details on how the dependent
180
181
resources are reconciled.
@@ -184,12 +185,14 @@ instances are managed by JOSDK, an example of which can be seen below:
184
185
185
186
``` java
186
187
187
- @ControllerConfiguration (
188
- labelSelector = SELECTOR ,
188
+ @Workflow (
189
189
dependents = {
190
190
@Dependent (type = ConfigMapDependentResource . class),
191
191
@Dependent (type = DeploymentDependentResource . class),
192
- @Dependent (type = ServiceDependentResource . class)
192
+ @Dependent (type = ServiceDependentResource . class),
193
+ @Dependent (
194
+ type = IngressDependentResource . class,
195
+ reconcilePrecondition = ExposedIngressCondition . class)
193
196
})
194
197
public class WebPageManagedDependentsReconciler
195
198
implements Reconciler<WebPage > , ErrorStatusHandler<WebPage > {
@@ -204,7 +207,6 @@ public class WebPageManagedDependentsReconciler
204
207
webPage. setStatus(createStatus(name));
205
208
return UpdateControl . patchStatus(webPage);
206
209
}
207
-
208
210
}
209
211
```
210
212
0 commit comments