From a33668442212bbf23c2960f546bbf791d1b65c3a Mon Sep 17 00:00:00 2001 From: otoroshi-bot-github-actions Date: Thu, 25 Jul 2024 15:02:02 +0000 Subject: [PATCH] [release 16.18.6] Format code before release --- otoroshi/app/plugins/jobs/kubernetes/client.scala | 4 ++-- otoroshi/app/plugins/jobs/kubernetes/config.scala | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/otoroshi/app/plugins/jobs/kubernetes/client.scala b/otoroshi/app/plugins/jobs/kubernetes/client.scala index e0ee84f36..4cf8eb1a0 100644 --- a/otoroshi/app/plugins/jobs/kubernetes/client.scala +++ b/otoroshi/app/plugins/jobs/kubernetes/client.scala @@ -114,12 +114,12 @@ class KubernetesClient(val config: KubernetesConfig, env: Env) { cert } else { Try(new String(Base64.getDecoder.decode(cert), StandardCharsets.UTF_8)) match { - case Failure(e) => cert + case Failure(e) => cert case Success(decodedCert) => decodedCert } } } - val caCert = Cert.apply("kubernetes-ca-cert", decoded, "").copy(id = "kubernetes-ca-cert") + val caCert = Cert.apply("kubernetes-ca-cert", decoded, "").copy(id = "kubernetes-ca-cert") DynamicSSLEngineProvider.certificates.find { case (k, c) => c.id == "kubernetes-ca-cert" } match { diff --git a/otoroshi/app/plugins/jobs/kubernetes/config.scala b/otoroshi/app/plugins/jobs/kubernetes/config.scala index 2e1b5646a..59429d098 100644 --- a/otoroshi/app/plugins/jobs/kubernetes/config.scala +++ b/otoroshi/app/plugins/jobs/kubernetes/config.scala @@ -203,11 +203,12 @@ object KubernetesConfig { }, caCert = (json \ "clusters").as[JsArray].value.find(v => (v \ "name").as[String] == currentContextCluster).map { - defaultUser => { - val base64Cert = (defaultUser \ "cluster" \ "certificate-authority-data").as[String] - val cert = new String(Base64.getDecoder.decode(base64Cert), StandardCharsets.UTF_8) - cert - } + defaultUser => + { + val base64Cert = (defaultUser \ "cluster" \ "certificate-authority-data").as[String] + val cert = new String(Base64.getDecoder.decode(base64Cert), StandardCharsets.UTF_8) + cert + } }, namespaces = (conf \ "namespaces").asOpt[Seq[String]].filter(_.nonEmpty).getOrElse(Seq("*")), namespacesLabels = (conf \ "namespacesLabels").asOpt[Map[String, String]].getOrElse(Map.empty),