Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

docs/egress-trust-bundle.md documents ActorTemplate as a Kubernetes CRD rejected by kubectl ate create actor-template and uses mismatched trust-bundle mount paths

Đang mở Phù hợp với người mới
#3,278 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@moficodes đang làm issue này rồi.

Từ ngày 28/10/2026.

  • #3368 của @moficodes — đang mở

Đánh giá

Độ khó
1/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
88/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go, kubernetes
Lĩnh vực
documentation

Hướng nghiên cứu

Đọc docs/egress-trust-bundle.md cùng với cmd/kubectl-ate/internal/cmd/actortemplate.go:158-174 để xác nhận cấu trúc ActorTemplate được chấp nhận. Cập nhật ví dụ manifest để dùng các trường protobuf và điều chỉnh đường dẫn CA của wrapper cho khớp với đường dẫn bundle được mount. Hoàn tất khi cả hai đoạn mẫu hoạt động cùng nhau với kubectl ate create actor-template và container có thể đọc bundle.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area/network area/security kind/docs
Summary & Root Cause

ActorTemplate is not a Kubernetes CRD. It is an ateapi protobuf record that kubectl ate create actor-template -f parses with strict protojson.Unmarshal (actortemplate.go:170). The doc example wraps the fields in apiVersion/kind/spec and uses metadata.namespace, so the parser stops at the first unknown key, apiVersion. The valid shape has metadata.name, metadata.atespace, and top-level volumes/containers. Separately, the entrypoint wrapper in the same doc reads the bundle from /run/ate/trust-bundle.pem (line 110). The volume from line 67 puts the file at /run/ate/egress-trust-bundle/trust-bundle.pem. Because the script uses set -eu, a user who copies both snippets gets a container that exits immediately.

Affected Code Locations
  • docs/egress-trust-bundle.md:43-68: the example is a Kubernetes-style manifest (apiVersion: ate.dev/v1, kind: ActorTemplate, metadata.namespace, spec:), and line 67 mounts the volume at mountPath: /run/ate/egress-trust-bundle/.
  • docs/egress-trust-bundle.md:83-90: the runtime table points every SSL_CERT_FILE style variable at /run/ate/egress-trust-bundle/trust-bundle.pem. This matches line 67.
  • docs/egress-trust-bundle.md:106-116: the "Example entrypoint wrapper" sets ca=/run/ate/trust-bundle.pem on line 110. That path does not exist with the mount from line 67.
  • cmd/kubectl-ate/internal/cmd/actortemplate.go:158-174: actorTemplateFromManifest runs protojson.Unmarshal strictly into ateapi.ActorTemplate (line 170). Unknown fields are an error.
  • cmd/kubectl-ate/internal/cmd/actortemplate.go:113: wraps the parse error as failed to parse actor template manifest %q: %w.
Detailed Reproduction Guide
  1. Copy the doc snippet and try to create it:
git show 15b58199:docs/egress-trust-bundle.md | sed -n '44,67p' > doc-template.yaml
kubectl ate create actor-template -f doc-template.yaml
  1. Fix the schema, keep the doc's mount path, and run the doc's wrapper line inside the actor:
metadata:
  name: s11-trust-test
  atespace: ate-demo-counter
workerSelector:
  matchLabels:
    workload: counter
resources:
  limits:
    cpuMillicores: "250"
    memoryBytes: "134217728"
volumes:
- name: system-info
  systemInfo:
    dataSources:
    - trustBundle:
        names:
        - egress-mitm.ate.dev
        - system-roots.ate.dev
        path: trust-bundle.pem
containers:
- name: app
  image: busybox:1.36
  command:
  - /bin/sh
  - -c
  - |
    ls -la /run/ate/egress-trust-bundle/trust-bundle.pem
    ca=/run/ate/trust-bundle.pem
    cat "$ca" 2>&1 || echo "EXIT_CODE=$?"
    httpd -f -p 80
  volumeMounts:
  - name: system-info
    mountPath: /run/ate/egress-trust-bundle
kubectl ate create actor-template -f s11-mount.yaml
kubectl ate create actor s11-actor -a ate-demo-counter --template s11-trust-test
kubectl ate resume actor s11-actor -a ate-demo-counter
kubectl ate logs actor s11-actor -a ate-demo-counter
Expected vs. Actual Behavior
  • Expected: The doc snippet is a valid ateapi.ActorTemplate (metadata.name, metadata.atespace, top-level volumes and containers), and the wrapper reads the same path the volume mounts (/run/ate/egress-trust-bundle/trust-bundle.pem).
  • Actual: create actor-template fails with proto: (line 1:2): unknown field "apiVersion" (RC=1). With the schema fixed, the bundle is mounted at /run/ate/egress-trust-bundle/trust-bundle.pem (222672 bytes), and the doc's ca=/run/ate/trust-bundle.pem fails with No such file or directory.
Observed Output & Logs
$ kubectl ate create actor-template -f doc-template.yaml
Error: failed to parse actor template manifest "doc-template.yaml": proto: (line 1:2): unknown field "apiVersion"
RC=1
{"time":"2026-10-27T00:37:39.775804217Z","message":"=== Actual mounted file at /run/ate/egress-trust-bundle/trust-bundle.pem ==="}
{"time":"2026-10-27T00:37:39.866679041Z","message":"-rw-r--r--    1 root     root        222672 Oct 27 00:37 /run/ate/egress-trust-bundle/trust-bundle.pem"}
{"time":"2026-10-27T00:37:39.867271594Z","message":"=== Running docs/egress-trust-bundle.md:110 (ca=/run/ate/trust-bundle.pem) ==="}
{"time":"2026-10-27T00:37:39.871715713Z","message":"cat: can't open '/run/ate/trust-bundle.pem': No such file or directory"}
{"time":"2026-10-27T00:37:39.872259528Z","message":"EXIT_CODE=1"}
$ kubectl ate create actor-template -f doc-template.yaml
Error: failed to parse actor template manifest "doc-template.yaml": proto: (line 1:2): unknown field "apiVersion"
RC=1
$ kubectl ate logs actor r3-s11 -a ate-demo-counter
2026-10-27T01:59:08.293022919Z === Actual mounted file at /run/ate/egress-trust-bundle/trust-bundle.pem ===
2026-10-27T01:59:08.300867659Z -rw-r--r--    1 root     root        222672 Oct 27 01:59 /run/ate/egress-trust-bundle/trust-bundle.pem
2026-10-27T01:59:08.301570776Z === Running docs/egress-trust-bundle.md:110 (ca=/run/ate/trust-bundle.pem) ===
2026-10-27T01:59:08.390553539Z cat: can't open '/run/ate/trust-bundle.pem': No such file or directory
2026-10-27T01:59:08.391026414Z EXIT_CODE=1
Ngôn ngữ chính
Go
Star
5.9k
Fork
637
Merge trung bình
2 ngày 10 giờ
Pull request đã merge (30 ngày)
562

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của agent-substrate/substrate

Tất cả issue của agent-substrate/substrate

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.