-
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
Support for integer keys #3446
Comments
We have issues in 3.9.0. Please try 3.9.1. |
@Shell32-Natsu can you shed some light on this? I'm using I find it very hard to keep up with kustomize upstream changes, there is no changelog expect for a list of commits. For Flux users is even harder, with error outputs like |
This issue is still present in API v0.7.2 as well |
This turns out to be a bug in Having a custom resource with an integer key: apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: podinfo
spec:
interval: 5m
chart:
spec:
chart: podinfo
sourceRef:
kind: HelmRepository
name: podinfo
values:
tcp:
8080: "default/example-tcp-svc:9000" Fails with:
Works with:
Version:
What I find really concerning is that users have no way to identify the object/resource/file when kustomize build fails. @Shell32-Natsu what is the recommend way to debug this when you have hundreds of manifests? |
Workaround for upstream bug: kubernetes-sigs/kustomize#3446 Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Workaround for upstream bug: kubernetes-sigs/kustomize#3446 Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Workaround for upstream bug: kubernetes-sigs/kustomize#3446 Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Workaround for upstream bug: kubernetes-sigs/kustomize#3446 Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
@stefanprodan Thanks for the information. I can reproduce it now. Will investigate it. |
Is there any chance you can add in the logging of the filename that kicks back the exception as well, please? |
This issue is triggered by incompatibility between YAML marshal and unmarshal. I will create a PR to add the resources that causes this error to the error message. More details about this issue: When kustomize is trying to get the YAML bytes from a resource, it will convert the resource into a |
After we delete the apimachinery codes we can get the YAML bytes from the RNode directly so this can be fixed. |
I have the same issue when using example code from https://istio.io/latest/docs/reference/config/security/peer_authentication: apiVersion: security.istio.io/v1beta1 kind: PeerAuthentication metadata: name: default namespace: foo spec: selector: matchLabels: app: finance mtls: mode: STRICT portLevelMtls: 8080: mode: DISABLE I'm also using similar code myself, and my only workaround right now is to stop using Kustomize for this particular deployment - or downgrade Kustomize. The argument --enable_kyaml=false doesn't seem to be a valid anymore. |
Thank you @HansK-p for your comment as you helped identify (for me) what I need to do to work around the bug. The Edit: Just fully read #3446 (comment) - sorry about the spam. |
And thank you. I feel a bit stupid not testing that myself. |
PR #4604 fixes this, could someone review it? |
Properly handles cases where the YAML is not valid JSON, such as maps with integer keys (kubernetes-sigs#3446).
Properly handles cases where the YAML is not valid JSON, such as maps with integer keys (kubernetes-sigs#3446).
@alexdyas
? |
Hi @Akay7, The only work around I've found at the moment is to use an older version of kustomize. We're using v3.8.10. However beware that there are various unrelated bugs in this version, so check the output. Hope that helps. Alex |
Quoting the integer key seemed to work for our ingress tcp configmap. |
Nginx-ingress quoting port under udp section due to this bug kubernetes-sigs/kustomize#3446
Nginx-ingress quoting port under udp section due to this bug kubernetes-sigs/kustomize#3446
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 |
/remove-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 |
/remove-lifecycle stale |
This doesn't seem to work, though the
|
@natasha41575 please add back to core usability bugs. nginx-ingress-controller might have monkey patched around the issue but it still persists. |
+1 |
a year have passed, any update? |
Attempting to build Knative config with 3.9.0 on Manjaro Linux produces the error
Error: json: unsupported type: map[interface {}]interface {}
.Kustomize 3.8 will successfully build.
The text was updated successfully, but these errors were encountered: