operator-sdk: run bundle - ConfigMap is invalid: []: Too long: must have at most 1048576 bytes

Bug Report

What did you do?

I run

operator-sdk run bundle quay.io/webcenter/elasticsearch-operator-bundle:v0.0.1 -n default

What did you expect to see?

It deploy operator at the end

What did you see instead? Under which circumstances?

Failed to run bundle: create catalog: error creating registry pod: error building registry pod definition: configMap error: error updating ConfigMap: error creating ConfigMap: ConfigMap "elasticsearch-operator-catalog-configmap-partition-2" is invalid: []: Too long: must have at most 1048576 bytes 

Environment

Operator type:

language go

Kubernetes cluster type:

Rancher 2.6.8

$ operator-sdk version

operator-sdk version: “v1.26.1”, commit: “4582a8414e65f40ebea65c74729f121e1f3e3b9a”, kubernetes version: “1.25.0”, go version: “go1.19.5”, GOOS: “linux”, GOARCH: “amd64”

$ go version (if language is Go)

go version go1.19.6 linux/amd64

$ kubectl version

Client Version: version.Info{Major:“1”, Minor:“19”, GitVersion:“v1.19.0”, GitCommit:“2b525e8d2647a41e686bc7da5b7430667a13953e”, GitTreeState:“clean”, BuildDate:“2021-08-20T21:43:10Z”, GoVersion:“go1.15.14”, Compiler:“gc”, Platform:“linux/amd64”} Server Version: version.Info{Major:“1”, Minor:“23”, GitVersion:“v1.23.14”, GitCommit:“3321ffc07d2f046afdf613796f9032f4460de093”, GitTreeState:“clean”, BuildDate:“2022-11-09T13:32:47Z”, GoVersion:“go1.17.13”, Compiler:“gc”, Platform:“linux/amd64”}

Possible Solution

Additional context

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 20 (13 by maintainers)

Most upvoted comments

@everettraven is correct, there is no flag and the default behavior is to use gzip. I tried to install this operator and everything was successful.

operator-sdk run bundle quay.io/webcenter/elasticsearch-operator-bundle:v0.0.1 -n default
oc get csv
NAME                            DISPLAY                  VERSION   REPLACES   PHASE
elasticsearch-operator.v0.0.1   elasticsearch-operator   0.0.1                Succeeded

Thanks for the clarification @everettraven

After removing the flag, the operator got installed without any errors with latest version of operator-sdk.

Hi. As far as I understand, using operator-sdk to install and run operators in openshift is mostly for development and testing. The main road, as far as I know, is to build an image index from the bundle image(s) and the use CatalogSource and subscription to install.