From a2e5c9775af73004e8a18c663703391dd46caa5c Mon Sep 17 00:00:00 2001 From: Andrej Petras Date: Fri, 19 Jul 2024 10:07:11 +0200 Subject: [PATCH] fix: sonar issues (#52) --- ...onecx-product-store-mfe-operator-docs.adoc | 11 ++++ ...product-store-mfe-operator-extensions.adoc | 50 ++++++++++++------- .../operator/MicrofrontendControllerTest.java | 4 +- 3 files changed, 44 insertions(+), 21 deletions(-) diff --git a/docs/modules/onecx-product-store-mfe-operator/pages/onecx-product-store-mfe-operator-docs.adoc b/docs/modules/onecx-product-store-mfe-operator/pages/onecx-product-store-mfe-operator-docs.adoc index 02e175d..2ad3347 100644 --- a/docs/modules/onecx-product-store-mfe-operator/pages/onecx-product-store-mfe-operator-docs.adoc +++ b/docs/modules/onecx-product-store-mfe-operator/pages/onecx-product-store-mfe-operator-docs.adoc @@ -9,11 +9,15 @@ include::onecx-product-store-mfe-operator-attributes.adoc[opts=optional] [source,properties,subs=attributes+] ---- %prod.quarkus.rest-client.product_store_client.url=http://onecx-product-store-svc:8080 +%prod.quarkus.rest-client.product_store_client.providers=io.quarkus.oidc.client.reactive.filter.OidcClientRequestReactiveFilter +%prod.quarkus.oidc-client.client-id=${quarkus.application.name} +quarkus.operator-sdk.crd.validate=false quarkus.operator-sdk.helm.enabled=true quarkus.openapi-generator.codegen.input-base-dir=target/tmp/openapi quarkus.openapi-generator.codegen.spec.onecx_product_store_operator_mfe_v1_yaml.config-key=product_store_client quarkus.openapi-generator.codegen.spec.onecx_product_store_operator_mfe_v1_yaml.base-package=gen.org.tkit.onecx.product.store.mfe.v1 quarkus.openapi-generator.codegen.spec.onecx_product_store_operator_mfe_v1_yaml.return-response=true +quarkus.openapi-generator.codegen.spec.onecx_product_store_operator_mfe_v1_yaml.enable-security-generation=false quarkus.kubernetes-client.devservices.override-kubeconfig=true ---- ==== @@ -50,6 +54,13 @@ app: fieldPath: metadata.namespace serviceAccount: enabled: true + operator: + keycloak: + client: + enabled: true + spec: + kcConfig: + defaultClientScopes: [ ocx-ps-mfe:write ] # Values: JOSDK_WATCH_CURRENT, JOSDK_ALL_NAMESPACES or comma separated list of namespaces watchNamespaces: "JOSDK_WATCH_CURRENT" diff --git a/docs/modules/onecx-product-store-mfe-operator/pages/onecx-product-store-mfe-operator-extensions.adoc b/docs/modules/onecx-product-store-mfe-operator/pages/onecx-product-store-mfe-operator-extensions.adoc index 91464a5..ea55e6a 100644 --- a/docs/modules/onecx-product-store-mfe-operator/pages/onecx-product-store-mfe-operator-extensions.adoc +++ b/docs/modules/onecx-product-store-mfe-operator/pages/onecx-product-store-mfe-operator-extensions.adoc @@ -11,93 +11,105 @@ h| Version | tkit-quarkus-log-cdi | https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-log-cdi.html[Link] -| https://github.com/1000kit/tkit-quarkus/blob/2.21.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-cdi.adoc[Link] -| 2.21.0 +| https://github.com/1000kit/tkit-quarkus/blob/2.28.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-cdi.adoc[Link] +| 2.28.0 | tkit-quarkus-log-rs | https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-log-rs.html[Link] -| https://github.com/1000kit/tkit-quarkus/blob/2.21.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-rs.adoc[Link] -| 2.21.0 +| https://github.com/1000kit/tkit-quarkus/blob/2.28.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-rs.adoc[Link] +| 2.28.0 | tkit-quarkus-log-json | https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-log-json.html[Link] -| https://github.com/1000kit/tkit-quarkus/blob/2.21.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-json.adoc[Link] -| 2.21.0 +| https://github.com/1000kit/tkit-quarkus/blob/2.28.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-json.adoc[Link] +| 2.28.0 | quarkus-arc | https://quarkus.io/guides/cdi-reference[Link] | https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-arc.adoc[Link] -| 3.9.3 +| 3.12.2 | quarkus-micrometer-registry-prometheus | https://quarkus.io/guides/telemetry-micrometer[Link] | https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-micrometer-registry-prometheus.adoc[Link] -| 3.9.3 +| 3.12.2 | quarkus-opentelemetry | https://quarkus.io/guides/opentelemetry[Link] | https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-opentelemetry.adoc[Link] -| 3.9.3 +| 3.12.2 | quarkus-openapi-generator | https://docs.quarkiverse.io/quarkus-openapi-generator/dev/index.html[Link] -| https://github.com/quarkiverse/quarkus-openapi-generator/blob/2.4.1/docs/modules/ROOT/pages/includes/quarkus-openapi-generator.adoc[Link] -| 2.4.1 +| https://github.com/quarkiverse/quarkus-openapi-generator/blob/2.4.2/docs/modules/ROOT/pages/includes/quarkus-openapi-generator.adoc[Link] +| 2.4.2 | quarkus-rest-client | https://quarkus.io/guides/rest-client[Link] | https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-rest-client.adoc[Link] -| 3.9.3 +| 3.12.2 | quarkus-rest-client-jackson | https://quarkus.io/guides/rest-client[Link] | -| 3.9.3 +| 3.12.2 + +| tkit-quarkus-security + +| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-security.html[Link] +| https://github.com/1000kit/tkit-quarkus/blob/2.28.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-security.adoc[Link] +| 2.28.0 | onecx-core | https://onecx.github.io/docs/onecx-quarkus/current/onecx-quarkus/onecx-core.html[Link] | -| 0.16.0 +| 0.24.0 + +| quarkus-smallrye-health + +| https://quarkus.io/guides/smallrye-health[Link] +| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-smallrye-health.adoc[Link] +| 3.12.2 | quarkus-container-image-docker | https://quarkus.io/guides/container-image[Link] | https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-container-image-docker.adoc[Link] -| 3.9.3 +| 3.12.2 | quarkus-operator-sdk-bundle-generator | | -| 6.6.7 +| 6.7.1 | quarkus-operator-sdk | | -| 6.6.7 +| 6.7.1 | quarkus-oidc-client | | -| 3.9.3 +| 3.12.2 | quarkus-rest-client-oidc-filter | | -| 3.9.3 +| 3.12.2 |=== \ No newline at end of file diff --git a/src/test/java/org/tkit/onecx/product/store/mfe/operator/MicrofrontendControllerTest.java b/src/test/java/org/tkit/onecx/product/store/mfe/operator/MicrofrontendControllerTest.java index 7cf7fda..7e61ccc 100644 --- a/src/test/java/org/tkit/onecx/product/store/mfe/operator/MicrofrontendControllerTest.java +++ b/src/test/java/org/tkit/onecx/product/store/mfe/operator/MicrofrontendControllerTest.java @@ -28,7 +28,7 @@ @QuarkusTest class MicrofrontendControllerTest extends AbstractTest { - final static Logger log = LoggerFactory.getLogger(MicrofrontendControllerTest.class); + static final Logger log = LoggerFactory.getLogger(MicrofrontendControllerTest.class); @Inject Operator operator; @@ -93,7 +93,7 @@ private static MicrofrontendSpec createSpec(String appId, String productName, St spec.setTagName("tagName"); spec.setRemoteName("remoteName"); spec.setContact("contact"); - spec.setRemoteBaseUrl("rbu"); + spec.setRemoteBaseUrl(basePath); spec.setIconName("icon1"); spec.setDescription("description"); spec.setRemoteEntry("re");