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

config: only allow confidential instances on stackit #3463

Merged
merged 2 commits into from
Oct 29, 2024

Conversation

h3adex
Copy link
Contributor

@h3adex h3adex commented Oct 28, 2024

Context

When creating a confidential Kubernetes cluster on Stackit, customers have occasionally confused confidential flavor IDs with non-confidential ones which resulted in a "stuck" creation period.

Proposed Change(s)

I have implemented an instance type check for the Stackit cloud provider to prevent this confusion.

Related Issue

#3438

Additional Info

I have rebuilt the Constellation CLI and confirmed that the change works correctly on a Linux x86 machine.
Using bazel build //cli:cli_oss

Checklist

  • Run the E2E tests that are relevant to this PR's changes

@h3adex h3adex requested a review from derpsteb as a code owner October 28, 2024 16:37
@CLAassistant
Copy link

CLAassistant commented Oct 28, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

netlify bot commented Oct 28, 2024

Deploy Preview for constellation-docs canceled.

Name Link
🔨 Latest commit 51ef1b3
🔍 Latest deploy log https://app.netlify.com/sites/constellation-docs/deploys/6720c62608bb140008a9bff8

@m1ghtym0 m1ghtym0 requested review from msanft and removed request for derpsteb October 29, 2024 10:42
msanft

This comment was marked as outdated.

@msanft msanft requested a review from daniel-weisse October 29, 2024 10:45
Comment on lines 552 to 553
// only allow confidential instances on stackit cloud using QEMU vTPM
if cloud := provider.OpenStack.Cloud; strings.ToLower(cloud) == "stackit" {
Copy link
Contributor

Choose a reason for hiding this comment

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

We need an if provider.OpenStack != nil here, as there's more scenarios where we'll have case variant.QEMUVTPM{}, variant.QEMUTDX{}, such as MiniConstellation, and else we'd run into a nil panic there here when dereferencing provider.OpenStack.

We might also want "success" test case for these variants without the OpenStack / STACKIT case here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added a provider check and two test cases. Although I'm not entirely sure which provider Miniconstellation is using, I made an educated guess: ProviderConfig{QEMU: &QEMUConfig{}} with the variant variant.QEMUTDX{}.

@msanft
Copy link
Contributor

msanft commented Oct 29, 2024

The failing CI is somewhat expected on your branch, as the required tokens aren't available there. I'll verify that these succeed on my machine once we're ready to merge, so don't worry about fixing that for now. :)

Copy link
Contributor

@msanft msanft left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

@msanft
Copy link
Contributor

msanft commented Oct 29, 2024

All tests succeed, merging.

@msanft msanft merged commit 9124691 into edgelesssys:main Oct 29, 2024
4 checks passed
elchead pushed a commit that referenced this pull request Nov 5, 2024
* cli: only allow confidential instances on stackit

* review changes
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.

4 participants