Skip to content

docs: use Component instead of deprecated RootComponent - #8

Merged
mkmik merged 1 commit into
mainfrom
worktree-functional-painting-kahan
Oct 19, 2026
Merged

mkmik merged 1 commit into
mainfrom
worktree-functional-painting-kahan

Conversation

@mkmik

@mkmik mkmik commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

RootComponent is deprecated (9d27a3a), but the README and both examples still used it. This switches them to Component. The rendered output of both examples is byte-identical, and adopt.golden was regenerated with no diff.

While checking the README snippets, two of them turned out to do nothing:

  • Annotations on a specific kind: the snippet put annotations+ directly under Service+, so the annotation never showed up. It is now nested under metadata+.
  • ObjectTemplateMeta example: it imports examples/simple.jsonnet, which had drifted from the README example and used template+: { metadata: ... }. That replaced the pod template metadata, so the annotation never reached pods. simple.jsonnet is now identical to the README example (metadata+: / selector+:). Side effect: its pod template now also keeps the library's default kubectl.kubernetes.io/default-container annotation.

just test passes.

🤖 Generated with Claude Code

Switch the README and examples to Component; RootComponent is deprecated
and renders the same output.

Also fix two README examples that silently did nothing:
- "add annotations to a specific kind" now nests annotations under metadata
- simple.jsonnet now matches the README example and extends (instead of
  replacing) the pod template metadata, so ObjectTemplateMeta reaches pods

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mkmik
mkmik merged commit fd8537a into main Oct 19, 2026
1 check passed
@mkmik
mkmik deleted the worktree-functional-painting-kahan branch October 19, 2026 19:59
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.

1 participant