Skip to content

Add CLI tool to build Operator Bundle image#1053

Closed
dinhxuanvu wants to merge 4 commits intooperator-framework:masterfrom
dinhxuanvu:bundle-init
Closed

Add CLI tool to build Operator Bundle image#1053
dinhxuanvu wants to merge 4 commits intooperator-framework:masterfrom
dinhxuanvu:bundle-init

Conversation

@dinhxuanvu
Copy link
Copy Markdown
Member

  1. Add top level CLI command operator-cli
  2. Add bundle command to generate annotations.yaml and Dockerfile
  3. Add bundle command to build Bundle image
  • The build command will generate annotations.yaml and Dockerfile
    as well

Signed-off-by: Vu Dinh vdinh@redhat.com

Description of the change:

Motivation for the change:

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Docs updated or added to /docs
  • Commit messages sensible and descriptive

@openshift-ci-robot
Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: dinhxuanvu
To complete the pull request process, please assign jpeeler
You can assign the PR to them by writing /assign @jpeeler in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 1, 2019
@dinhxuanvu dinhxuanvu force-pushed the bundle-init branch 3 times, most recently from 8497b80 to 0c2b583 Compare October 1, 2019 11:19
1. Add top level CLI command `operator-cli`
2. Add bundle command to generate annotations.yaml and Dockerfile
3. Add bundle command to build Bundle image
* The build command will generate annotations.yaml and Dockerfile
as well

Signed-off-by: Vu Dinh <vdinh@redhat.com>
Signed-off-by: Vu Dinh <vdinh@redhat.com>
@openshift-ci-robot openshift-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 1, 2019
Signed-off-by: Vu Dinh <vdinh@redhat.com>
@dinhxuanvu
Copy link
Copy Markdown
Member Author

/retest

Copy link
Copy Markdown
Member

@awgreene awgreene left a comment

Choose a reason for hiding this comment

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

A few nits but it looks good to me.

Comment thread cmd/operator-cli/bundle/generate.go Outdated
Comment thread doc/design/operator-bundle.md Outdated
Comment thread doc/design/operator-bundle.md Outdated
Comment thread doc/design/operator-bundle.md
Comment thread cmd/operator-cli/bundle/utils_test.go Outdated
Comment thread cmd/operator-cli/bundle/generate_test.go Outdated
Comment thread cmd/operator-cli/bundle/generate_test.go Outdated
Comment thread doc/design/operator-bundle.md Outdated
@dinhxuanvu dinhxuanvu force-pushed the bundle-init branch 2 times, most recently from 50ae1d7 to 8fc2032 Compare October 3, 2019 04:02
@dinhxuanvu dinhxuanvu removed the request for review from alecmerdler October 3, 2019 04:07
Signed-off-by: Vu Dinh <vdinh@redhat.com>
@openshift-ci-robot
Copy link
Copy Markdown
Collaborator

@dinhxuanvu: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/prow/e2e-aws-olm 1ad51f4 link /test e2e-aws-olm

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Copy link
Copy Markdown
Member

@ecordell ecordell left a comment

Choose a reason for hiding this comment

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

This is a great start @dinhxuanvu !

As discussed offline, we should move this into opm for now.

This PR scaffolds out Dockerfiles for building, which I think is useful.

But, I also think we can make this simpler for users. I think there should be a set of commands that use containerd or other oci libraries to build the image manifest directly.

Something like

opm bundle push --directory /test/0.0.1/ --tag quay.io/coreos/test-operator.v0.0.1:latest

that would build+push. The nice thing is that there is no dependency on docker or buildah for this. It's easy to build these images without tools like that because the images are well-defined and have no steps that require "running" and modifying the working layer and committing changes.

(this PR looks good, but I'm holding off lgtm until we finalize the enhancement - sorry!)

@dinhxuanvu
Copy link
Copy Markdown
Member Author

This PR is moved and replaced by another PR in operator-registry. Closed.

@dinhxuanvu dinhxuanvu closed this Oct 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants