@@ -46,7 +46,7 @@ public void start() {
46
46
* Registers the specified controller with this operator.
47
47
*
48
48
* @param controller the controller to register
49
- * @param <R> the {@code CustomResource} type associated with the controller
49
+ * @param <R> the {@code CustomResource} type associated with the controller
50
50
* @throws OperatorException if a problem occurred during the registration process
51
51
*/
52
52
public <R extends CustomResource > void register (ResourceController <R > controller )
@@ -56,13 +56,14 @@ public <R extends CustomResource> void register(ResourceController<R> controller
56
56
57
57
/**
58
58
* Registers the specified controller with this operator, overriding its default configuration by
59
- * the specified one (usually created via {@link io.javaoperatorsdk.operator.api.config.ControllerConfigurationOverrider#override(ControllerConfiguration)},
59
+ * the specified one (usually created via {@link
60
+ * io.javaoperatorsdk.operator.api.config.ControllerConfigurationOverrider#override(ControllerConfiguration)},
60
61
* passing it the controller's original configuration.
61
62
*
62
- * @param controller the controller to register
63
+ * @param controller the controller to register
63
64
* @param configuration the configuration with which we want to register the controller, if {@code
64
- * null}, the controller's orginal configuration is used
65
- * @param <R> the {@code CustomResource} type associated with the controller
65
+ * null}, the controller's orginal configuration is used
66
+ * @param <R> the {@code CustomResource} type associated with the controller
66
67
* @throws OperatorException if a problem occurred during the registration process
67
68
*/
68
69
public <R extends CustomResource > void register (
@@ -82,7 +83,7 @@ public <R extends CustomResource> void register(
82
83
}
83
84
84
85
final var retry = GenericRetry .fromConfiguration (configuration .getRetryConfiguration ());
85
- final var targetNamespaces = configuration .getNamespaces ().toArray (new String []{});
86
+ final var targetNamespaces = configuration .getNamespaces ().toArray (new String [] {});
86
87
Class <R > resClass = configuration .getCustomResourceClass ();
87
88
String finalizer = configuration .getFinalizer ();
88
89
final var client = k8sClient .customResources (resClass );
@@ -97,8 +98,11 @@ public <R extends CustomResource> void register(
97
98
final var controllerName = configuration .getName ();
98
99
if (crd == null ) {
99
100
throw new OperatorException (
100
- "'" + crdName + "' CRD was not found on the cluster, controller "
101
- + controllerName + " cannot be registered" );
101
+ "'"
102
+ + crdName
103
+ + "' CRD was not found on the cluster, controller "
104
+ + controllerName
105
+ + " cannot be registered" );
102
106
}
103
107
104
108
CustomResourceCache customResourceCache = new CustomResourceCache ();
@@ -141,7 +145,7 @@ private CustomResourceEventSource createCustomResourceEventSource(
141
145
CustomResourceEventSource customResourceEventSource =
142
146
watchAllNamespaces
143
147
? CustomResourceEventSource .customResourceEventSourceForAllNamespaces (
144
- customResourceCache , client , generationAware , finalizer )
148
+ customResourceCache , client , generationAware , finalizer )
145
149
: CustomResourceEventSource .customResourceEventSourceForTargetNamespaces (
146
150
customResourceCache , client , targetNamespaces , generationAware , finalizer );
147
151
0 commit comments