diff --git a/Makefile b/Makefile index c4f524b7..80b8cc35 100644 --- a/Makefile +++ b/Makefile @@ -205,6 +205,19 @@ deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion. $(KUSTOMIZE) build config/default | $(KUBECTL) delete --ignore-not-found=$(ignore-not-found) -f - +##@ Bundle Creation Addition +## Some addition to bundle creation in the bundle + +.PHONY: bundle-update +bundle-update: ## Update containerImage, and createdAt fields in the bundle's CSV + sed -r -i "s|containerImage: .*|containerImage: $(IMG)|;" ./bundle/manifests/$(OPERATOR_NAME).clusterserviceversion.yaml + sed -r -i "s|createdAt: .*|createdAt: `date '+%Y-%m-%d %T'`|;" ./bundle/manifests/$(OPERATOR_NAME).clusterserviceversion.yaml + $(OPERATOR_SDK) bundle validate ./bundle + +.PHONY: bundle-reset-date +bundle-reset-date: ## Reset bundle's createdAt + sed -r -i "s|createdAt: .*|createdAt: \"\"|;" ./bundle/manifests/$(OPERATOR_NAME).clusterserviceversion.yaml + ##@ Build Dependencies ## Location to install dependencies to @@ -259,10 +272,11 @@ bundle: manifests operator-sdk kustomize ## Generate bundle manifests and metada $(OPERATOR_SDK) generate kustomize manifests -q cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG) $(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS) + $(MAKE) bundle-reset-date $(OPERATOR_SDK) bundle validate ./bundle .PHONY: bundle-build -bundle-build: ## Build the bundle image. +bundle-build: bundle-update ## Build the bundle image. docker build -f bundle.Dockerfile -t $(BUNDLE_IMG) . .PHONY: bundle-push diff --git a/bundle/manifests/fence-agents-remediation.clusterserviceversion.yaml b/bundle/manifests/fence-agents-remediation.clusterserviceversion.yaml index e5c5f398..da6a48f6 100644 --- a/bundle/manifests/fence-agents-remediation.clusterserviceversion.yaml +++ b/bundle/manifests/fence-agents-remediation.clusterserviceversion.yaml @@ -43,7 +43,7 @@ metadata: capabilities: Basic Install categories: OpenShift Optional containerImage: "" - createdAt: "2023-01-30T09:57:47Z" + createdAt: "" description: Fence Agents Remediation Operator for remeidating nodes using upstream fence-agents. operators.operatorframework.io/builder: operator-sdk-v1.26.0