Generated CRDs do not populate top-level OpenAPI schema descriptions
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 40/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- go, openapi
- Lĩnh vực
- api, developer-experience, documentation
Hướng nghiên cứu
Bắt đầu tại cmd/protoc-gen-crd/openapiGenerator.go, khoảng dòng 340-341, rồi so sánh schema gốc được tạo ra với phần mô tả spec do kubectl explain hiển thị. Kiểm tra schema OpenAPI v3 của VirtualService và xác minh thiết kế mô tả ở cấp tài nguyên theo dự định. Hoàn tất khi các CRDs được tạo ra có phần mô tả cấp cao nhất có ý nghĩa mà không che khuất phần mô tả spec hiện có.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the feature request
While investigating kubectl explain, I noticed that all generated Istio CRDs have an empty top-level description.
For example:
kubectl explain virtualservice
GROUP: networking.istio.io
KIND: VirtualService
VERSION: v1
DESCRIPTION:
<empty>
.
.
even though explain virtualservice.spec , correctly shows the generated description:
kubectl explain virtualservice.spec
GROUP: networking.istio.io
KIND: VirtualService
VERSION: v1
FIELD: spec <Object>
DESCRIPTION:
Configuration affecting label/content routing, sni routing, etc. See more
details at:
https://istio.io/docs/reference/config/networking/virtual-service.html
Looking at the generated OpenAPI:
kubectl get --raw /openapi/v3/apis/networking.istio.io/v1 \ | jq '.components.schemas["io.istio.networking.v1.VirtualService"].description'
returns null.
I traced this to the CRD generator https://github.com/istio/tools/blob/master/cmd/protoc-gen-crd/openapiGenerator.go#L340-L341 . A straightforward implementation is to propagate spec.Description to the root schema, which makes kubectl explain display a description. However, this results in the same description appearing for both the resource and its spec.
Before preparing a PR, I'd like to understand the intended design:
- Should the root CRD schema reuse the protobuf message description?
- Or should the generator support a separate resource-level description (for example via a new +cue-gen annotation)?
Affected product area (please put an X in all that apply)
[ ] Configuration Infrastructure
[X] Docs
[ ] Installation
[ ] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[ ] Test and Release
[X] User Experience
Additional context:
This enhancement would improve the usability of generated Istio CRDs by populating top-level OpenAPI schema descriptions. Currently, kubectl explain <resource> shows an empty DESCRIPTION for generated CRDs, even though field and spec descriptions are available. Adding meaningful root descriptions would make Istio APIs easier to discover and understand directly from the CLI, without changing runtime behavior.
- Ngôn ngữ chính
- Go
- Star
- 523
- Fork
- 623
- Merge trung bình
- 5 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của istio/api
-
Gateway CRD accepts both credentialName and tlsCertificates in server TLS settingsCó thể đã có người làm @RaphaelFakhri đã nhận 23 ngày trước. Đang mởarea/networking area/user experience
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area/networking area/user experience kind/docs kind/enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[release-1.29] change default of statsCompression to trueCó thể làm lại được @keithmattix đã nhận 304 ngày trước và không có pull request nào đang mở. Đang mở
istio/api#3642 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
istio/api#3638 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
istio/api#3603 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
bug raised-by:verifier to:worker
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
medici-finance/assay#7835 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
golang-malawi/qatarina#496 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
hive size:simple
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
janitor: 2026-11-27 hygieneĐang mởdocumentation stage:review
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Type/Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
wso2/identity-customer-data-service#430 ·
Maintainer thường phản hồi trong vòng 1 ngày