Skip to content

secure container e2e case & guide doc#249

Open
fengcone wants to merge 5 commits intoalibaba:mainfrom
fengcone:feature/public-secure-container
Open

secure container e2e case & guide doc#249
fengcone wants to merge 5 commits intoalibaba:mainfrom
fengcone:feature/public-secure-container

Conversation

@fengcone
Copy link
Collaborator

Summary

  • What is changing and why?

Testing

  • Not run (explain why)
  • Unit tests
  • Integration tests
  • e2e / manual verification

Breaking Changes

  • None
  • Yes (describe impact and migration path)

Checklist

  • Linked Issue or clearly described motivation
  • Added/updated docs (if needed)
  • Added/updated tests (if needed)
  • Security impact considered
  • Backward compatibility considered

@fengcone
Copy link
Collaborator Author

fengcone commented Feb 26, 2026

see issue #174

Copy link
Collaborator

Choose a reason for hiding this comment

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

Binary files cannot be properly diffed or reviewed, may be remove binaries and add download script in Makefile is a better choice

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

// runKubectl executes a kubectl command from the project root directory
func runKubectl(args ...string) (string, error) {
cmd := exec.Command("kubectl", args...)
cmd.Dir = "../../.." // 从 test/e2e_runtime/gvisor 回到项目根目录
Copy link
Collaborator

Choose a reason for hiding this comment

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

Keep the english comment style.
Navigate from test/e2e_runtime/gvisor to project root

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

makeArgs = append(makeArgs, fmt.Sprintf("DOCKER_BUILD_ARGS=%s", dockerBuildArgs))
}
cmd := exec.Command("make", makeArgs...)
cmd.Dir = "../../.." // 从 test/e2e_runtime/gvisor 回到项目根目录
Copy link
Collaborator

Choose a reason for hiding this comment

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

Comment is in Chinese issue.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

Copy link
Collaborator

Choose a reason for hiding this comment

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

Unused Template File?
And same issue about /pool-runtimeclass.yaml?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed


// RenderTemplate renders a YAML template file with given data
// templateFile is relative to e2e_runtime/ directory (e.g. "gvisor/testdata/pool.yaml")
func RenderTemplate(templateFile string, data map[string]interface{}) (string, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

RenderTemplate function is defined but never used?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Indeed, I deleted it

@jwx0925
Copy link
Collaborator

jwx0925 commented Feb 27, 2026

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ddbf36c86f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


By("loading task-executor image on Kind")
// 直接使用 kind 命令加载镜像,避免 utils.GetProjectDir() 路径问题
cmd = exec.Command("kind", "load", "docker-image", "--name", KindCluster, e2e_runtime.TaskExecutorImage)

Choose a reason for hiding this comment

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

P2 Badge Read cluster name from env when loading image

test-gvisor is wired to a configurable cluster name (GVISOR_KIND_CLUSTER/KIND_CLUSTER), but the suite still hardcodes KindCluster = "gvisor-test" when running kind load docker-image. If someone overrides the cluster name (which the Makefile explicitly supports), this command targets a non-existent cluster and the suite fails before any assertions run.

Useful? React with 👍 / 👎.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed, KindCluster now comes from env

Comment on lines +169 to +170
@kubectl wait --for=condition=available --timeout=120s deployment -n sandbox-k8s-system sandbox-k8s-controller-manager || \
kubectl describe deployment -n sandbox-k8s-system sandbox-k8s-controller-manager

Choose a reason for hiding this comment

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

P2 Badge Propagate controller readiness failures in setup

The readiness check in install-e2e-deps uses kubectl wait ... || kubectl describe ..., which turns a timeout into a success whenever kubectl describe exits 0. That masks controller startup failures and lets the test flow continue in a broken state, producing later failures that are harder to diagnose.

Useful? React with 👍 / 👎.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

fengcone added 3 commits March 1, 2026 19:25
- Add Makefile target to download gVisor runsc and containerd-shim-runsc-v1 binaries
- Include gVisor binaries in .gitignore to avoid tracking
- Modify setup-gvisor target to depend on binaries download
- Update Kind cluster config file path in Makefile to use new template location
- Enhance Kind cluster creation commands to use downloaded binaries
- Add environment variable KIND_CLUSTER support for gVisor tests
- Improve command comments and error handling in gVisor test suite
- Remove unused RenderTemplate function and unnecessary imports in helpers.go
- Change relative directory comments from Chinese to English in tests
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