-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating a Catalog of operators #233
Comments
@thomassuedbroecker I briefly poked around this locally and it looks like opm's dockerfile generation functionality was graduated out of alpha sometime in the past couple of minor version releases: $ make bin/opm
...
$ ./bin/opm --help
CLI to interact with operator-registry and build indexes of operator content
Usage:
opm [command]
Available Commands:
completion generate the autocompletion script for the specified shell
generate Generate various artifacts for declarative config indexes
help Help about any command
index generate operator index container images
init Generate an olm.package declarative config blob
migrate Migrate a sqlite-based index image or database file to a file-based catalog
registry interact with operator-registry database
render Generate a declarative config blob from catalogs and bundles
serve serve declarative configs
validate Validate the declarative index config
version Print the opm version
Flags:
-h, --help help for opm
--skip-tls-verify skip TLS certificate verification for container image registries while pulling bundles
--use-http use plain HTTP for container image registries while pulling bundles
Use "opm [command] --help" for more information about a command.
$ ./bin/opm generate --help
Generate various artifacts for declarative config indexes
Usage:
opm generate [command]
Available Commands:
dockerfile Generate a Dockerfile for a declarative config index
Flags:
-h, --help help for generate
Global Flags:
--skip-tls-verify skip TLS certificate verification for container image registries while pulling bundles
--use-http use plain HTTP for container image registries while pulling bundles
Use "opm generate [command] --help" for more information about a command.
$ ./bin/opm generate dockerfile --help
Generate a Dockerfile for a declarative config index.
This command creates a Dockerfile in the same directory as the <dcRootDir>
(named <dcDirName>.Dockerfile) that can be used to build the index. If a
Dockerfile with the same name already exists, this command will fail.
When specifying extra labels, note that if duplicate keys exist, only the last
value of each duplicate key will be added to the generated Dockerfile.
Usage:
opm generate dockerfile <dcRootDir> [flags]
Flags:
-i, --binary-image string Image in which to build catalog. (default "quay.io/operator-framework/opm:latest")
-l, --extra-labels strings Extra labels to include in the generated Dockerfile. Labels should be of the form 'key=value'.
-h, --help help for dockerfile
Global Flags:
--skip-tls-verify skip TLS certificate verification for container image registries while pulling bundles
--use-http use plain HTTP for container image registries while pulling bundles
$ ./bin/opm version
Version: version.Version{OpmVersion:"v1.21.0-1-gb4264e2b", GitCommit:"b4264e2b", BuildDate:"2022-03-22T13:53:39Z", GoOs:"linux", GoArch:"amd64"} |
Hi @timflannagan thanks for your feedback. I used the Operator SDK and it worked. But the documentation inside OLM should also work ;-) Greetings Thomas |
I have just encountered the same error. It is happening only if dockerfile exists in the catalog directory. |
Version
I have the same behavior on both OS.
Situation
I try follow the instruction to create a catalog in the OLM documention
Initialize the catalog (https://olm.operatorframework.io/docs/tasks/creating-a-catalog/#initialize-the-catalog)
This are the steps to reproduce:
Step 1: Execute
opm alpha generate
The creation of the dockerfile doesn't work
Step 2: Execute
opm init
The creation catalog/operator yaml or json works
opm init frontendoperator \ --default-channel=preview \ --description=./frontend-catalog/README.md \ --icon=./frontend-catalog/frontendoperator.svg \ --output yaml > ./frontend-catalog/operator.yaml
Step 3: Execute
opm validate
Doesn't work
Output:
FATA[0000] json: cannot unmarshal string into Go value of type declcfg.tmp
Summary
For me the OPM doesn't work on two OSs, I am not able to follow the written documentation.
The text was updated successfully, but these errors were encountered: