From 0acaca94dce3a6c7cfd78f202ebd51fcf0f7a393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Muzik=C3=A1=C5=99?= Date: Thu, 9 Nov 2023 12:05:21 +0100 Subject: [PATCH] Fix OLM generation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Václav Muzikář --- operator/scripts/create-olm-bundle.sh | 1 - .../operator/controllers/KeycloakSharedCsvMetadata.java | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/operator/scripts/create-olm-bundle.sh b/operator/scripts/create-olm-bundle.sh index f94879402c1d..0fac9c1cb362 100755 --- a/operator/scripts/create-olm-bundle.sh +++ b/operator/scripts/create-olm-bundle.sh @@ -67,7 +67,6 @@ yq ea -i '.spec.apiservicedefinitions = {}' "$CSV_PATH" yq ea -i '.spec.install.spec.deployments[0].spec.selector.matchLabels.name = "keycloak-operator"' "$CSV_PATH" yq ea -i '.spec.install.spec.deployments[0].spec.template.metadata.labels.name = "keycloak-operator"' "$CSV_PATH" -yq ea -i '.spec.install.spec.deployments[0].spec.template.spec.containers[0].env += [{"name": "QUARKUS_OPERATOR_SDK_NAMESPACES", "valueFrom": {"fieldRef": {"fieldPath": "metadata.annotations['"'"'olm.targetNamespaces'"'"']"}}}]' "$CSV_PATH" yq ea -i '.spec.install.spec.deployments[0].spec.template.spec.containers[0].env += [{"name": "POD_NAME", "valueFrom": {"fieldRef": {"fieldPath": "metadata.name"}}}]' "$CSV_PATH" yq ea -i '.spec.install.spec.deployments[0].spec.template.spec.containers[0].env += [{"name": "OPERATOR_NAME", "value": "keycloak-operator"}]' "$CSV_PATH" diff --git a/operator/src/main/java/org/keycloak/operator/controllers/KeycloakSharedCsvMetadata.java b/operator/src/main/java/org/keycloak/operator/controllers/KeycloakSharedCsvMetadata.java index 0465cfc86da7..211e8ee4a4c2 100644 --- a/operator/src/main/java/org/keycloak/operator/controllers/KeycloakSharedCsvMetadata.java +++ b/operator/src/main/java/org/keycloak/operator/controllers/KeycloakSharedCsvMetadata.java @@ -16,8 +16,8 @@ */ package org.keycloak.operator.controllers; -import io.quarkiverse.operatorsdk.bundle.runtime.CSVMetadata; -import io.quarkiverse.operatorsdk.bundle.runtime.SharedCSVMetadata; +import io.quarkiverse.operatorsdk.annotations.CSVMetadata; +import io.quarkiverse.operatorsdk.annotations.SharedCSVMetadata; @CSVMetadata( version = "KCOP_NEXT",