Skip to content

docs(STONEINTG-1717): update nudging docs for NudgeConfig CRD - #640

Open
kasemAlem wants to merge 1 commit into
konflux-ci:mainfrom
kasemAlem:STONEINTG-1717
Open

docs(STONEINTG-1717): update nudging docs for NudgeConfig CRD#640
kasemAlem wants to merge 1 commit into
konflux-ci:mainfrom
kasemAlem:STONEINTG-1717

Conversation

@kasemAlem

@kasemAlem kasemAlem commented Aug 4, 2026

Copy link
Copy Markdown

Rewrote CLI section in component-nudges.adoc to use NudgeConfig CRD
instead of kubectl patch spec.build-nudges-ref
Added validation rules section documenting webhook constraints Added editing/removing relationships instructions
Marked build-nudges-ref and build-nudged-by as deprecated in
application-api.adoc; added full NudgeConfig v1beta2 API reference
Updated building-olm.adoc nudge step to not be UI-specific

more info in STONEINTG-1717
Assisted-By: Claude code 4.6

Rewrote CLI section in component-nudges.adoc to use NudgeConfig CRD
 instead of kubectl patch spec.build-nudges-ref
Added validation rules section documenting webhook constraints
Added editing/removing relationships instructions
Marked build-nudges-ref and build-nudged-by as deprecated in
 application-api.adoc; added full NudgeConfig v1beta2 API reference
Updated building-olm.adoc nudge step to not be UI-specific

Signed-off-by: Kasem Alem <kalem@redhat.com>
@kasemAlem
kasemAlem requested review from a team as code owners August 4, 2026 14:04
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@qodo-app-for-konflux-ci

Copy link
Copy Markdown

PR Summary by Qodo

Update nudging docs to use NudgeConfig CRD (v1beta2)

📝 Documentation 🕐 20-40 Minutes

Grey Divider

AI Description

• Rewrite CLI nudging instructions to use the namespace-scoped NudgeConfig resource.
• Document NudgeConfig validation/webhook constraints and how to edit/remove relationships.
• Deprecate legacy build-nudges-ref/build-nudged-by fields and add NudgeConfig v1beta2 API
 reference.
Diagram

graph TD
  U["Docs reader / CLI user"] --> CN["component-nudges.adoc"] --> NC["NudgeConfig CRD (v1beta2)"]
  BO["building-olm.adoc"] --> CN
  AA["application-api.adoc"] --> LF["Legacy Component fields"] --> NC
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Auto-generate v1beta2 NudgeConfig reference from CRD/OpenAPI
  • ➕ Eliminates manual drift between docs and the shipped schema/validation rules
  • ➕ Keeps field tables/anchors consistent with other generated API sections
  • ➖ Requires build tooling changes to include v1beta2 schema in the generator pipeline
  • ➖ Less flexibility for explanatory prose embedded inside the reference section
2. Separate 'concepts/constraints' into a dedicated NudgeConfig page
  • ➕ Keeps the how-to (component-nudges) focused and shorter
  • ➕ Allows webhook/limits/cycle rules to be referenced from multiple guides
  • ➖ More navigation hops for readers doing a quick setup
  • ➖ Requires careful cross-linking to avoid duplicated/fragmented guidance

Recommendation: The PR’s approach (make NudgeConfig the canonical configuration surface and deprecate legacy fields in the reference) is the right direction for reducing confusion. The main improvement to consider later is moving the manually maintained v1beta2 API reference to the same generation workflow as the rest of application-api.adoc to reduce long-term maintenance risk.

Files changed (3) +252 / -109

Documentation (3) +252 / -109
component-nudges.adocRewrite nudging how-to around NudgeConfig and document constraints +126/-103

Rewrite nudging how-to around NudgeConfig and document constraints

• Updates the page description and rewrites the CLI procedure to create/apply a namespace-scoped 'NudgeConfig' (v1beta2) instead of patching 'spec.build-nudges-ref'. Adds guidance for editing/removing relationships, documents webhook validation rules (no self-nudges, no duplicates, no cycles, max 256, singleton name), and reorganizes/clarifies sections on what gets nudged, branch naming, file scanning, and Renovate customization.

modules/building/pages/component-nudges.adoc

building-olm.adocMake OLM nudging step link to generic relationship instructions +1/-1

Make OLM nudging step link to generic relationship instructions

• Rewords the OLM guide’s nudging step to be UI-agnostic and links to the "Defining component relationships" documentation without UI-specific phrasing.

modules/end-to-end/pages/building-olm.adoc

application-api.adocDeprecate legacy nudging fields and add NudgeConfig v1beta2 reference +125/-5

Deprecate legacy nudging fields and add NudgeConfig v1beta2 reference

• Marks 'spec.build-nudges-ref' and 'status.build-nudged-by' as deprecated and points readers to 'NudgeConfig' instead. Adds a new v1beta2 package section with a manually maintained API reference for 'NudgeConfig', including 'NudgeRelationship' and 'mode' ('immediate'/'validated') plus status fields.

modules/reference/pages/kube-apis/application-api.adoc

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

🚀 Preview is available at: https://pr-640--konflux-docs.netlify.app

@qodo-app-for-konflux-ci

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (2) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Broken NudgeConfigList xref 🐞 Bug ≡ Correctness
Description
The new NudgeConfig section links to NudgeConfigList, but no NudgeConfigList anchor/section
exists in application-api.adoc, producing an unresolved xref (and potentially a docs build
warning/error). Readers also can’t navigate to the referenced type.
Code

modules/reference/pages/kube-apis/application-api.adoc[R882-885]

+.Appears In:
+****
+- xref:{anchor_prefix}-appstudio-redhat-com-v1beta2-nudgeconfiglist[$$NudgeConfigList$$]
+****
Relevance

●●● Strong

Unresolved xref is a clear docs correctness issue; they’ll add missing List anchor/section or remove
link.

PR-#541
PR-#487
PR-#534

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The NudgeConfig section explicitly references NudgeConfigList, but the document moves on to
NudgeConfigSpec and later returns to the v1alpha1 Snapshot section without ever defining an
[id="...-nudgeconfiglist"] section for the target.

modules/reference/pages/kube-apis/application-api.adoc[872-914]
modules/reference/pages/kube-apis/application-api.adoc[962-983]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`application-api.adoc` includes an xref to `NudgeConfigList` in the NudgeConfig “Appears In” block, but the document does not define a `NudgeConfigList` section/anchor. This causes an unresolved xref.

## Issue Context
The v1beta2 (NudgeConfig) section is manually inserted and currently defines `NudgeConfig`, `NudgeConfigSpec`, `NudgeRelationship`, `NudgeModeType`, and `NudgeConfigStatus`, but not the corresponding List type.

## Fix Focus Areas
- modules/reference/pages/kube-apis/application-api.adoc[872-915]
- modules/reference/pages/kube-apis/application-api.adoc[882-885]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. Generated docs edited manually 🐞 Bug ⚙ Maintainability
Description
application-api.adoc is generated by hack/gen-api-docs.sh via crd-ref-docs, so the newly added
“manually maintained” v1beta2 NudgeConfig content will be overwritten the next time API docs are
regenerated.
Code

modules/reference/pages/kube-apis/application-api.adoc[2]

+// NOTE: The appstudio.redhat.com/v1beta2 section (NudgeConfig) below is manually maintained.
Relevance

●●● Strong

Team regularly regenerates this file; manual edits in generated docs will be overwritten, so they’ll
fix generation/source.

PR-#541
PR-#534
PR-#487

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The file declares itself generated, and the repository provides a script that regenerates and
overwrites it using a template that renders the whole output; therefore manual content in the
generated file will be lost on regeneration.

modules/reference/pages/kube-apis/application-api.adoc[1-3]
hack/gen-api-docs.sh[34-38]
hack/gen-api-docs.sh[46-53]
api-gen/templates/gv_list.tpl[4-17]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A generated output file (`modules/reference/pages/kube-apis/application-api.adoc`) is being edited directly. The repo’s generation script rewrites this file, so the manual v1beta2/NudgeConfig section is not durable.

## Issue Context
`hack/gen-api-docs.sh` runs `crd-ref-docs` with `--output-path modules/reference/pages/kube-apis/application-api.adoc`. The `api-gen/templates/gv_list.tpl` template emits the file header and full rendered content, so a regen replaces the entire file.

## Fix Focus Areas
- modules/reference/pages/kube-apis/application-api.adoc[1-3]
- hack/gen-api-docs.sh[34-38]
- hack/gen-api-docs.sh[46-53]
- api-gen/templates/gv_list.tpl[4-17]

## Suggested direction
Move the manual v1beta2 section into a dedicated snippet file (for example under `modules/reference/pages/kube-apis/`), and update the generation pipeline (script or template) to append/include that snippet after generating `application-api.adoc` so regeneration preserves it.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

To customize comments, go to the Qodo configuration screen, or learn more in the docs.

Qodo Logo

Comment on lines +882 to +885
.Appears In:
****
- xref:{anchor_prefix}-appstudio-redhat-com-v1beta2-nudgeconfiglist[$$NudgeConfigList$$]
****

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Broken nudgeconfiglist xref 🐞 Bug ≡ Correctness

The new NudgeConfig section links to NudgeConfigList, but no NudgeConfigList anchor/section
exists in application-api.adoc, producing an unresolved xref (and potentially a docs build
warning/error). Readers also can’t navigate to the referenced type.
Agent Prompt
## Issue description
`application-api.adoc` includes an xref to `NudgeConfigList` in the NudgeConfig “Appears In” block, but the document does not define a `NudgeConfigList` section/anchor. This causes an unresolved xref.

## Issue Context
The v1beta2 (NudgeConfig) section is manually inserted and currently defines `NudgeConfig`, `NudgeConfigSpec`, `NudgeRelationship`, `NudgeModeType`, and `NudgeConfigStatus`, but not the corresponding List type.

## Fix Focus Areas
- modules/reference/pages/kube-apis/application-api.adoc[872-915]
- modules/reference/pages/kube-apis/application-api.adoc[882-885]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@@ -1,11 +1,13 @@
// Generated documentation. Please do not edit.
// NOTE: The appstudio.redhat.com/v1beta2 section (NudgeConfig) below is manually maintained.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

2. Generated docs edited manually 🐞 Bug ⚙ Maintainability

application-api.adoc is generated by hack/gen-api-docs.sh via crd-ref-docs, so the newly added
“manually maintained” v1beta2 NudgeConfig content will be overwritten the next time API docs are
regenerated.
Agent Prompt
## Issue description
A generated output file (`modules/reference/pages/kube-apis/application-api.adoc`) is being edited directly. The repo’s generation script rewrites this file, so the manual v1beta2/NudgeConfig section is not durable.

## Issue Context
`hack/gen-api-docs.sh` runs `crd-ref-docs` with `--output-path modules/reference/pages/kube-apis/application-api.adoc`. The `api-gen/templates/gv_list.tpl` template emits the file header and full rendered content, so a regen replaces the entire file.

## Fix Focus Areas
- modules/reference/pages/kube-apis/application-api.adoc[1-3]
- hack/gen-api-docs.sh[34-38]
- hack/gen-api-docs.sh[46-53]
- api-gen/templates/gv_list.tpl[4-17]

## Suggested direction
Move the manual v1beta2 section into a dedicated snippet file (for example under `modules/reference/pages/kube-apis/`), and update the generation pipeline (script or template) to append/include that snippet after generating `application-api.adoc` so regeneration preserves it.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

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