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

YAML to JSON parsing error when using a numeric as a key in a map? #5001

Closed
spstarr opened this issue Jan 26, 2023 · 4 comments
Closed

YAML to JSON parsing error when using a numeric as a key in a map? #5001

spstarr opened this issue Jan 26, 2023 · 4 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/duplicate Indicates an issue is a duplicate of other open issue.

Comments

@spstarr
Copy link

spstarr commented Jan 26, 2023

What happened?

I am trying to apply a Anthos Service Mesh, Istio PeerAuthentication CR and get error:

This is from Config Sync which is running kustomize build to render the output:

Error: error marshaling into JSON: json unsupported type: map[interface {}]interface {} For more information, see https://g.co/cloud/asm-errors#knv1068

However, if I quote the numeric keys then all works as normal. I'm not sure if this is a parsing error in Kustomize.

What did you expect to happen?

The Resource to apply without error.

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

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
helmGlobals:
  chartHome: ../../charts
helmCharts:
- name: myapp
  version: 0.0.1
  releaseName: my-config-connector
  namespace: default
  valuesFile: values-dev.yaml
apiVersion: security.istio.io/v1beta1
kind: PeerAuthentication
metadata:
  name: istio-peerauth
  namespace: mynamespace
spec:
  selector:
    matchLabels:
       app.kubernetes.io/cluster: mynamespace
  portLevelMtls:
    1234:
      mode: PERMISSIVE
    5000:
      mode: PERMISSIVE
    9000:
      mode: PERMISSIVE
  mtls:
    mode: STRICT

Expected output

No response

Actual output

No response

Kustomize version

Config Sync 1.14.0 managed Kustomize

Operating system

Other

@spstarr spstarr added the kind/bug Categorizes issue or PR as related to a bug. label Jan 26, 2023
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Jan 26, 2023
@kamuridesu
Copy link

I have some suspects about what's causing this behavior. Let me check to confirm if I am right.

@spstarr
Copy link
Author

spstarr commented Jan 26, 2023

This is a duplicate of #4928 and I didn't notice ... pending merge

@KnVerey
Copy link
Contributor

KnVerey commented Feb 2, 2023

Agreed, this is a duplicate of either that issue or possibly #3446

/triage duplicate
/close

@k8s-ci-robot k8s-ci-robot added triage/duplicate Indicates an issue is a duplicate of other open issue. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Feb 2, 2023
@k8s-ci-robot
Copy link
Contributor

@KnVerey: Closing this issue.

In response to this:

Agreed, this is a duplicate of either that issue or possibly #3446

/triage duplicate
/close

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.

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. triage/duplicate Indicates an issue is a duplicate of other open issue.
Projects
None yet
Development

No branches or pull requests

4 participants