Skip to content

Conversation

@rdksap
Copy link
Contributor

@rdksap rdksap commented Nov 6, 2025

What this PR does / why we need it:
This PR allows to configure delimiters used by the go template in bootstrapper on individual file level:

  • It introduces a format (comment in the first line of a tempalte) to configure delims. Example:
#?bootstrap {"template": {"delims": {"start": "<<", "end": ">>"}}}
  • A detected delim config is parsed and applied for the templating run of the respective template

  • After detection and application, the delim config comment is removed from the template for further processing

Background:
The bootstrapper uses go templating to create needed manifests in order so setup openmcp landscapes. Additionally, users can add own manifests (i.e. extra-manifests) that the bootstrapper will pick up and put into the gitops structure. The bootstrapper is moving these through its templating, too. However, these manifests can contain own go template syntax (e.g. eso external secret templates) meant to be templated in their own context rather than by the bootstrapper. To avoid such conflicts, we introduce a way to tell the bootstrapper templating which templates to handle, based on the delimiters used on individual file level.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Release note:

Introduces go template delimiter configuration on individual template file level

…delims and cleanup template

On-behalf-of: Radek Schekalla (SAP) <radek.schekalla@sap.com>
Signed-off-by: Radek Schekalla (SAP) <radek.schekalla@sap.com>
On-behalf-of: Radek Schekalla (SAP) <radek.schekalla@sap.com>
Signed-off-by: Radek Schekalla (SAP) <radek.schekalla@sap.com>
reshnm
reshnm previously approved these changes Nov 6, 2025
Copy link
Contributor

@reshnm reshnm left a comment

Choose a reason for hiding this comment

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

Awesome LGTM

On-behalf-of: Radek Schekalla (SAP) <radek.schekalla@sap.com>
Signed-off-by: Radek Schekalla (SAP) <radek.schekalla@sap.com>
@rdksap rdksap merged commit d10dd6e into main Nov 6, 2025
4 checks passed
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.

3 participants