-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat(olm-catalog) : add missing fields with placehoders in the CSV #2095
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
Closed
camilamacedo86
wants to merge
4
commits into
operator-framework:master
from
camilamacedo86:olm-fields
Closed
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ Explanation of all config fields: | |
- `role-paths`: list of strings - Role and ClusterRole manifest file paths. Defaults to `[deploy/role.yaml]`. | ||
- `operator-name`: string - the name used to create the CSV and manifest file names. Defaults to the project's name. | ||
|
||
**Note**: The [design doc][doc-csv-design] has outdated field information which should not be referenced. | ||
**NOTE**: The [design doc][doc-csv-design] has outdated field information which should not be referenced. | ||
|
||
Fields in this config file can be modified to point towards alternate manifest locations, and passed to `gen-csv --csv-config=<path>` to configure CSV generation. For example, if I have one set of production CR/CRD manifests under `deploy/crds/production`, and a set of test manifests under `deploy/crds/test`, and I only want to include production manifests in my CSV, I can set `crd-cr-paths: [deploy/crds/production]`. `gen-csv` will then ignore `deploy/crds/test` when getting CR/CRD data. | ||
|
||
|
@@ -59,20 +59,21 @@ INFO[0000] Required csv fields not filled in file deploy/olm-catalog/app-operato | |
spec.keywords | ||
spec.maintainers | ||
spec.provider | ||
spec.icon | ||
INFO[0000] Created deploy/olm-catalog/app-operator/0.0.1/app-operator.v0.0.1.clusterserviceversion.yaml | ||
``` | ||
|
||
When running `gen-csv` with a version that already exists, the `Required csv fields...` info statement will become a warning, as these fields are useful for displaying your Operator in Operator Hub. | ||
|
||
**Note:** `description`, `displayName`, `resources`, `specDescriptors`, `statusDescriptors`, `actionDescriptors` fields in each `spec.customresourcedefinitions.owned` element will not be filled by the CSV generator. These fields must be added manually. The SDK plans on using [code annotations][code-annotations] to populate these fields in the near future. | ||
**NOTE:** `description`, `displayName`, `resources`, `specDescriptors`, `statusDescriptors`, `actionDescriptors` fields in each `spec.customresourcedefinitions.owned` element will not be filled by the CSV generator. These fields must be added manually. The SDK plans on using [code annotations][code-annotations] to populate these fields in the near future. | ||
|
||
## Updating your CSV | ||
|
||
Let's say you added a new CRD `deploy/crds/group.domain.com_resource_crd.yaml` to your Operator project, and added a port to your Deployment manifest `operator.yaml`. Assuming you're using the same version as above, updating your CSV is as simple as running `operator-sdk olm-catalog gen-csv --csv-version 0.0.1`. `gen-csv` will append your new CRD to `spec.customresourcedefinitions.owned`, replace the old data at `spec.install.spec.deployments` with your updated Deployment, and write an updated CSV to the same location. | ||
|
||
The SDK will not overwrite user-defined fields like `spec.maintainers` or descriptions of CSV elements, with the exception of `specDescriptors[].displayName` and `statusDescriptors[].displayName` in `spec.customresourcedefinitions.owned`, as mentioned [above](#first-generation). | ||
|
||
Including the `--update-crds` flag will update the CRD's in your Operator bundle. | ||
**NOTE:** Including the `--update-crds` flag will update the CRD's in your Operator bundle. | ||
|
||
## Upgrading your CSV | ||
|
||
|
@@ -93,6 +94,7 @@ Required: | |
* `spec.displayName` _(user)_ : a name to display for the Operator in Operator Hub. | ||
* `spec.keywords` _(user)_ : a list of keywords describing the Operator. | ||
* `spec.maintainers` _(user)_ : a list of human or organizational entities maintaining the Operator, with a `name` and `email`. | ||
* `spec.icon` _(user)_ : a Base64 encoded image. E.g `cat image.png | base64` or `base64 -w 0 image.jpg`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we do go forward with this PR, we should be explicit about which image types are supported. But, let's hold off on further changes until @estroz weighs in on my previous question so we don't use CI resources unnecessarily. |
||
* `spec.provider` _(user)_ : the Operator provider, with a `name`; usually an organization. | ||
* `spec.labels` _(user)_ : a list of `key:value` pairs to be used by Operator internals. | ||
* `spec.version`: semantic version of the Operator, ex. `0.1.1`. | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.