Skip to content

feat: add support for section propagation and sectionDescription - #343

Open
Rikpat wants to merge 2 commits into
norwoodj:masterfrom
Rikpat:feature/section-rework
Open

feat: add support for section propagation and sectionDescription#343
Rikpat wants to merge 2 commits into
norwoodj:masterfrom
Rikpat:feature/section-rework

Conversation

@Rikpat

@Rikpat Rikpat commented May 14, 2026

Copy link
Copy Markdown

Adds support for passing @section annotation down through list items and object properties, reducing the amount of annotations needed.

Also implements @sectionDescription annotation, allowing multiline markdown descriptions. To comply with the rest of the tags, it's implemented like this:

# podAnnotations -- (object) Additional pod annotations. Can be used for various purposes.
# @section -- Pod settings
# @sectionDescription -- Pod customization settings, such as annotations, resource requests and limits, probes, extra containers and initContainers, affinity and tolerations. Each of these are added to the pod spec as-is, so any valid Kubernetes configuration can be used here.
# @sectionDescription -- 
# @sectionDescription -- Each field in this section is optional, and can be left empty if not needed, but we recommend adding at least the probes, and custom resource requests and limits for better observability and stability of the application.
# @sectionDescription -- 
# @sectionDescription -- Affinity and tolerations can be used to control pod scheduling and placement, if using a custom node pool.
podAnnotations: {}

I previously implemented it as so, which made it more readable in my opinion, also allowed adding multiple descriptions in one object (for use with custom rendering)

# -- (object)
# @section -- Security and identity settings
# @sectionDescription 
# The automount of serviceaccount tokens is disabled. If you need to create a short-lived token for your pod or sidecars (more likely scenario), you need to set `serviceAccountToken.use: true`. This creates a volume called **token-volume** with token and ca bundle.
#  To mount it in your app (but you will probably not need this), you can use `serviceAccountToken.mount: "<path-to-mount>"`.
# @sectionDescription
# @sectionDescription
#  In following example we show how to set up **DAPR** sidecar for reading secrets and 3rd party extraInitContainer:
# ```yaml
# serviceAccountToken:
#   use: true
# 
# podAnnotations:
#   ...
#   dapr.io/volume-mounts: "token-volume:/var/run/secrets/kubernetes.io/serviceaccount"
# 
# extraInitContainers:
#   ...
#   volumeMounts:
#     - name: token-volume
#       mountPath: "/var/run/secrets/kubernetes.io/serviceaccount" # Or different if it supports custom path
#       readOnly: true
# ```
# @sectionDescription
# Regular description continues here
serviceAccountToken:
  # serviceAccountToken.use -- (bool) Whether to create a projected service account token volume.
  use: false

If this would be preferred way to use it, I can do the change

Fixes #227, #264

Rikpat added 2 commits May 13, 2026 06:35
Inspiration taken from PR by pkoutsovasilis

Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co>

Fixes norwoodj#227

## Values

<h3>Some Section</h3>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This looks duplicated (with the Markdown above).

Is this correct that way?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

one of them comes from {{ template "chart.valuesSection" . }} and the other one from {{ template "chart.valuesSectionHtml" . }}. The description is always rendered as specified in the values, so in this case as markdown (technically html tags are supported as well)

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.

[Feat]: Add markdown description to Sections

2 participants