diff --git a/theodolite/src/main/kotlin/theodolite/execution/operator/ClusterSetup.kt b/theodolite/src/main/kotlin/theodolite/execution/operator/ClusterSetup.kt index 5eb34a759cdee3b269773f9219899d0918be359d..e67be01ea80178b6d6bfb01b32bfd28c111addb9 100644 --- a/theodolite/src/main/kotlin/theodolite/execution/operator/ClusterSetup.kt +++ b/theodolite/src/main/kotlin/theodolite/execution/operator/ClusterSetup.kt @@ -1,5 +1,6 @@ package theodolite.execution.operator +import io.fabric8.kubernetes.client.KubernetesClientException import io.fabric8.kubernetes.client.NamespacedKubernetesClient import io.fabric8.kubernetes.client.dsl.MixedOperation import io.fabric8.kubernetes.client.dsl.Resource @@ -84,8 +85,9 @@ class ClusterSetup( labelValue = "theodolite", context = serviceMonitorContext ) - } catch (e: Exception) { - logger.warn { "Service monitors could not be cleaned up. It may be that service monitors are not registered by the Kubernetes API." } + } catch (e: KubernetesClientException) { + logger.warn { "Service monitors could not be cleaned up. It may be that service monitors are not registered by the Kubernetes API."} + logger.debug { "Error is: ${e.message}" } } } } \ No newline at end of file