Skip to content

transformer: stop double-encoding ConfigMap binaryData - #2143

Open
locker95 wants to merge 1 commit into
kubernetes:mainfrom
locker95:fix/configmap-binarydata-2082
Open

locker95 wants to merge 1 commit into
kubernetes:mainfrom
locker95:fix/configmap-binarydata-2082

Conversation

@locker95

Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind bug

What this PR does / why we need it:

ConfigMap.BinaryData is base64-encoded when the object is printed. Encoding the file bytes first meant something like configs.tar showed up as base64-of-base64, so the mounted file wasn't the original.

Fixtures under configmap-volume now expect one encoding, and a unit test checks that the marshaled value decodes back to the raw bytes.

Which issue(s) this PR fixes:

Fixes #2082

Special notes for your reviewer:

BinaryData is encoded again when the object is printed, so encoding
the file first made the manifest decode to a base64 string.

Signed-off-by: Dean Chen <862469039@qq.com>
@kubernetes-prow kubernetes-prow Bot added kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 25, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: locker95
Once this PR has been reviewed and has the lgtm label, please assign cdrage 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

@kubernetes-prow
kubernetes-prow Bot requested review from TessaIO and cdrage October 25, 2026 07:36
@kubernetes-prow kubernetes-prow Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 25, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. 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.

[BUG] Double base64 encoding in configmap.yaml

1 participant