File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
src/main/java/oracle/kubernetes/operator/helpers Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -241,14 +241,21 @@ private void verifyK8sVersion() throws ApiException {
241
241
if (major < 1 ) {
242
242
k8sMinVersion = false ;
243
243
} else if (major == 1 ) {
244
+ // The Minor version can be also 8+
245
+ String minor_string = info .getMinor ();
246
+ // It will check if it is a number.
247
+ // If not it will remove the last part of the string in order to have just a number
248
+ while ( ! minor_string .chars ().allMatch ( Character ::isDigit )) {
249
+ minor_string = minor_string .substring (0 , minor_string .length () -1 );
250
+ }
244
251
Integer minor = Integer .parseInt (info .getMinor ());
245
252
if (minor < 7 ) {
246
253
k8sMinVersion = false ;
247
- } else if (minor = = 7 ) {
254
+ } else if (minor > = 7 ) {
248
255
// git version is of the form v1.7.5
249
256
// Check the 3rd part of the version.
250
257
String [] splitVersion = gitVersion .split ("\\ ." );
251
- // issue-36: gitVersion can be not just "v1.7.9" but also values like "v1.7.9+coreos.0"
258
+ // issue-36: gitVersion can be not just "v1.7.9" but also values like "v1.7.9+coreos.0"
252
259
splitVersion = splitVersion [2 ].split ("\\ +" );
253
260
if (Integer .parseInt (splitVersion [0 ]) < 5 ) {
254
261
k8sMinVersion = false ;
You can’t perform that action at this time.
0 commit comments