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

cli: support for GCP marketplace images #2792

Merged
merged 9 commits into from
Jan 8, 2024
Merged

Conversation

msanft
Copy link
Contributor

@msanft msanft commented Jan 3, 2024

Context

Recently, our initial GCP marketplace image (v2.14.0) got approved, which enables us to test the use of GCP marketplace images in Constellation. In consultation of @malt3, we opted for a low-complexity, "dumb" implementation which assumes that all stable images are also uploaded to the public GCP project hosting the marketplace images (which needs to be automated in a subsequent PR), and then just replaces the GCP project name in the image reference if the use of marketplace images is enabled in the config's GCP section. This is sufficient to be billed through the marketplace on GCP.

Proposed change(s)

  • Add a configuration option to use GCP marketplace images. (.provider.gcp.useMarketplaceImage)
  • If that configuration option is set when an image is fetched, replace the constellation-images project in the image reference with mpi-edgeless-systems-public, which is the public GCP project that hosts the marketplace images.

Additional info

Checklist

  • Update docs
  • Add labels (e.g., for changelog category)
  • Is PR title adequate for changelog?
  • Link to Milestone

@msanft msanft added the feature This introduces new functionality label Jan 3, 2024
@msanft msanft added this to the v2.15.0 milestone Jan 3, 2024
@msanft msanft requested a review from derpsteb as a code owner January 3, 2024 15:19
@msanft msanft removed the request for review from derpsteb January 3, 2024 15:20
Copy link

netlify bot commented Jan 3, 2024

Deploy Preview for constellation-docs ready!

Name Link
🔨 Latest commit 6d9fc9d
🔍 Latest deploy log https://app.netlify.com/sites/constellation-docs/deploys/659bfe405d12990008f22819
😎 Deploy Preview https://deploy-preview-2792--constellation-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@malt3 malt3 left a comment

Choose a reason for hiding this comment

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

Mostly looked over the logic for selecting images.

Copy link
Member

@daniel-weisse daniel-weisse left a comment

Choose a reason for hiding this comment

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

Code changes look good to me
Can you run the e2e test with marketplace image for this branch?

@msanft msanft requested a review from elchead as a code owner January 8, 2024 09:34
@msanft
Copy link
Contributor Author

msanft commented Jan 8, 2024

Code changes look good to me Can you run the e2e test with marketplace image for this branch?

E2E Run

@elchead
Copy link
Contributor

elchead commented Jan 8, 2024

can you link a test run?

@msanft msanft requested a review from thomasten January 8, 2024 12:15
@msanft msanft requested a review from thomasten January 8, 2024 13:02
Copy link
Contributor

github-actions bot commented Jan 8, 2024

Coverage report

Package Old New Trend
internal/config 79.30% 79.40% ↗️
internal/imagefetcher 78.80% 74.50% ↘️
terraform-provider-constellation/internal/provider 7.00% 7.00% 🚧

@msanft msanft merged commit e691e26 into main Jan 8, 2024
10 checks passed
@msanft msanft deleted the feat/gcp-marketplace-images branch January 8, 2024 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This introduces new functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants