You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clean up minor issues with command-line code and documentation
1. Clarify a few helper texts in cli code
2. Improve librar document to specific input information
3. Move `bundle` comands under hidden `alpha` command
Signed-off-by: Vu Dinh <[email protected]>
log.Fatalf("Failed to mark `channels` flag for `build` subcommand as required")
62
+
}
63
+
49
64
bundleBuildCmd.Flags().StringVarP(&imageBuilderArgs, "image-builder", "b", "docker", "Tool to build container images. One of: [docker, podman, buildah]")
50
65
66
+
bundleBuildCmd.Flags().StringVarP(&channelDefaultArgs, "default", "e", "", "The default channel for the bundle image")
67
+
68
+
bundleBuildCmd.Flags().BoolVarP(&overwriteArgs, "overwrite", "o", false, "To overwrite annotations.yaml locally if existed. By default, overwrite is set to `false`.")
Copy file name to clipboardexpand all lines: docs/design/operator-bundle.md
+29-14
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
overwrite# Operator Bundle
1
+
# Operator Bundle
2
2
3
3
An `Operator Bundle` is a container image that stores Kubernetes manifests and metadata associated with an operator. A bundle is meant to present a *specific* version of an operator.
4
4
@@ -18,19 +18,27 @@ An `Operator Bundle` is built as a scratch (non-runnable) container image that c
18
18
### Bundle Annotations
19
19
20
20
We use the following labels to annotate the operator bundle image.
21
-
* The label `operators.operatorframework.io.bundle.resources` represents the bundle type:
22
-
* The value `manifests` implies that this bundle contains operator manifests only.
23
-
* The value `metadata` implies that this bundle has operator metadata only.
24
-
* The value `manifests+metadata` implies that this bundle contains both operator metadata and manifests.
25
-
* The label `operators.operatorframework.io.bundle.mediatype` reflects the media type or format of the operator bundle. It could be helm charts, plain Kubernetes manifests etc.
21
+
* The label `operators.operatorframework.io.bundle.mediatype.v1` reflects the media type or format of the operator bundle. It could be helm charts, plain Kubernetes manifests etc.
22
+
* The label `operators.operatorframework.io.bundle.manifests.v1 `reflects the path in the image to the directory that contains the operator manifests.
23
+
* The label `operators.operatorframework.io.bundle.metadata.v1` reflects the path in the image to the directory that contains metadata files about the bundle.
24
+
* The `manifests.v1` and `metadata.v1` labels imply the bundle type:
25
+
* The value `manifests.v1` implies that this bundle contains operator manifests.
26
+
* The value `metadata.v1` implies that this bundle has operator metadata.
27
+
* The label `operators.operatorframework.io.bundle.package.v1` reflects the package name of the bundle.
28
+
* The label `operators.operatorframework.io.bundle.channels.v1` reflects the list of channels the bundle is subscribing to when added into an operator registry
29
+
* The label `operators.operatorframework.io.bundle.channel.default.v1` reflects the default channel an operator should be subscribed to when installed from a registry
26
30
27
31
The labels will also be put inside a YAML file, as shown below.
The `--directory` or `-d` specifies the directory where the operator manifests are located. The `Dockerfile` is generated in the same directory where the YAML manifests are located while the `annotations.yaml` file is located in a folder named `metadata`. For example:
The `--directory` or `-d` specifies the directory where the operator manifests are located. The `--tag` or `-t` specifies the image tag that you want the operator bundle image to have. By using `build` command, the `annotations.yaml` and `Dockerfile` are automatically generated in the background.
173
187
174
188
The default image builder is `Docker`. However, ` Buildah` and `Podman` are also supported. An image builder can specified via `--image-builder` or `-b` optional tag in`build` command. For example:
The `--package` or `-p` is the name of package fo the operator such as `etcd` which which map `channels` to a particular application definition. `channels` allow package authors to write different upgrade paths fordifferent users (e.g. `beta` vs. `stable`). The `channels` list is provided via `--channels` or `-c` flag. Multiple `channels` are separated by a comma (`,`). The default channel is provided optionally via `--default` or `-e` flag. If the default channel is not provided, the first channelin channel list is selected as default.
0 commit comments