File tree Expand file tree Collapse file tree 1 file changed +19
-14
lines changed
operator-framework-core/src/main/java/io/javaoperatorsdk/operator Expand file tree Collapse file tree 1 file changed +19
-14
lines changed Original file line number Diff line number Diff line change @@ -85,20 +85,25 @@ public List<Controller> getControllers() {
85
85
* and start the cluster monitoring processes.
86
86
*/
87
87
public void start () {
88
- controllers .shouldStart ();
89
-
90
- final var version = ConfigurationServiceProvider .instance ().getVersion ();
91
- log .info (
92
- "Operator SDK {} (commit: {}) built on {} starting..." ,
93
- version .getSdkVersion (),
94
- version .getCommit (),
95
- version .getBuiltTime ());
96
-
97
- final var clientVersion = Version .clientVersion ();
98
- log .info ("Client version: {}" , clientVersion );
99
-
100
- ExecutorServiceManager .init ();
101
- controllers .start ();
88
+ try {
89
+ controllers .shouldStart ();
90
+
91
+ final var version = ConfigurationServiceProvider .instance ().getVersion ();
92
+ log .info (
93
+ "Operator SDK {} (commit: {}) built on {} starting..." ,
94
+ version .getSdkVersion (),
95
+ version .getCommit (),
96
+ version .getBuiltTime ());
97
+
98
+ final var clientVersion = Version .clientVersion ();
99
+ log .info ("Client version: {}" , clientVersion );
100
+
101
+ ExecutorServiceManager .init ();
102
+ controllers .start ();
103
+ } catch (Exception e ) {
104
+ log .error ("Error starting operator" , e );
105
+ System .exit (1 );
106
+ }
102
107
}
103
108
104
109
@ Override
You can’t perform that action at this time.
0 commit comments