Skip to content
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

Add Secret/ConfigMap as optional bundle objects #25125

Merged
merged 1 commit into from
Sep 1, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 30 additions & 7 deletions modules/olm-bundle-format.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Module included in the following assemblies:
//
// * operators/understanding_olm/olm-packaging-format.adoc
// * operators/operator_sdk/osdk-managing-bundle-images.adoc

[id="olm-bundle-format_{context}"]
= Bundle Format
adellape marked this conversation as resolved.
Show resolved Hide resolved
Expand Down Expand Up @@ -38,9 +37,8 @@ requirements are validated:
Bundle manifests refer to a set of Kubernetes manifests that define the
deployment and RBAC model of the Operator.

A bundle includes one ClusterServiceVersion (CSV) per directory
and typically the CRDs that define the owned APIs of the CSV in its `manifest/`
directory, though additional objects may be included:
A bundle includes one ClusterServiceVersion (CSV) per directory and typically
the CRDs that define the owned APIs of the CSV in its `/manifests` directory.

.Example Bundle Format layout
adellape marked this conversation as resolved.
Show resolved Hide resolved
[source,terminal]
Expand All @@ -49,17 +47,42 @@ etcd
├── manifests
│ ├── etcdcluster.crd.yaml
│ └── etcdoperator.clusterserviceversion.yaml
│ └── secret.yaml
│ └── configmap.yaml
└── metadata
└── annotations.yaml
└── dependencies.yaml
----

[discrete]
[id="olm-bundle-format-manifests-optional_{context}"]
=== Optional objects

The following objects can also be optionally included in the `/manifests`
directory of a bundle:

.Supported optional objects
* Secrets
* ConfigMaps

When these optional objects are included in a bundle, Operator Lifecycle Manager
(OLM) can create them from the bundle and manage their lifecycle along with the
CSV:

.Lifecycle for optional objects
* When the CSV is deleted, OLM deletes the optional object.
* When the CSV is upgraded:
** If the name of the optional object is the same, OLM updates it in place.
** If the name of the optional object has changed between versions, OLM deletes and
recreates it.

[id="olm-bundle-format-annotations_{context}"]
== Annotations

A bundle also includes an `annotations.yaml` file in its `metadata/` folder. This file
defines higher level aggregate data that helps describe the format and package
information about how the bundle should be added into an index of bundles:
A bundle also includes an `annotations.yaml` file in its `/metadata` directory.
Copy link
Contributor Author

@adellape adellape Aug 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to /metadata to match the updated /manifests style.

This file defines higher level aggregate data that helps describe the format and
package information about how the bundle should be added into an index of
bundles:

.Example `annotations.yaml`
[source,yaml]
Expand Down