Allows OLM subcommands work for Helm/Ansible new layout#3341
Allows OLM subcommands work for Helm/Ansible new layout#3341camilamacedo86 merged 4 commits intooperator-framework:masterfrom camilamacedo86:fix-olm-for-new
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Hi @estroz, All suggestions applied. Feel free to re-check. Tks for your time in the review. |
|
Changes made to |
| By("adding the 'packagemanifests' rule to the Makefile") | ||
| err = tc.AddPackagemanifestsTarget() | ||
| Expect(err).Should(Succeed()) | ||
|
|
||
| By("generating the operator package manifests") | ||
| err = tc.Make("packagemanifests") | ||
| Expect(err).NotTo(HaveOccurred()) | ||
|
|
||
| By("updating clusterserviceversion with the manager image") | ||
| testutils.ReplaceInFile( | ||
| filepath.Join(tc.Dir, "packagemanifests", operatorVersion, | ||
| fmt.Sprintf("e2e-%s.clusterserviceversion.yaml", tc.TestSuffix)), | ||
| "controller:latest", tc.ImageName) | ||
|
|
||
| By("installing crds to run packagemanifests") | ||
| err = tc.Make("install") | ||
| Expect(err).NotTo(HaveOccurred()) | ||
|
|
||
| By("running the package") | ||
| runPkgManCmd := exec.Command(tc.BinaryName, "run", "packagemanifests", | ||
| "--install-mode", "AllNamespaces", | ||
| "--operator-version", operatorVersion, | ||
| "--timeout", "4m") | ||
| _, err = tc.Run(runPkgManCmd) | ||
| Expect(err).NotTo(HaveOccurred()) |
There was a problem hiding this comment.
Can we separate the generate/run bundle tests from the generate/run packagemanifests tests?
Can be done in a follow-up
| **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) | ||
| ``` |
There was a problem hiding this comment.
Ouch - kind of a bummer that we have to duplicate this entire block because of the single manifests dependency on the packagemanifests target.
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.
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/.
|
New changes are detected. LGTM label has been removed. |
Description of the change:
Motivation
SDK is in a process to be integrated with KB which means that its project layouts will be aligned. More info : Integrating Kubebuilder and Operator SDK.
#3327