kubernetes-sigs / kubernetes-sigs/reference-docs

gen-apidocs Markdown backend omits ContainerStatus from the Pod API reference

Open
#467 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
130
Forks
135
Avg merge
16h 27m
Merged PRs (30d)
3

Description

Problem

The gen-apidocs Markdown backend omits the ContainerStatus definition from the generated Pod API reference.

The OpenAPI input contains the complete io.k8s.api.core.v1.ContainerStatus definition, and PodStatus references it through:

  • containerStatuses
  • initContainerStatuses
  • ephemeralContainerStatuses

However, the generated core/pod-v1.md only displays the unlinked type ContainerStatus array.

The generated Markdown contains neither:

  • a ## ContainerStatus section in pod-v1.md; nor
  • a standalone ContainerStatus page under definitions/.

As a result, the ContainerStatus schema and its fields are not reachable from the generated Markdown API reference.

Steps to reproduce

  1. Clone kubernetes-sigs/reference-docs and check out master.

  2. Generate the Kubernetes 1.36 Markdown API reference:

export K8S_RELEASE=1.36.0
make apimd
  1. Confirm that the OpenAPI input contains ContainerStatus:
rg -n '"io.k8s.api.core.v1.ContainerStatus"' \
  gen-apidocs/config/v1_36/swagger.json

The complete definition is present.

  1. Confirm that the generated Pod page references the type:
rg -n 'ContainerStatus array' \
  gen-apidocs/build/markdown/core/pod-v1.md

This finds containerStatuses, initContainerStatuses, and ephemeralContainerStatuses.

  1. Search for a generated ContainerStatus section:
rg -n '^## ContainerStatus ' \
  gen-apidocs/build/markdown/core/pod-v1.md

This produces no output and exits with status 1.

  1. Check for a standalone definition page:
find gen-apidocs/build/markdown \
  -iname '*container-status*'

This also produces no output.

Actual behavior

The generated Pod status fields contain an unlinked type:

ContainerStatus array

No ContainerStatus definition is emitted anywhere in the Markdown output.

Expected behavior

ContainerStatus should be generated and reachable from the Pod API reference, either as a section in pod-v1.md or as a linked standalone definition.

Environment

  • Repository: kubernetes-sigs/reference-docs
  • Branch: master
  • Backend: markdown
  • Kubernetes release: 1.36.0
  • Commit: <output of git rev-parse HEAD>

Related issues

  • kubernetes/website#56427
  • kubernetes/website#56463

The website issue reports the user-visible symptom, and #56463 attempted to address the generated page directly. This issue tracks the behavior reproduced using the current gen-apidocs Markdown backend.

I'm interested in working on a fix and adding a regression test.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run make apimd and inspect the Markdown backend using gen-apidocs/config/v1_36/swagger.json as input. Trace how core/pod-v1.md and definitions/ are generated, then add a regression test for ContainerStatus emission and linking. Done means the ContainerStatus schema and fields are reachable in the generated Markdown output.

Written by the indexing model from the issue text.

Assessment

Tech stack
markdown, openapi
Domain
documentation, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.