Skip to content
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

feat: Add support for scratch-based container images #9

Merged

Conversation

timflannagan
Copy link
Collaborator

Signed-off-by: timflannagan [email protected]

@timflannagan
Copy link
Collaborator Author

Local output because i didn't see any tests:

$ ./target/release/dcp quay.io/tflannag/bundles:resolveset-v0.0.2 -p manifests
PullStatus { status: "Pulling from tflannag/bundles", id: Some("resolveset-v0.0.2"), progress: None, progress_detail: None }
PullStatus { status: "Digest: sha256:145ccb5e7e73d4ae914160c066e49f35bc2be2bb86e4ab0002a802aa436599bf", id: None, progress: None, progress_detail: None }
PullStatus { status: "Status: Image is up to date for quay.io/tflannag/bundles:resolveset-v0.0.2", id: None, progress: None, progress_detail: None }
cmd: [""]
"1fa75f27a1374f5891558e0f76fa2d0e8ccce18c088d86fa040f819d057a7eea"

$ cat manifests/bi.yaml 
---

apiVersion: core.rukpak.io/v1alpha1
kind: BundleInstance
metadata:
  name: olm-v0.20.0-api
spec:
  provisionerClassName: core.rukpak.io/plain
  template:
    spec:
      provisionerClassName: core.rukpak.io/plain
      source:
        type: image
        image:
          ref: quay.io/tflannag/olm-plain-bundle:olm-api-v0.20.0
---

apiVersion: core.rukpak.io/v1alpha1
kind: BundleInstance
metadata:
  name: olm-v0.20.0-crds
spec:
  provisionerClassName: core.rukpak.io/plain
  template:
    spec:
      provisionerClassName: core.rukpak.io/plain
      source:
        type: image
        image:
          ref: quay.io/tflannag/olm-plain-bundle:olm-crds-v0.20.0

And the behavior before these fixes:

$ ./dcp quay.io/tflannag/bundles:resolveset-v0.0.2 -p manifests
PullStatus { status: "Pulling from tflannag/bundles", id: Some("resolveset-v0.0.2"), progress: None, progress_detail: None }
PullStatus { status: "Digest: sha256:145ccb5e7e73d4ae914160c066e49f35bc2be2bb86e4ab0002a802aa436599bf", id: None, progress: None, progress_detail: None }
PullStatus { status: "Status: Image is up to date for quay.io/tflannag/bundles:resolveset-v0.0.2", id: None, progress: None, progress_detail: None }
Error: Error(Fault { code: 400, message: "No command specified" })

@timflannagan
Copy link
Collaborator Author

Alternatively: we allow users to specify a command through a CLI flag but I'm not sure why we'd need to do that.

@exdx
Copy link
Owner

exdx commented Jul 14, 2022

Alternatively: we allow users to specify a command through a CLI flag but I'm not sure why we'd need to do that.

Yes, I think for the narrow use-case dcp is trying to fulfill, we can always use a dummy command.

@timflannagan timflannagan merged commit c104155 into exdx:main Jul 14, 2022
@timflannagan timflannagan deleted the feat/support-scratch-base-images branch July 14, 2022 20:15
Copy link
Collaborator

@tylerslaton tylerslaton left a comment

Choose a reason for hiding this comment

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

This looks good to me but I'm an advocate for adding a test case for this so that we don't regress moving forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants