Skip to content

Add blog referencing-secrets-and-configmaps-in-extension-and-controllerdeployment-helm-values - #1032

Open
rfranzke wants to merge 5 commits into
masterfrom
blog/2026-07-23-referencing-secrets-and-configmaps-in-extension-and-controllerdeployment-helm-values
Open

Add blog referencing-secrets-and-configmaps-in-extension-and-controllerdeployment-helm-values#1032
rfranzke wants to merge 5 commits into
masterfrom
blog/2026-07-23-referencing-secrets-and-configmaps-in-extension-and-controllerdeployment-helm-values

Conversation

@rfranzke

@rfranzke rfranzke commented Jul 22, 2026

Copy link
Copy Markdown
Member

Purpose

@oliver-goetz This PR proposes a new blog post titled:

"Referencing Secrets and ConfigMaps in Extension and ControllerDeployment Helm Values"

The purpose of the blog post is to inform the community about new Gardener features or changes (2026-07-23).

Notes to Reviewers

This blog post was generated with AI assistance from the source material listed below.
Please evaluate whether this topic is suitable for a blog post. If so, review and edit the content as needed.
If you decide the topic isn't appropriate for a blog post, feel free to close this PR and delete the branch.

Source Material

Instructions for Reviewers

❌ If the blog post isn't viable

  • Close this PR
  • Delete the branch

✏️ If the blog post is viable but requires editing

  1. Clone the repository and change to the directory:
git clone https://github.com/gardener/documentation
cd documentation
  1. Check out the branch:
git fetch origin && git checkout blog/2026-07-23-referencing-secrets-and-configmaps-in-extension-and-controllerdeployment-helm-values
  1. Review the content in website/blog/2026/07/07-23-referencing-secrets-and-configmaps-in-extension-and-controllerdeployment-helm-values.md.
  2. Make any necessary edits, additions, or removals, and then push the changes:
git add website/blog/2026/07/07-23-referencing-secrets-and-configmaps-in-extension-and-controllerdeployment-helm-values.md
git commit --amend --no-edit
git push origin +blog/2026-07-23-referencing-secrets-and-configmaps-in-extension-and-controllerdeployment-helm-values

✅ If the blog post is ready

  • Invite additional reviewers (optional step)
  • Comment with /lgtm to approve (required step)

The documentation team will review your PR, as required by branch protection.
They will merge it once you (and any additional reviewers) have approved it.

@oliver-goetz Thank you for contributing to the Gardener blog!

Summary by CodeRabbit

  • Documentation
    • Added guidance for referencing Secret and ConfigMap data in Extension and ControllerDeployment Helm values.
    • Documented reference declarations, templating syntax, resolution rules, namespace and label requirements, and admission validation.
    • Explained reference-protection behavior and standalone ControllerDeployment usage.
    • Included links to related resources.

@rfranzke
rfranzke requested a review from a team as a code owner July 22, 2026 09:21
@rfranzke rfranzke added area/documentation Documentation related kind/enhancement Enhancement, improvement, extension labels Jul 22, 2026
@rfranzke
rfranzke requested a review from oliver-goetz July 22, 2026 09:21
@netlify

netlify Bot commented Jul 22, 2026

Copy link
Copy Markdown

Deploy Preview for gardener-docs ready!

Name Link
🔨 Latest commit caccf52
🔍 Latest deploy log https://app.netlify.com/projects/gardener-docs/deploys/6a744985cf0c480009e27f56
😎 Deploy Preview https://deploy-preview-1032--gardener-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a blog post for Gardener v1.147. It documents Secret and ConfigMap references in Extension and ControllerDeployment Helm values, including syntax, validation, resolution, and deletion protection.

Changes

Helm value references

Layer / File(s) Summary
Feature announcement and usage documentation
hugo/content/blog/2026/07/07-23-referencing-secrets-and-configmaps-in-extension-and-controllerdeployment-helm-values.md
Documents resource-reference YAML declarations, Helm templating syntax, supported value locations, reconciliation behavior, admission validation, reference-protection finalizers, standalone ControllerDeployment usage, and related links.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested labels: needs/review

Suggested reviewers: n-boshnakov

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: a blog post about referencing Secrets and ConfigMaps in Extension and ControllerDeployment Helm values.
Description check ✅ Passed The description clearly explains the blog post purpose, review requirements, source material, and next steps, but omits the template's kind and issue sections.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch blog/2026-07-23-referencing-secrets-and-configmaps-in-extension-and-controllerdeployment-helm-values

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gardener-prow gardener-prow Bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. labels Jul 22, 2026
oliver-goetz
oliver-goetz previously approved these changes Jul 22, 2026

@oliver-goetz oliver-goetz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks 👍

@gardener-prow

gardener-prow Bot commented Jul 22, 2026

Copy link
Copy Markdown

@oliver-goetz: adding LGTM is restricted to approvers and reviewers in OWNERS files.

Details

In response to this:

Thanks 👍

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Signed-off-by: Bozhidara Hristova <bozhidara.hristova@sap.com>
Signed-off-by: Bozhidara Hristova <bozhidara.hristova@sap.com>
Signed-off-by: Bozhidara Hristova <bozhidara.hristova@sap.com>
@gardener-prow

gardener-prow Bot commented Aug 6, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign marc1404 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

1 similar comment
@gardener-prow

gardener-prow Bot commented Aug 6, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign marc1404 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@hugo/content/blog/2026/07/07-23-referencing-secrets-and-configmaps-in-extension-and-controllerdeployment-helm-values.md`:
- Around line 60-64: Update the resource-reference documentation near the
Extension and ControllerDeployment usage description to explicitly state that
only v1 Secret and ConfigMap resources are supported, and that Secret.data
values are base64-decoded before substitution. Preserve the existing namespace
and label requirements.
- Line 26: Revise the introductory paragraph around the inline Helm values in
Extension and ControllerDeployment to distinguish their respective cluster
storage locations and avoid claiming both are unencrypted in the runtime
cluster. Retain the point that embedding sensitive values couples credential
updates and rotation with changes to the parent resource and extension version
management, without making unsupported encryption assertions.
- Line 77: Update the finalizer reference in the documentation sentence to use
the exact identifier “gardener.cloud/reference-protection” instead of the
shortened “reference-protection,” while preserving the existing explanation.
- Around line 70-73: Clarify the validation statement so alphanumeric-only
restrictions explicitly apply to the template alias <name> and data key <key>,
not resourceRef.name. Preserve the existing admission-time validation wording
and acknowledge that referenced Kubernetes resource names may contain characters
such as dashes.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: d547ff6e-487a-45f9-9aad-bf5d133cd54d

📥 Commits

Reviewing files that changed from the base of the PR and between 00beaed and caccf52.

📒 Files selected for processing (1)
  • hugo/content/blog/2026/07/07-23-referencing-secrets-and-configmaps-in-extension-and-controllerdeployment-helm-values.md

local: true
---

Gardener extensions and controller deployments are configured via Helm values embedded directly in `Extension` (`operator.gardener.cloud`) and `ControllerDeployment` (`core.gardener.cloud`) objects. Until now, this meant sensitive data — credentials, certificates, environment-specific configuration — had to be stored inline in these objects. That created friction: the objects are not encrypted at rest in the runtime cluster, external secret management systems had to update the extension object itself, and credential rotation could conflict with extension version management since both touch the same object.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Qualify the cluster and encryption statement.

ControllerDeployment is stored in the virtual garden cluster, not the garden runtime cluster. Gardener also lists core.gardener.cloud/v1/ControllerDeployment among resources encrypted by default. This sentence can lead readers to make an incorrect security decision. Reword it to describe the coupling caused by inline values without claiming that both resource types are unencrypted in the runtime cluster. (github.com)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@hugo/content/blog/2026/07/07-23-referencing-secrets-and-configmaps-in-extension-and-controllerdeployment-helm-values.md`
at line 26, Revise the introductory paragraph around the inline Helm values in
Extension and ControllerDeployment to distinguish their respective cluster
storage locations and avoid claiming both are unencrypted in the runtime
cluster. Retain the point that embedding sensitive values couples credential
updates and rotation with changes to the parent resource and extension version
management, without making unsupported encryption assertions.

Comment on lines +60 to +64
For `Extension`, the references are resolved by `gardener-operator` against the garden runtime cluster and can be used in `spec.deployment.extension.values`, `spec.deployment.extension.runtimeClusterValues`, and `spec.deployment.admission.values`.

For `ControllerDeployment`, the references are resolved by `gardenlet` against the virtual garden cluster and can be used in `helm.values`.

Referenced objects must reside in the `garden` namespace and carry the label `gardener.cloud/role: resource-reference`. This label is required so that the controllers watching them can pick up changes and trigger reconciliation — meaning when a `Secret` or `ConfigMap` value changes, the extension or controller deployment is automatically reconciled with the new values.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Document the supported resource contract.

State that only Secret and ConfigMap references with apiVersion: v1 are supported. Also state that Secret.data values are base64-decoded before substitution. The current prose leaves both behaviors implicit in the example. (github.com)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@hugo/content/blog/2026/07/07-23-referencing-secrets-and-configmaps-in-extension-and-controllerdeployment-helm-values.md`
around lines 60 - 64, Update the resource-reference documentation near the
Extension and ControllerDeployment usage description to explicitly state that
only v1 Secret and ConfigMap resources are supported, and that Secret.data
values are base64-decoded before substitution. Preserve the existing namespace
and label requirements.

Comment on lines +70 to +73
- Every `{{ ... }}` expression in the values must match exactly the form `{{ .resources.<name>.data.<key> }}`. Other Go template constructs are rejected.
- The referenced `<name>` must be declared in the same object's `resources` list. Referencing an undeclared name is rejected at admission time.

Invalid characters in names (dashes, underscores — only alphanumeric characters are allowed) are also caught immediately.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Clarify which names must be alphanumeric.

The restriction applies to the template alias <name> and data key <key>. It does not apply to resourceRef.name. The current wording is ambiguous because the example uses a Kubernetes object name containing dashes. (github.com)

Suggested wording
-Invalid characters in names (dashes, underscores — only alphanumeric characters are allowed) are also caught immediately.
+The template alias <name> and data key <key> must contain only alphanumeric characters. The Kubernetes object name in resourceRef.name is separate.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- Every `{{ ... }}` expression in the values must match exactly the form `{{ .resources.<name>.data.<key> }}`. Other Go template constructs are rejected.
- The referenced `<name>` must be declared in the same object's `resources` list. Referencing an undeclared name is rejected at admission time.
Invalid characters in names (dashes, underscores — only alphanumeric characters are allowed) are also caught immediately.
- Every `{{ ... }}` expression in the values must match exactly the form `{{ .resources.<name>.data.<key> }}`. Other Go template constructs are rejected.
- The referenced `<name>` must be declared in the same object's `resources` list. Referencing an undeclared name is rejected at admission time.
The template alias <name> and data key <key> must contain only alphanumeric characters. The Kubernetes object name in resourceRef.name is separate.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@hugo/content/blog/2026/07/07-23-referencing-secrets-and-configmaps-in-extension-and-controllerdeployment-helm-values.md`
around lines 70 - 73, Clarify the validation statement so alphanumeric-only
restrictions explicitly apply to the template alias <name> and data key <key>,
not resourceRef.name. Preserve the existing admission-time validation wording
and acknowledge that referenced Kubernetes resource names may contain characters
such as dashes.


## Reference Protection

A finalizer (`reference-protection`) is added to any referenced `Secret` or `ConfigMap` by the reference controller, preventing accidental deletion while the object is in use by an extension or controller deployment.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use the full finalizer name.

The reference controller adds gardener.cloud/reference-protection, not reference-protection. Use the exact identifier so readers can inspect metadata.finalizers correctly. (github.com)

Suggested fix
-A finalizer (`reference-protection`) is added
+A finalizer (`gardener.cloud/reference-protection`) is added
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
A finalizer (`reference-protection`) is added to any referenced `Secret` or `ConfigMap` by the reference controller, preventing accidental deletion while the object is in use by an extension or controller deployment.
A finalizer (`gardener.cloud/reference-protection`) is added to any referenced `Secret` or `ConfigMap` by the reference controller, preventing accidental deletion while the object is in use by an extension or controller deployment.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@hugo/content/blog/2026/07/07-23-referencing-secrets-and-configmaps-in-extension-and-controllerdeployment-helm-values.md`
at line 77, Update the finalizer reference in the documentation sentence to use
the exact identifier “gardener.cloud/reference-protection” instead of the
shortened “reference-protection,” while preserving the existing explanation.

@BoHristova

Copy link
Copy Markdown
Contributor

@oliver-goetz, @rfranzke, I had to move the blog post to hugo/content, since website/ doesn't exist anymore (see #1025).

@BoHristova
BoHristova requested a review from oliver-goetz August 6, 2026 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/documentation Documentation related cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. kind/enhancement Enhancement, improvement, extension size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants