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

Some OCI Optimizations #1764

Merged
merged 83 commits into from
Jun 14, 2023
Merged

Some OCI Optimizations #1764

merged 83 commits into from
Jun 14, 2023

Conversation

Noxsios
Copy link
Contributor

@Noxsios Noxsios commented Jun 1, 2023

Description

  • zarf deploy oci:// --components=... Given a call to zarf package deploy from an oci:// URL, with a list of --component options, I'd like Zarf to pull only those layers necessary to deploy the selected components.
  • zarf package create . -o oci://... calling this guy inline publising. This is essentially the same thing as doing a zarf package create && zarf package publish, but in the future this could also be smart about images, and only fetch images if their ref from the OCI package is different.
  • re-architect + restructure our OCI library code to actually be usable as a library
  • zarf package remove oci://

Related Issue

Closes #1779
Relates to #1763
Closes #956

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Other (security config, docs update, etc)

Checklist before merging

Signed-off-by: razzle <harry@razzle.cloud>
@Noxsios Noxsios linked an issue Jun 1, 2023 that may be closed by this pull request
@netlify
Copy link

netlify bot commented Jun 1, 2023

Deploy Preview for zarf-docs canceled.

Name Link
🔨 Latest commit 06c5d04
🔍 Latest deploy log https://app.netlify.com/sites/zarf-docs/deploys/64890bf178653200088253ec

@Noxsios Noxsios changed the title OCI layer optimizations zarf deploy oci:// components=... Jun 1, 2023
Signed-off-by: razzle <harry@razzle.cloud>
@Noxsios Noxsios removed a link to an issue Jun 1, 2023
@Noxsios Noxsios marked this pull request as ready for review June 1, 2023 14:33
@Noxsios Noxsios changed the title zarf deploy oci:// components=... zarf deploy oci:// --components=... Jun 1, 2023
src/pkg/packager/common.go Outdated Show resolved Hide resolved
src/pkg/packager/network.go Outdated Show resolved Hide resolved
Noxsios added 10 commits June 2, 2023 23:09
Signed-off-by: razzle <harry@razzle.cloud>
Signed-off-by: razzle <harry@razzle.cloud>
Signed-off-by: razzle <harry@razzle.cloud>
Signed-off-by: razzle <harry@razzle.cloud>
Signed-off-by: razzle <harry@razzle.cloud>
Signed-off-by: razzle <harry@razzle.cloud>
Signed-off-by: razzle <harry@razzle.cloud>
Signed-off-by: razzle <harry@razzle.cloud>
Signed-off-by: razzle <harry@razzle.cloud>
src/pkg/utils/oras.go Outdated Show resolved Hide resolved
src/pkg/utils/oras.go Outdated Show resolved Hide resolved
Noxsios added 6 commits June 12, 2023 02:59
Signed-off-by: razzle <harry@razzle.cloud>
Signed-off-by: razzle <harry@razzle.cloud>
Signed-off-by: razzle <harry@razzle.cloud>
Signed-off-by: razzle <harry@razzle.cloud>
Signed-off-by: razzle <harry@razzle.cloud>
Signed-off-by: razzle <harry@razzle.cloud>
Copy link
Contributor

@Racer159 Racer159 left a comment

Choose a reason for hiding this comment

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

Overall looks good, but did find one issue.

src/pkg/oci/pull.go Outdated Show resolved Hide resolved
src/pkg/oci/pull.go Outdated Show resolved Hide resolved
src/cmd/package.go Show resolved Hide resolved
src/cmd/viper.go Show resolved Hide resolved
src/internal/api/components/list.go Outdated Show resolved Hide resolved
src/pkg/oci/common.go Show resolved Hide resolved
src/pkg/oci/pull.go Outdated Show resolved Hide resolved
src/pkg/oci/pull.go Outdated Show resolved Hide resolved
src/pkg/oci/pull.go Outdated Show resolved Hide resolved
src/pkg/packager/common.go Outdated Show resolved Hide resolved
src/pkg/packager/common.go Outdated Show resolved Hide resolved
src/pkg/utils/checksum.go Outdated Show resolved Hide resolved
Noxsios and others added 12 commits June 12, 2023 22:01
Co-authored-by: Wayne Starr <Racer159@users.noreply.github.com>
Co-authored-by: Wayne Starr <Racer159@users.noreply.github.com>
Co-authored-by: Wayne Starr <Racer159@users.noreply.github.com>
Co-authored-by: Wayne Starr <Racer159@users.noreply.github.com>
Co-authored-by: Wayne Starr <Racer159@users.noreply.github.com>
Signed-off-by: razzle <harry@razzle.cloud>
Signed-off-by: razzle <harry@razzle.cloud>
Signed-off-by: razzle <harry@razzle.cloud>
Signed-off-by: razzle <harry@razzle.cloud>
Signed-off-by: razzle <harry@razzle.cloud>
Copy link
Contributor

@Racer159 Racer159 left a comment

Choose a reason for hiding this comment

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

lint

src/internal/api/components/list.go Show resolved Hide resolved
src/pkg/oci/pull.go Show resolved Hide resolved
Signed-off-by: razzle <harry@razzle.cloud>
Copy link
Contributor

@Racer159 Racer159 left a comment

Choose a reason for hiding this comment

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

lgtm

@Racer159 Racer159 merged commit ee62b29 into main Jun 14, 2023
@Racer159 Racer159 deleted the 1763-oci-layer-optimizations branch June 14, 2023 13:33
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.

Allow Zarf to accept an OCI URL on package removal Better user feedback for tarball writing
3 participants