-
Notifications
You must be signed in to change notification settings - Fork 18
kata.runtime-rs: init #1909
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
Open
katexochen
wants to merge
11
commits into
main
Choose a base branch
from
p/runtime-rs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
kata.runtime-rs: init #1909
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
88672fe
kata.runtime-rs: init
katexochen 299579f
sets/runtime-rs: init
katexochen 294834d
node-installer: config for runtime-rs
katexochen 133f07f
node-installer/kataconfig: lower-case keys
katexochen f8dbfde
runtime-rs: port image and initrd patch
katexochen 0723353
node-installer: use runtime-rs configs as base for runtime-rs
katexochen 53a0532
runtime-rs: add SNP ID block form pod annotation
katexochen 12c6a77
runtime-rs: deny unknown fields
katexochen 9654896
runtime-rs: force virtio-blk with serial name for initdata
katexochen 2f1372a
node-installer: migrate kata config fields
katexochen d8a36d5
e2e/runtime-rs-tmp: init
katexochen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,6 +28,7 @@ on: | |
| - policy | ||
| - proxy | ||
| - regression | ||
| - runtime-rs-tmp | ||
| - servicemesh | ||
| - vault | ||
| - volumestatefulset | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,6 +67,7 @@ jobs: | |
| - policy | ||
| - proxy | ||
| - regression | ||
| - runtime-rs-tmp | ||
| - servicemesh | ||
| - vault | ||
| - volumestatefulset | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| name: e2e test runtime-rs | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - overlays/sets/runtime-rs.nix | ||
| - packages/by-name/kata/runtime/** | ||
| - packages/by-name/kata/runtime-rs/** | ||
| - e2e/runtime-rs-tmp/** | ||
|
|
||
| jobs: | ||
| tests: | ||
| strategy: | ||
| matrix: | ||
| platform: | ||
| - name: Metal-QEMU-SNP | ||
| runner: SNP | ||
| self-hosted: true | ||
| - name: Metal-QEMU-TDX | ||
| runner: TDX | ||
| self-hosted: true | ||
| - name: Metal-QEMU-SNP-GPU | ||
| runner: SNP-GPU | ||
| self-hosted: true | ||
| - name: Metal-QEMU-TDX-GPU | ||
| runner: TDX-GPU | ||
| self-hosted: true | ||
| test-name: | ||
| - runtime-rs-tmp | ||
| fail-fast: false | ||
| name: "${{ matrix.platform.name }}" | ||
| uses: ./.github/workflows/e2e.yml | ||
| with: | ||
| skip-undeploy: false | ||
| test-name: ${{ matrix.test-name }} | ||
| platform: ${{ matrix.platform.name }} | ||
| runner: ${{ matrix.platform.runner }} | ||
| self-hosted: ${{ matrix.platform.self-hosted }} | ||
| debug-shell: true | ||
| secrets: | ||
| GITHUB_TOKEN_IN: ${{ secrets.GITHUB_TOKEN }} | ||
| CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} | ||
| NUNKI_CI_COMMIT_PUSH_PR: ${{ secrets.NUNKI_CI_COMMIT_PUSH_PR }} | ||
| TEAMS_CI_WEBHOOK: ${{ secrets.TEAMS_CI_WEBHOOK }} | ||
| CONTRAST_GHCR_READ: ${{ secrets.CONTRAST_GHCR_READ }} | ||
| permissions: | ||
| contents: read | ||
| packages: write | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| // Copyright 2026 Edgeless Systems GmbH | ||
| // SPDX-License-Identifier: BUSL-1.1 | ||
|
|
||
| package runtimerstmp | ||
|
|
||
| import ( | ||
| "context" | ||
| "flag" | ||
| "os" | ||
| "testing" | ||
| "time" | ||
|
|
||
| "github.com/edgelesssys/contrast/e2e/internal/contrasttest" | ||
| "github.com/edgelesssys/contrast/internal/kuberesource" | ||
| "github.com/edgelesssys/contrast/internal/manifest" | ||
| "github.com/edgelesssys/contrast/internal/platforms" | ||
| "github.com/stretchr/testify/require" | ||
| ) | ||
|
|
||
| // TODO: remove when runtime-rs is fully integrated. | ||
| // Right now there are some failures left, so we only test that we can start up a container. | ||
| // Remove the test and use openssl and other tests when ready. | ||
|
|
||
| func TestRuntimeRS(t *testing.T) { | ||
| platform, err := platforms.FromString(contrasttest.Flags.PlatformStr) | ||
| require.NoError(t, err) | ||
|
|
||
| ct := contrasttest.New(t) | ||
|
|
||
| require.True(t, contrasttest.Flags.InsecureEnableDebugShell, "the --insecure-enable-debug-shell-access flag must be set to true to extract the initrd start address") | ||
|
|
||
| runtimeHandler, err := manifest.RuntimeHandler(platform) | ||
| require.NoError(t, err) | ||
| resources := kuberesource.CoordinatorBundle() | ||
| resources = kuberesource.PatchRuntimeHandlers(resources, runtimeHandler) | ||
| resources = kuberesource.AddPortForwarders(resources) | ||
| ct.Init(t, resources) | ||
|
|
||
| require.True(t, t.Run("generate", ct.Generate), "contrast generate needs to succeed for subsequent tests") | ||
| require.True(t, t.Run("apply", ct.Apply), "Kubernetes resources need to be applied for subsequent tests") | ||
|
|
||
| // 'set' currently errors because of wrong measurements, but the debugshell init container should come up. | ||
| require.True(t, t.Run("wait for debugshell", func(t *testing.T) { | ||
| ctx, cancel := context.WithTimeout(t.Context(), ct.FactorPlatformTimeout(2*time.Minute)) | ||
| defer cancel() | ||
| require.NoError(t, ct.Kubeclient.WaitForContainer(ctx, ct.Namespace, "coordinator-0", "contrast-debug-shell")) | ||
| }), "debugshell start must succeed for subsequent tests") | ||
| } | ||
|
|
||
| func TestMain(m *testing.M) { | ||
| contrasttest.RegisterFlags() | ||
| flag.Parse() | ||
| os.Exit(m.Run()) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we need to change the
SET?contrast/.github/workflows/e2e.yml
Lines 54 to 59 in be62ea5