-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
kustomize is converting quoted("123") string to non-quoted one due to which resource apply is failing #4146
Comments
/assign |
Seems like the quotes are lost in the yaml library:
|
Thanks @mikebz, that does make sense. If that's the cause, rather than attempting to detect and preserve the quotes from the input, we might need to find a way to change the output style automatically when we can tell (because of OpenAPI) that we have a number-like value in a string field. I'm worried about the cost of doing that though. Or maybe the solution should be in kubectl. This is definitely a painful issue since the Kustomize user can't do anything to force the quotation marks afaict, so I'm going to accept the issue. I'll also keep it in my own backlog, but if anyone has time to look at it soon, please feel free to claim it by posting here. /triage accepted |
If you can live with an ugly workaround you can wrap the quoted number again in single quotes. This preserves all the quotes but does not seem to affect the deployment. |
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 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 |
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 |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". 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. |
/lifecycle frozen |
This issue has not been updated in over 1 year, and should be re-triaged. You can:
For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/ /remove-triage accepted |
We have our product namespace as number so when we are declaring same in kustomization.yaml, we are adding under quotes. Now when we are calling the
kustomize build
it is generating the resource yaml having namespace without quote due to which kubectl apply is failing with errorunable to decode "STDIN": resource.metadataOnlyObject.ObjectMeta: v1.ObjectMeta.Namespace: ReadString: expects " or n, but found 9, error found in #10 byte of ...|mespace":987654321}}|
kustomization.yaml
Expected output
Actual output
Kustomize version
{Version:kustomize/v4.2.0 GitCommit:d53a2ad45d04b0264bcee9e19879437d851cb778 BuildDate:2021-07-01T20:59:51+00:00 GoOs:linux GoArch:amd64}
Platform
Windows WSL-2
Additional context
None
The text was updated successfully, but these errors were encountered: