Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configmapGenerator fails to include files containing valid UTF-8 with control characters #5148

Open
mpol opened this issue Apr 25, 2023 · 4 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@mpol
Copy link

mpol commented Apr 25, 2023

What happened?

Trying to include a valid UTF-8 file containing a control character (eg. \u0093) in a config map results in an error during kustomize build.

What did you expect to happen?

A config map containing the file data with the control character correctly escaped or represented using binaryData.

How can we reproduce it (as minimally and precisely as possible)?

# kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
configMapGenerator:
- files:
  - cfile
  name: cmap
# createcfile.sh
#!/bin/bash
echo $'\xc2\x93' > cfile

Expected output

No response

Actual output

$ kustomize build
Error: map[string]interface {}{"apiVersion":"v1", "data":map[string]interface {}{"cfile":"\u0093\n"}, "kind":"ConfigMap", "metadata":map[string]interface {}{"name":"cmap-bdtdtb6f2c"}}: yaml: control characters are not allowed

Kustomize version

v5.0.1

Operating system

Linux

@mpol mpol added the kind/bug Categorizes issue or PR as related to a bug. label Apr 25, 2023
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

SIG CLI takes a lead on issue triage for this repo, but any Kubernetes member can accept issues by applying the triage/accepted label.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Apr 25, 2023
@natasha41575
Copy link
Contributor

/assign @varshaprasad96

@natasha41575 natasha41575 added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels May 17, 2023
@k8s-triage-robot
Copy link

This issue has not been updated in over 1 year, and should be re-triaged.

You can:

  • Confirm that this issue is still relevant with /triage accepted (org members only)
  • Close this issue with /close

For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/

/remove-triage accepted

@k8s-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. and removed triage/accepted Indicates an issue or PR is ready to be actively worked on. labels May 16, 2024
@mpol
Copy link
Author

mpol commented May 17, 2024

Bug still present in 5.4.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
Development

No branches or pull requests

5 participants