From e8b93df3b017ccdb7ee9f2baaa96a10f472294ce Mon Sep 17 00:00:00 2001 From: Rui Fu Date: Wed, 13 Mar 2024 12:32:01 +0800 Subject: [PATCH] fix openshift scripts --- Makefile | 2 +- hack/postprocess-bundle.sh | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 953ca396..6f25aef0 100644 --- a/Makefile +++ b/Makefile @@ -270,7 +270,7 @@ redhat-certificated-bundle: yq kustomize manifests cd config/manager && $(KUSTOMIZE) edit set image controller=$(shell docker inspect --format='{{json .RepoDigests}}' $(OPERATOR_IMG) | jq --arg IMAGE_TAG_BASE "$(IMAGE_TAG_BASE)" -c '.[] | select(index($$IMAGE_TAG_BASE))' -r) $(KUSTOMIZE) build config/manifests | operator-sdk generate bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS) $(YQ) eval -i ".metadata.annotations.\"olm.skipRange\" = \"<$(VERSION)\"" bundle/manifests/function-mesh.clusterserviceversion.yaml - $(YQ) eval -i ".metadata.annotations.\"olm.properties\" = ([{\"type\": \"olm.maxOpenShiftVersion\", \"value\": \"4.13\"}] | @json)" bundle/manifests/function-mesh.clusterserviceversion.yaml + #$(YQ) eval -i ".metadata.annotations.\"olm.properties\" = ([{\"type\": \"olm.maxOpenShiftVersion\", \"value\": \"4.13\"}] | @json)" bundle/manifests/function-mesh.clusterserviceversion.yaml $(YQ) eval -i ".metadata.annotations.createdAt = \"$(BUILD_DATETIME)\"" bundle/manifests/function-mesh.clusterserviceversion.yaml $(YQ) eval -i ".metadata.annotations.containerImage = \"$(shell docker inspect --format='{{json .RepoDigests}}' $(OPERATOR_IMG) | jq --arg IMAGE_TAG_BASE "$(IMAGE_TAG_BASE)" -c '.[] | select(index($$IMAGE_TAG_BASE))' -r)\"" bundle/manifests/function-mesh.clusterserviceversion.yaml $(YQ) eval -i '.annotations += {"operators.operatorframework.io.bundle.channel.default.v1":"alpha"}' bundle/metadata/annotations.yaml diff --git a/hack/postprocess-bundle.sh b/hack/postprocess-bundle.sh index 13858db6..5260a663 100755 --- a/hack/postprocess-bundle.sh +++ b/hack/postprocess-bundle.sh @@ -42,16 +42,16 @@ yq -i '.spec.relatedImages[0].image += env(IMG_DIGEST)' bundle/manifests/functio # Add feature annotations (required) # https://docs.openshift.com/container-platform/4.15/operators/operator_sdk/osdk-generating-csvs.html#osdk-csv-manual-annotations_osdk-generating-csvs -$YQ -i '.metadata.annotations."features.operators.openshift.io/disconnected" = "true"' bundle/manifests/function-mesh.clusterserviceversion.yaml -$YQ -i '.metadata.annotations."features.operators.openshift.io/fips-compliant" = "false"' bundle/manifests/function-mesh.clusterserviceversion.yaml -$YQ -i '.metadata.annotations."features.operators.openshift.io/proxy-aware" = "false"' bundle/manifests/function-mesh.clusterserviceversion.yaml -$YQ -i '.metadata.annotations."features.operators.openshift.io/tls-profiles" = "false"' bundle/manifests/function-mesh.clusterserviceversion.yaml -$YQ -i '.metadata.annotations."features.operators.openshift.io/token-auth-aws" = "false"' bundle/manifests/function-mesh.clusterserviceversion.yaml -$YQ -i '.metadata.annotations."features.operators.openshift.io/token-auth-azure" = "false"' bundle/manifests/function-mesh.clusterserviceversion.yaml -$YQ -i '.metadata.annotations."features.operators.openshift.io/token-auth-gcp" = "false"' bundle/manifests/function-mesh.clusterserviceversion.yaml -$YQ -i '.metadata.annotations."features.operators.openshift.io/cnf" = "false"' bundle/manifests/function-mesh.clusterserviceversion.yaml -$YQ -i '.metadata.annotations."features.operators.openshift.io/cni" = "false"' bundle/manifests/function-mesh.clusterserviceversion.yaml -$YQ -i '.metadata.annotations."features.operators.openshift.io/csi" = "false"' bundle/manifests/function-mesh.clusterserviceversion.yaml +yq -i '.metadata.annotations."features.operators.openshift.io/disconnected" = "true"' bundle/manifests/function-mesh.clusterserviceversion.yaml +yq -i '.metadata.annotations."features.operators.openshift.io/fips-compliant" = "false"' bundle/manifests/function-mesh.clusterserviceversion.yaml +yq -i '.metadata.annotations."features.operators.openshift.io/proxy-aware" = "false"' bundle/manifests/function-mesh.clusterserviceversion.yaml +yq -i '.metadata.annotations."features.operators.openshift.io/tls-profiles" = "false"' bundle/manifests/function-mesh.clusterserviceversion.yaml +yq -i '.metadata.annotations."features.operators.openshift.io/token-auth-aws" = "false"' bundle/manifests/function-mesh.clusterserviceversion.yaml +yq -i '.metadata.annotations."features.operators.openshift.io/token-auth-azure" = "false"' bundle/manifests/function-mesh.clusterserviceversion.yaml +yq -i '.metadata.annotations."features.operators.openshift.io/token-auth-gcp" = "false"' bundle/manifests/function-mesh.clusterserviceversion.yaml +yq -i '.metadata.annotations."features.operators.openshift.io/cnf" = "false"' bundle/manifests/function-mesh.clusterserviceversion.yaml +yq -i '.metadata.annotations."features.operators.openshift.io/cni" = "false"' bundle/manifests/function-mesh.clusterserviceversion.yaml +yq -i '.metadata.annotations."features.operators.openshift.io/csi" = "false"' bundle/manifests/function-mesh.clusterserviceversion.yaml # Add properties.yaml to metadata cat < bundle/metadata/properties.yaml