-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Allows OLM subcommands work for Helm/Ansible new layout #3341
Allows OLM subcommands work for Helm/Ansible new layout #3341
Conversation
879fc04
to
61f2e0c
Compare
61f2e0c
to
0871ee6
Compare
0871ee6
to
251ae3c
Compare
251ae3c
to
2c1fabe
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
2c1fabe
to
d210134
Compare
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.
0db4250
to
7518ca5
Compare
72ab218
to
3e3d881
Compare
3e3d881
to
91bc816
Compare
3ed251c
to
0540cbb
Compare
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.
/lgtm
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.
/lgtm
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.
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 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.
Choose a reason for hiding this comment
The 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 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.
Choose a reason for hiding this comment
The 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/.
0540cbb
to
8359e42
Compare
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