File tree 3 files changed +11
-5
lines changed
operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api
3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import java .util .Set ;
4
4
5
+ import static io .javaoperatorsdk .operator .api .reconciler .Constants .DEFAULT_NAMESPACES ;
6
+
5
7
public interface NamespaceChangeable {
6
8
7
9
/**
@@ -16,7 +18,7 @@ public interface NamespaceChangeable {
16
18
17
19
default void changeNamespaces (String ... namespaces ) {
18
20
changeNamespaces (
19
- namespaces != null ? Set .of (namespaces ) : ResourceConfiguration . DEFAULT_NAMESPACES );
21
+ namespaces != null ? Set .of (namespaces ) : DEFAULT_NAMESPACES );
20
22
}
21
23
22
24
default boolean allowsNamespaceChanges () {
Original file line number Diff line number Diff line change 10
10
import io .javaoperatorsdk .operator .processing .event .source .SecondaryToPrimaryMapper ;
11
11
import io .javaoperatorsdk .operator .processing .event .source .informer .Mappers ;
12
12
13
+ import static io .javaoperatorsdk .operator .api .reconciler .Constants .DEFAULT_NAMESPACES ;
14
+
13
15
public interface InformerConfiguration <R extends HasMetadata >
14
16
extends ResourceConfiguration <R > {
15
17
@@ -71,7 +73,7 @@ public InformerConfigurationBuilder<R> withSecondaryToPrimaryMapper(
71
73
72
74
public InformerConfigurationBuilder <R > withNamespaces (String ... namespaces ) {
73
75
return withNamespaces (
74
- namespaces != null ? Set .of (namespaces ) : ResourceConfiguration . DEFAULT_NAMESPACES );
76
+ namespaces != null ? Set .of (namespaces ) : DEFAULT_NAMESPACES );
75
77
}
76
78
77
79
public InformerConfigurationBuilder <R > withNamespaces (Set <String > namespaces ) {
@@ -90,7 +92,7 @@ public InformerConfigurationBuilder<R> withNamespaces(Set<String> namespaces) {
90
92
*/
91
93
public InformerConfigurationBuilder <R > withNamespaces (Set <String > namespaces ,
92
94
boolean followChanges ) {
93
- this .namespaces = namespaces != null ? namespaces : ResourceConfiguration . DEFAULT_NAMESPACES ;
95
+ this .namespaces = namespaces != null ? namespaces : DEFAULT_NAMESPACES ;
94
96
this .inheritControllerNamespacesOnChange = true ;
95
97
return this ;
96
98
}
Original file line number Diff line number Diff line change 1
1
package io .javaoperatorsdk .operator .api .reconciler ;
2
2
3
+ import java .util .Collections ;
3
4
import java .util .Set ;
4
5
5
6
public final class Constants {
6
7
7
- public static final Set <String > DEFAULT_NAMESPACES = Set .of (Constants .WATCH_ALL_NAMESPACES );
8
+ public static final Set <String > DEFAULT_NAMESPACES =
9
+ Collections .singleton (Constants .WATCH_ALL_NAMESPACES );
8
10
public static final Set <String > WATCH_CURRENT_NAMESPACE_SET =
9
- Set . of (Constants .WATCH_CURRENT_NAMESPACE );
11
+ Collections . singleton (Constants .WATCH_CURRENT_NAMESPACE );
10
12
11
13
public static final String NO_VALUE_SET = "" ;
12
14
public static final String WATCH_CURRENT_NAMESPACE = "JOSDK_WATCH_CURRENT" ;
You can’t perform that action at this time.
0 commit comments