From a06c6133c3e021fd04891a907992bd610d401eaa Mon Sep 17 00:00:00 2001 From: Eguzki Astiz Lezaun Date: Fri, 1 Sep 2023 17:48:28 +0200 Subject: [PATCH] fix verify-bundle task --- Makefile | 14 +++++++++++++- bundle.Dockerfile | 2 +- .../limitador-operator.clusterserviceversion.yaml | 4 ++-- bundle/metadata/annotations.yaml | 2 +- doc/development.md | 2 +- 5 files changed, 18 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index dfb6442f..c88e83f4 100644 --- a/Makefile +++ b/Makefile @@ -104,7 +104,7 @@ all: build ##@ Tools OPERATOR_SDK = $(PROJECT_PATH)/bin/operator-sdk -OPERATOR_SDK_VERSION = v1.28.0 +OPERATOR_SDK_VERSION = v1.28.1 $(OPERATOR_SDK): ./utils/install-operator-sdk.sh $(OPERATOR_SDK) $(OPERATOR_SDK_VERSION) @@ -278,6 +278,18 @@ bundle: $(OPM) $(YQ) manifests kustomize operator-sdk ## Generate bundle manifes $(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle -q --overwrite --version $(BUNDLE_VERSION) $(BUNDLE_METADATA_OPTS) # Validate bundle manifests $(OPERATOR_SDK) bundle validate ./bundle + $(MAKE) bundle-ignore-createdAt + +.PHONY: bundle-ignore-createdAt +bundle-ignore-createdAt: + # Since operator-sdk 1.26.0, `make bundle` changes the `createdAt` field from the bundle + # even if it is patched: + # https://github.com/operator-framework/operator-sdk/pull/6136 + # This code checks if only the createdAt field. If is the only change, it is ignored. + # Else, it will do nothing. + # https://github.com/operator-framework/operator-sdk/issues/6285#issuecomment-1415350333 + # https://github.com/operator-framework/operator-sdk/issues/6285#issuecomment-1532150678 + git diff --quiet -I'^ createdAt: ' ./bundle && git checkout ./bundle || true .PHONY: bundle-build bundle-build: ## Build the bundle image. diff --git a/bundle.Dockerfile b/bundle.Dockerfile index 4a9fab35..f229f85a 100644 --- a/bundle.Dockerfile +++ b/bundle.Dockerfile @@ -6,7 +6,7 @@ LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ LABEL operators.operatorframework.io.bundle.package.v1=limitador-operator LABEL operators.operatorframework.io.bundle.channels.v1=alpha -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.28.0 +LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.28.1 LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3 diff --git a/bundle/manifests/limitador-operator.clusterserviceversion.yaml b/bundle/manifests/limitador-operator.clusterserviceversion.yaml index 5640e86b..4a347d34 100644 --- a/bundle/manifests/limitador-operator.clusterserviceversion.yaml +++ b/bundle/manifests/limitador-operator.clusterserviceversion.yaml @@ -36,8 +36,8 @@ metadata: capabilities: Basic Install categories: Integration & Delivery containerImage: quay.io/kuadrant/limitador-operator:latest - createdAt: "2023-09-01T15:14:18Z" - operators.operatorframework.io/builder: operator-sdk-v1.28.0 + createdAt: "2023-09-01T15:47:50Z" + operators.operatorframework.io/builder: operator-sdk-v1.28.1 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: https://github.com/Kuadrant/limitador-operator support: kuadrant diff --git a/bundle/metadata/annotations.yaml b/bundle/metadata/annotations.yaml index a45fa546..02b82cc5 100644 --- a/bundle/metadata/annotations.yaml +++ b/bundle/metadata/annotations.yaml @@ -5,7 +5,7 @@ annotations: operators.operatorframework.io.bundle.metadata.v1: metadata/ operators.operatorframework.io.bundle.package.v1: limitador-operator operators.operatorframework.io.bundle.channels.v1: alpha - operators.operatorframework.io.metrics.builder: operator-sdk-v1.28.0 + operators.operatorframework.io.metrics.builder: operator-sdk-v1.28.1 operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3 diff --git a/doc/development.md b/doc/development.md index 8bbeec19..de5e0ed2 100644 --- a/doc/development.md +++ b/doc/development.md @@ -20,7 +20,7 @@ ## Technology stack required for development -* [operator-sdk] version v1.28.0 +* [operator-sdk] version v1.28.1 * [kind] version v0.20.0 * [git][git_tool] * [go] version 1.20+