operator-registry icon indicating copy to clipboard operation
operator-registry copied to clipboard

can't RUN: opm serve /configs --cache-dir=/tmp/cache --cache-only

Open HuangQAQ opened this issue 1 year ago • 0 comments

when I run the command in dockerfile:

STEP 5/6: RUN ["/bin/opm", "serve", "/configs", "--cache-dir=/tmp/cache", "--cache-only"] time="2024-01-18T09:23:31Z" level=warning msg="unable to set termination log path" error="open /dev/termination-log: permission denied" time="2024-01-18T09:23:31Z" level=info msg="starting pprof endpoint" address="localhost:6060" time="2024-01-18T09:23:31Z" level=fatal msg="unknown package "percona-xtradb-cluster-operator" for bundle "percona-xtradb-cluster-operator.v1.13.0"" Error: building at STEP "RUN /bin/opm serve /configs --cache-dir=/tmp/cache --cache-only": while running runtime: exit status 1

what is the meaning about the "unknown package"?

when I use opm index --bundles to build a catalog, it run correctly. But it is a sqlite database

I want to use the file catalog, I have some bundles, how can I make a file base catalog index?

my dockerfile:

  FROM registry.redhat.io/openshift4/ose-operator-registry:v4.13
  
  ENTRYPOINT ["/bin/opm"]
  CMD ["serve", "/configs", "--cache-dir=/tmp/cache"]
  
  ADD operators /configs
  RUN ["/bin/opm", "serve", "/configs", "--cache-dir=/tmp/cache", "--cache-only"]
  
  LABEL operators.operatorframework.io.index.configs.v1=/configs

when I run : opm validate operators: FATA[0000] unknown package "percona-xtradb-cluster-operator" for bundle "percona-xtradb-cluster-operator.v1.13.0"

so what is the correct directory structure in operators?

HuangQAQ avatar Jan 18 '24 10:01 HuangQAQ