Skip to content

assets: replace embedded base64 blobs with plain files and template encoding#186

Open
tiraboschi wants to merge 1 commit into
openshift-virtualization:mainfrom
tiraboschi:ref_files
Open

assets: replace embedded base64 blobs with plain files and template encoding#186
tiraboschi wants to merge 1 commit into
openshift-virtualization:mainfrom
tiraboschi:ref_files

Conversation

@tiraboschi
Copy link
Copy Markdown
Collaborator

Extract the three opaque base64/gzip payloads from 01-swap-enable.yaml into readable plain-text files under assets/active/machine-config/01-swap-enable/. Convert the asset to a template that encodes them at render time via readAsset | b64enc (kubelet config) and readAsset | gzip | b64enc (Python scripts).

Add readAsset and gzip as custom template functions. readAsset is a package-level helper that reads directly from the embedded FS, prepending active/ internally so templates use clean relative paths. gzip is needed because sprig v3.3.0 does not include it.

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 19, 2026

[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 tiraboschi 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

@tiraboschi
Copy link
Copy Markdown
Collaborator Author

/rebase

…ncoding

Extract the three opaque base64/gzip payloads from 01-swap-enable.yaml
into readable plain-text files under assets/active/machine-config/01-swap-enable/.
Convert the asset to a template that encodes them at render time via
readAsset | b64enc (kubelet config) and readAsset | gzip | b64enc (Python scripts).

Add readAsset and gzip as custom template functions. readAsset is a
package-level helper that reads directly from the embedded FS, prepending
active/ internally so templates use clean relative paths. gzip is needed
because sprig v3.3.0 does not include it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Simone Tiraboschi <stirabos@redhat.com>
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