From 015ddeb92b741cf01529eda0b886da61860e99c8 Mon Sep 17 00:00:00 2001 From: JakeSCahill Date: Tue, 28 Jul 2026 10:50:40 +0100 Subject: [PATCH 1/3] feat(crd-docs): mark beta CRD types with (beta) heading suffix and badge The generated CRD reference (k-crd.adoc) carried no beta indicators for beta CRDs. Pipeline, StretchCluster, and ShadowLink are beta features in operator 26.2 but rendered unmarked in the otherwise-GA reference page. Add a beta-type pattern to the crd-ref-docs type template. Types whose names match the pattern get a plain (beta) suffix on the section heading and a badge::[label=beta] line at the start of the section body. The explicit [id=...] anchor above each heading is untouched, so all existing xrefs and inbound links keep resolving to the same anchors. The pattern lives in one commented line at the top of type.tpl. Writers edit that line when a feature graduates to GA or a new beta CRD ships. Because every regeneration path (the generate-crd.yml workflow, the doc-tools generate crd-spec command, and manual crd-ref-docs runs) consumes these templates, the marking survives any regen without touching the operator repo. Also register the badge macro in the local Antora playbook so local previews render the badge the same way the production site does. --- .../templates/asciidoctor/operator/type.tpl | 16 ++++++++++++++-- local-antora-playbook.yml | 1 + 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/crd-config/templates/asciidoctor/operator/type.tpl b/.github/crd-config/templates/asciidoctor/operator/type.tpl index 6d7c0c9404..ba78cba4d6 100644 --- a/.github/crd-config/templates/asciidoctor/operator/type.tpl +++ b/.github/crd-config/templates/asciidoctor/operator/type.tpl @@ -1,11 +1,23 @@ {{- define "type" -}} {{- $type := . -}} +{{- /* +Beta CRD marking: types whose names match this pattern document beta features. +They get a plain (beta) suffix on the section heading and a badge::[label=beta] +line at the start of the section body. The explicit [id=...] anchor above each +heading is untouched, so existing xrefs keep working. +Update this pattern when features graduate to GA or new beta CRDs are added. +Pipeline* = Pipeline CRD, Stretch* = StretchCluster CRD, Shadow* = ShadowLink CRD. +*/ -}} +{{- $betaTypePattern := "^(Pipeline|Stretch|Shadow)" -}} +{{- $isBeta := regexMatch $betaTypePattern $type.Name -}} {{- if asciidocShouldRenderType $type -}} [id="{{ asciidocTypeID $type | asciidocRenderAnchorID }}"] -== {{ $type.Name }} {{ if $type.IsAlias }}({{ asciidocRenderTypeLink $type.UnderlyingType }}) {{ end }} +== {{ $type.Name }} {{ if $type.IsAlias }}({{ asciidocRenderTypeLink $type.UnderlyingType }}) {{ end }}{{ if $isBeta }}(beta){{ end }} -{{ $type.Doc }} +{{ if $isBeta }}badge::[label=beta] + +{{ end }}{{ $type.Doc }} {{ if eq $type.Name "RedpandaClusterSpec" }} For descriptions and default values, see xref:k-redpanda-helm-spec.adoc[]. diff --git a/local-antora-playbook.yml b/local-antora-playbook.yml index 1636d5f304..46666cce8d 100644 --- a/local-antora-playbook.yml +++ b/local-antora-playbook.yml @@ -39,6 +39,7 @@ asciidoc: - '@redpanda-data/docs-extensions-and-macros/macros/glossary' - '@redpanda-data/docs-extensions-and-macros/macros/config-ref' - '@redpanda-data/docs-extensions-and-macros/macros/helm-ref' + - '@redpanda-data/docs-extensions-and-macros/macros/badge' - '@redpanda-data/docs-extensions-and-macros/asciidoc-extensions/add-line-numbers-highlights' antora: extensions: From 161836c3d22ee99b7b001067d01e5d81b70071d2 Mon Sep 17 00:00:00 2001 From: Joyce Fee Date: Tue, 28 Jul 2026 09:19:08 -0400 Subject: [PATCH 2/3] docs: include NamedValueSource in the beta CRD pattern NamedValueSource is a Pipeline-family, beta-only supporting type but does not share the Pipeline prefix, so it rendered unmarked while its six sibling sections got badges. Match it exactly; the shared ValueSource type predates Pipeline and stays GA/unmarked. Beta section count goes from 44 to 45. Co-Authored-By: Claude Fable 5 --- .github/crd-config/templates/asciidoctor/operator/type.tpl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/crd-config/templates/asciidoctor/operator/type.tpl b/.github/crd-config/templates/asciidoctor/operator/type.tpl index ba78cba4d6..85dc1c4a41 100644 --- a/.github/crd-config/templates/asciidoctor/operator/type.tpl +++ b/.github/crd-config/templates/asciidoctor/operator/type.tpl @@ -7,8 +7,10 @@ line at the start of the section body. The explicit [id=...] anchor above each heading is untouched, so existing xrefs keep working. Update this pattern when features graduate to GA or new beta CRDs are added. Pipeline* = Pipeline CRD, Stretch* = StretchCluster CRD, Shadow* = ShadowLink CRD. +NamedValueSource (exact match) is a Pipeline-only supporting type that does not +share the prefix. The shared ValueSource type predates Pipeline and stays GA. */ -}} -{{- $betaTypePattern := "^(Pipeline|Stretch|Shadow)" -}} +{{- $betaTypePattern := "^(Pipeline|Stretch|Shadow|NamedValueSource$)" -}} {{- $isBeta := regexMatch $betaTypePattern $type.Name -}} {{- if asciidocShouldRenderType $type -}} From 51a025f22deec13fb0f4fa9c094a47fe37bcc5ed Mon Sep 17 00:00:00 2001 From: JakeSCahill Date: Tue, 28 Jul 2026 14:37:16 +0100 Subject: [PATCH 3/3] fix: mark only Pipeline types as beta, Stretch and ShadowLink are GA --- .../crd-config/templates/asciidoctor/operator/type.tpl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/crd-config/templates/asciidoctor/operator/type.tpl b/.github/crd-config/templates/asciidoctor/operator/type.tpl index 85dc1c4a41..8481385b81 100644 --- a/.github/crd-config/templates/asciidoctor/operator/type.tpl +++ b/.github/crd-config/templates/asciidoctor/operator/type.tpl @@ -6,11 +6,12 @@ They get a plain (beta) suffix on the section heading and a badge::[label=beta] line at the start of the section body. The explicit [id=...] anchor above each heading is untouched, so existing xrefs keep working. Update this pattern when features graduate to GA or new beta CRDs are added. -Pipeline* = Pipeline CRD, Stretch* = StretchCluster CRD, Shadow* = ShadowLink CRD. -NamedValueSource (exact match) is a Pipeline-only supporting type that does not -share the prefix. The shared ValueSource type predates Pipeline and stays GA. +Pipeline* = Pipeline CRD (beta in 26.2). NamedValueSource (exact match) is a +Pipeline-only supporting type that does not share the prefix. The shared +ValueSource type predates Pipeline and stays GA. StretchCluster and ShadowLink +are GA in 26.2 and deliberately not listed. */ -}} -{{- $betaTypePattern := "^(Pipeline|Stretch|Shadow|NamedValueSource$)" -}} +{{- $betaTypePattern := "^(Pipeline|NamedValueSource$)" -}} {{- $isBeta := regexMatch $betaTypePattern $type.Name -}} {{- if asciidocShouldRenderType $type -}}