File tree Expand file tree Collapse file tree 1 file changed +2
-17
lines changed
operator-framework-core/src/main/java/io/javaoperatorsdk/operator Expand file tree Collapse file tree 1 file changed +2
-17
lines changed Original file line number Diff line number Diff line change 11package io .javaoperatorsdk .operator ;
22
3- import java .net .ConnectException ;
43import java .util .ArrayList ;
54import java .util .HashMap ;
65import java .util .List ;
@@ -76,22 +75,8 @@ public void start() {
7675 version .getCommit (),
7776 version .getBuiltTime ());
7877
79- log .info ("Client version: {}" , Version .clientVersion ());
80- try {
81- final var k8sVersion = kubernetesClient .getKubernetesVersion ();
82- if (k8sVersion != null ) {
83- log .info ("Server version: {}.{}" , k8sVersion .getMajor (), k8sVersion .getMinor ());
84- }
85- } catch (Exception e ) {
86- final String error ;
87- if (e .getCause () instanceof ConnectException ) {
88- error = "Cannot connect to cluster" ;
89- } else {
90- error = "Error retrieving the server version" ;
91- }
92- log .error (error , e );
93- throw new OperatorException (error , e );
94- }
78+ final var clientVersion = Version .clientVersion ();
79+ log .info ("Client version: {}" , clientVersion );
9580
9681 ExecutorServiceManager .init (configurationService );
9782 controllers .start ();
You can’t perform that action at this time.
0 commit comments