-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Allows OLM subcommands work for Helm/Ansible new layout #3341
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -123,6 +123,29 @@ package manifest YAML file containing channel-to-version mappings, much like a b | |
If your Operator is already formatted as a package manifests and you do not wish to migrate to the bundle format yet, | ||
you should add the following to your `Makefile` to make development easier: | ||
|
||
**For Go-based Operator projects** | ||
|
||
```make | ||
# Options for "packagemanifests". | ||
ifneq ($(origin FROM_VERSION), undefined) | ||
PKG_FROM_VERSION := --from-version=$(FROM_VERSION) | ||
endif | ||
ifneq ($(origin CHANNEL), undefined) | ||
PKG_CHANNELS := --channel=$(CHANNEL) | ||
endif | ||
ifeq ($(IS_CHANNEL_DEFAULT), 1) | ||
PKG_IS_DEFAULT_CHANNEL := --default-channel | ||
endif | ||
PKG_MAN_OPTS ?= $(FROM_VERSION) $(PKG_CHANNELS) $(PKG_IS_DEFAULT_CHANNEL) | ||
|
||
# Generate package manifests. | ||
packagemanifests: kustomize manifests | ||
operator-sdk generate kustomize manifests -q | ||
$(KUSTOMIZE) build config/manifests | operator-sdk generate packagemanifests -q --version $(VERSION) $(PKG_MAN_OPTS) | ||
``` | ||
Comment on lines
+126
to
+145
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. Ouch - kind of a bummer that we have to duplicate this entire block because of the single This is one of those things that makes organization on our docs site extremely difficult when dealing with three operator types. I'm almost to the point where I could be convinced to duplicate this (or some portion of this) doc (and other docs with similar issues) for each operator type. This is okay for now, but definitely something we could think about improving later. 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. I agree that we need to clean up the docs .. keeping it mind for follow-ups. My suggestion here was added just a note for Ansible/Helm since we need just remove the manifests. However, @estroz thought that would be easier understand by duplicating which is true as well/. |
||
|
||
**For Helm/Ansible-based Operator projects** | ||
|
||
```make | ||
# Options for "packagemanifests". | ||
ifneq ($(origin FROM_VERSION), undefined) | ||
|
@@ -137,9 +160,9 @@ endif | |
PKG_MAN_OPTS ?= $(FROM_VERSION) $(PKG_CHANNELS) $(PKG_IS_DEFAULT_CHANNEL) | ||
|
||
# Generate package manifests. | ||
packagemanifests: manifests | ||
packagemanifests: kustomize | ||
operator-sdk generate kustomize manifests -q | ||
kustomize build config/manifests | operator-sdk generate packagemanifests -q --version $(VERSION) $(PKG_MAN_OPTS) | ||
$(KUSTOMIZE) build config/manifests | operator-sdk generate packagemanifests -q --version $(VERSION) $(PKG_MAN_OPTS) | ||
``` | ||
|
||
By default `make packagemanifests` will generate a CSV, a package manifest file, and copy CRDs in the package manifests format: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we separate the
generate/run bundle
tests from thegenerate/run packagemanifests
tests?Can be done in a follow-up