-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Inconsistent configmap multiline string output between kustomize versions #3830
Comments
/triage accepted |
I also experienced this problem. Not sure what exactly triggers it the switch of the output, but in my testing, simply adding an additional I expect kustomize to always retain the same string syntax/format as the source. I've tested with various version from v.3.9.2 to the latest v.4.4.0 and they all have this problem. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
I encountered this issue today and I discovered one of the files I was loading via I notice the last line of your grafana2.txt file contains a space at the end of the line: "# Sets the maximum time in minutes before timing out read of an incoming request and closing idle connections. " After I removed that space it also fixed the Maybe configMapGenerator thinks it needs to use the quoted version of the string in order to preserve spaces at the end of lines? If spaces at the end of lines are not important for your files, then the workaround is to just remove these spaces. |
I discovered tab characters in the |
I've also seen multiline block conversions of
apiVersion: apps/v1
kind: Deployment
metadata:
name: meh
spec:
template:
spec:
containers:
- image: alpine
name: meh
command:
- /bin/sh
- -c
- >
touch foo bar;
mkdir catpants;
cp foo \
bar \
catpants;
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- meh.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: meh
spec:
template:
spec:
containers:
- command:
- /bin/sh
- -c
- |
touch foo bar;
mkdir catpants; cp foo \
bar \
catpants;
image: alpine
name: meh Notice how the |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closing this issue. In response to this:
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. |
Encountered a file that had emoji characters that also triggered the behavior |
I have the same issue, using a ConfigMapGenerator with around 30 files, and the generated ConfigMap switches around the order of some pieces of text every time (the text in some files is identical, which may contribute to the issue). This causes |
Inconsistent multiline string handling between versions of kustomize make it difficult to see the real changes that are being applied. I am not sure if there are "rules" that kustomize is using in the yaml output and where they might be published, but the large change-sets this introduces are hard to reconcile, and give pause to operators when there has not been any actual changes.
@stefanprodan mentions this in #3559 here where his is told that it is a separate issue.
Here is a set of files I was able to reproduce with using the example grafana.ini file:
grafana1.txt
grafana2.txt
kustomization.yaml.txt
The issue seems to surround overall length of files used in configmaps, but I have not been able to figure out exactly what is going on.
kustomize 3.5.4 output
kustomize 3.10.0 output
kustomize 4.1.2 output
Platform
macOS
The text was updated successfully, but these errors were encountered: