Skip to content

docs: Document mount-to-devworkspace-include/exclude annotations#3089

Open
tolusha wants to merge 1 commit intomainfrom
docs/mount-to-devworkspace-include-exclude
Open

docs: Document mount-to-devworkspace-include/exclude annotations#3089
tolusha wants to merge 1 commit intomainfrom
docs/mount-to-devworkspace-include-exclude

Conversation

@tolusha
Copy link
Copy Markdown
Contributor

@tolusha tolusha commented May 7, 2026

What does this pull request change?

Documents the new controller.devfile.io/mount-to-devworkspace-include and controller.devfile.io/mount-to-devworkspace-exclude annotations introduced in devfile/devworkspace-operator#1619. These annotations allow mounting ConfigMaps, Secrets, and PVCs only to specific DevWorkspaces by name pattern.

Updated articles:

  • mounting-secrets.adoc — Added include/exclude annotations to the Optional annotations table
  • mounting-configmaps.adoc — Added include/exclude annotations to the Optional annotations table
  • configuring-a-user-namespace.adoc — Restructured annotation docs as tables (replacing inline YAML blocks) and added include/exclude annotations for ConfigMap, Secret, and PVC sections

What issues does this pull request fix or reference?

Specify the version of the product this pull request applies to

next

Pull Request checklist

The author and the reviewers validate the content of this pull request with the following checklist, in addition to the automated tests.

  • Any procedure:
    • Successfully tested.
  • Any page or link rename:
    • The page contains a redirection for the previous URL.
    • Propagate the URL change in:
  • Builds on Eclipse Che hosted by Red Hat.
  • the Validate language on files added or modified step reports no vale warnings.

Add documentation for the new `controller.devfile.io/mount-to-devworkspace-include`
and `controller.devfile.io/mount-to-devworkspace-exclude` annotations that allow
mounting ConfigMaps, Secrets, and PVCs only to specific DevWorkspaces by name pattern.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tolusha tolusha requested a review from svor May 7, 2026 07:44
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

🎊 Navigate the preview: https://69fc443dd394257722cd3c77--eclipse-che-docs-pr.netlify.app 🎊

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

Click here to review and test in web IDE: Contribute

@tolusha
Copy link
Copy Markdown
Contributor Author

tolusha commented May 7, 2026

@gtrivedi88 Could you review pls?

1 similar comment
@tolusha
Copy link
Copy Markdown
Contributor Author

tolusha commented May 11, 2026

@gtrivedi88 Could you review pls?

Copy link
Copy Markdown
Contributor

@gtrivedi88 gtrivedi88 left a comment

Choose a reason for hiding this comment

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

Documentation Review

Files reviewed: 3 modified documentation files
Issues found: 6 (2 errors, 3 warnings, 1 suggestion)

Category Count
AsciiDoc syntax errors (build-breaking) 2
Information loss (removed WARNING) 1
Technical completeness gaps 2
Wording inconsistency 1

The restructuring from inline YAML blocks to tables is a clear improvement in scannability. Annotation descriptions are technically accurate against the source implementation.

🤖 RHAI docs Claude Code review

.Optional annotations
|===
|Annotation | Description
,
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.

[REQUIRED] Stray , character on this line breaks the table rendering. This should be a blank line (as used in the Secret and PVC tables in this same file) or removed entirely.

Compare with the Secret table below which correctly uses a blank line after the header row.

🤖 RHAI docs Claude review

====

.Additional resources
,* link:https://github.com/devfile/devworkspace-operator/blob/main/docs/additional-configuration.adoc#automatically-mounting-volumes-configmaps-and-secrets[Automatically mounting volumes, configmaps, and secrets]
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.

[REQUIRED] Leading comma before *,* is invalid AsciiDoc list syntax and will break the bullet rendering.

Suggested fix:

* link:https://...

Remove the comma.

🤖 RHAI docs Claude review

| When set to `"true"`, the ConfigMap is retained in a user {namespace} after being deleted from {prod-namespace} namespace.

|`controller.devfile.io/mount-on-start:`
| When set to `"true"`, the ConfigMap is mounted only at workspace start. This prevents workspace restarts when the ConfigMap is created.
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.

The removed [WARNING] block stated that applying a Secret or ConfigMap with the mount-to-devworkspace label restarts all running workspaces by default. That critical safety information is now only implied by this table row ("prevents workspace restarts"), but the default behavior — that restarts DO happen without mount-on-start — is no longer explicitly stated.

Consider adding a NOTE before the first annotations table:

NOTE: By default, creating or modifying a ConfigMap or Secret with the `controller.devfile.io/mount-to-devworkspace: 'true'` label restarts all running workspaces in the namespace. To prevent automatic restarts, set the `controller.devfile.io/mount-on-start: 'true'` annotation.

🤖 RHAI docs Claude review

| When set to `"true"`, the ConfigMap is mounted only at workspace start. This prevents workspace restarts when the ConfigMap is created.

|`controller.devfile.io/mount-to-devworkspace-include:`
| Specifies a comma-separated list of `{devworkspace}` name patterns. When set, the ConfigMap is mounted only to workspaces whose names match at least one pattern.
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.

The description says "name patterns" but does not document what pattern syntax is supported. The source implementation (MatchesWorkspaceTarget in devworkspace-operator) supports: exact match (name), prefix (name*), suffix (*name), contains (*name*), and wildcard (*).

Consider adding a brief note, e.g.:

Patterns support exact match, prefix (name*), suffix (*name), contains (*name*), and wildcard (*).

Also, the behavior when both include and exclude are set is not documented. Per the implementation: a resource is mounted only to workspaces that match the include pattern AND do not match the exclude pattern.

🤖 RHAI docs Claude review

| Specifies a comma-separated list of `{devworkspace}` name patterns. When set, the ConfigMap is mounted only to workspaces whose names match at least one pattern.

|`controller.devfile.io/mount-to-devworkspace-exclude:`
| Specifies a comma-separated list of `{devworkspace}` name patterns. When set, the ConfigMap is mounted to all workspaces except those whose names match a pattern.
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.

[GLOBAL] Wording inconsistency between include and exclude descriptions: include says "match at least one pattern" while exclude says "match a pattern" (singular). Both accept comma-separated lists, so both should say "at least one pattern" for consistency.

This inconsistency repeats in all 3 tables (ConfigMap, Secret, PVC) and in both mounting-configmaps.adoc and mounting-secrets.adoc.

🤖 RHAI docs Claude review

----
controller.devfile.io/mount-on-start: "true"
----
Optional: Use the annotations to configure how the ConfigMap is mounted.
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.

[SUGGESTION] "Use the annotations" — the definite article "the" implies the reader already knows which annotations, but this is their first introduction. Consider: "Use annotations to configure how the ConfigMap is mounted." or "Add the following annotations to configure how the ConfigMap is mounted."

This phrasing repeats for the Secret and PVC sections.

🤖 RHAI docs Claude review

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.

2 participants