File tree Expand file tree Collapse file tree
systemtest/src/main/java/io/strimzi/test/k8s Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 */
55package io .strimzi .test .k8s ;
66
7+ import io .fabric8 .kubernetes .api .model .ConfigMap ;
78import io .skodjob .kubetest4j .resources .KubeResourceManager ;
89import io .strimzi .test .k8s .cluster .Kind ;
910import io .strimzi .test .k8s .cluster .KubeCluster ;
@@ -99,8 +100,15 @@ public boolean isMinikube() {
99100
100101 public boolean fipsEnabled () {
101102 if (isOpenShift ()) {
102- return KubeResourceManager .get ().kubeClient ().getClient ().configMaps ()
103- .inNamespace ("kube-system" ).withName ("cluster-config-v1" ).get ().getData ().get ("install-config" ).contains ("fips: true" );
103+ ConfigMap configMap = KubeResourceManager .get ().kubeClient ().getClient ().configMaps ()
104+ .inNamespace ("kube-system" ).withName ("cluster-config-v1" ).get ();
105+
106+ if (configMap != null ) {
107+ return configMap .getData ().get ("install-config" ).contains ("fips: true" );
108+ } else {
109+ LOGGER .warn ("No 'cluster-config-v1' ConfigMap found in 'kube-system' Namespace, going to assume it's not FIPS enabled cluster" );
110+ return false ;
111+ }
104112 }
105113 return false ;
106114 }
You can’t perform that action at this time.
0 commit comments