File tree Expand file tree Collapse file tree 4 files changed +11
-1
lines changed
operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api
operator-framework/src/test/java/io/javaoperatorsdk/operator Expand file tree Collapse file tree 4 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -713,6 +713,8 @@ See also an example implementation in the
713
713
714
714
## Optimization of Caches
715
715
716
+ In case of large clusters with huge amount of resources the memory consumption of an operator
717
+
716
718
## Automatic Generation of CRDs
717
719
718
720
Note that this feature is provided by the
Original file line number Diff line number Diff line change 9
9
import io .javaoperatorsdk .operator .OperatorException ;
10
10
import io .javaoperatorsdk .operator .ReconcilerUtils ;
11
11
import io .javaoperatorsdk .operator .api .reconciler .Constants ;
12
+ import io .javaoperatorsdk .operator .api .reconciler .ControllerConfiguration ;
12
13
import io .javaoperatorsdk .operator .processing .event .source .filter .GenericFilter ;
13
14
import io .javaoperatorsdk .operator .processing .event .source .filter .OnAddFilter ;
14
15
import io .javaoperatorsdk .operator .processing .event .source .filter .OnUpdateFilter ;
@@ -110,6 +111,9 @@ default Set<String> getEffectiveNamespaces() {
110
111
return targetNamespaces ;
111
112
}
112
113
114
+ /**
115
+ * See {@link ControllerConfiguration#cachePruneFunction()} for details.
116
+ */
113
117
default Optional <UnaryOperator <R >> cachePruneFunction () {
114
118
return Optional .empty ();
115
119
}
Original file line number Diff line number Diff line change @@ -125,6 +125,9 @@ MaxReconciliationInterval maxReconciliationInterval() default @MaxReconciliation
125
125
* that this has subtle implications how updates on the resources should be handled. Notably only
126
126
* patching of the resource can be used from that point, since update would remove not cached
127
127
* parts of the resource.
128
+ * <p>
129
+ * Note that this feature does not work with Dependent Resources.
130
+ * </p>
128
131
*
129
132
* @return function to remove parts of the resource.
130
133
*/
Original file line number Diff line number Diff line change 1
1
package io .javaoperatorsdk .operator ;
2
2
3
+ import java .time .Duration ;
3
4
import java .util .Map ;
4
5
5
6
import org .junit .jupiter .api .Test ;
@@ -43,7 +44,7 @@ void pruningRelatedBehavior() {
43
44
44
45
operator .delete (updated );
45
46
46
- await ().untilAsserted (() -> {
47
+ await ().atMost ( Duration . ofSeconds ( 30 )). untilAsserted (() -> {
47
48
var actual = operator .get (CachePruneCustomResource .class , TEST_RESOURCE_NAME );
48
49
var configMap = operator .get (ConfigMap .class , TEST_RESOURCE_NAME );
49
50
assertThat (configMap ).isNull ();
You can’t perform that action at this time.
0 commit comments