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

Prometheus CRDS validation failing post upgrade #294

Open
varunthakur2480 opened this issue Oct 9, 2024 · 7 comments
Open

Prometheus CRDS validation failing post upgrade #294

varunthakur2480 opened this issue Oct 9, 2024 · 7 comments

Comments

@varunthakur2480
Copy link

I have been trying to upgrade to Prometheus v0.14 https://github.com/prometheus-operator/kube-prometheus/tree/release-0.14 but my pipelines fail during kubeconfm validation .
With following error
stdin - CustomResourceDefinition prometheuses.monitoring.coreos.com failed validation: error unmarshalling resource: error converting YAML to JSON: yaml: line 1737: did not find expected key
I have tried skipping the crds using -skip "monitoring.coreos.com/v1,monitoring.coreos.com/v1alpha1"
which does not seem to work , its worth mentioning that the validation fails even if I remove the schemas from validation path with same error and I also have --ignore-missing-schemas enabled
which leads me to believe that kubeconfm is actually failing before it can even start to match the schema

@varunthakur2480
Copy link
Author

I have an update to share:
We were using kustomize command to generate the yaml config and passing it onto kubeconform directly like this
` - alias kubeconform='kubeconform -schema-location "/usr/local/share/kubernetes-json-schema/master-standalone/{{ .ResourceKind }}{{ .KindSuffix }}.json" -schema-location "/usr/local/share/custom-json-schema/{{ .ResourceKind }}-{{ .ResourceAPIVersion }}.json" -ignore-missing-schemas -verbose -summary '

kustomize build . | kuebconform`

However it was constantly failing with
stdin - CustomResourceDefinition prometheuses.monitoring.coreos.com failed validation: error unmarshalling resource: error converting YAML to JSON: yaml: line 1737: did not find expected key

Playing around I decided to save the output first to a file and then run kubeconform against that file
`

  • alias kubeconform='kubeconform -schema-location "/usr/local/share/kubernetes-json-schema/master-standalone/{{ .ResourceKind }}{{ .KindSuffix }}.json" -schema-location "/usr/local/share/custom-json-schema/{{ .ResourceKind }}-{{ .ResourceAPIVersion }}.json" -ignore-missing-schemas -verbose -summary '
    kustomize build . > dev.yaml
    kuebconform dev.yaml
    `
    which fixed the issue and started ignoring the prometheus-v1.json validation
    I'm not sure what was the issue with first command though

@TomHellier
Copy link

TomHellier commented Dec 4, 2024

I think I'm seeing the same with clusterpolicies.kyverno.io, which is another very long CRD.

I've got a very arcane bash build tool that I'm trying to get a reproducer for at the moment, I'll let you know

@yannh
Copy link
Owner

yannh commented Dec 4, 2024

@TomHellier could you share the URL of the CRD and a test file to validate? if I can reproduce this easily that would make this much easier to fix 👍

@TomHellier
Copy link

TomHellier commented Dec 4, 2024

I think this must be a race condition, I've got a reproducer but am unwilling to share it as it contains all of the kubernetes manifests our cluster runs on.

If I change validator.go to output the res.Bytes, The part of the CRD which is reliably failing on is https://github.com/kyverno/kyverno/blob/main/config/crds/kyverno/kyverno.io_clusterpolicies.yaml#L13183

From "e ANDed together.",

It doesn't fire every single time, and the error changes each time:
CustomResourceDefinition clusterpolicies.kyverno.io failed validation: error unmarshalling resource: error converting YAML to JSON: yaml: line 1699: could not find expected ':', e ANDed togeth
CustomResourceDefinition clusterpolicies.kyverno.io failed validation: error unmarshalling resource: error converting YAML to JSON: yaml: line 2019: could not find expected ':', e ANDed togeth
CustomResourceDefinition clusterpolicies.kyverno.io failed validation: error unmarshalling resource: error converting YAML to JSON: yaml: line 1870: could not find expected ':', e ANDed togeth
CustomResourceDefinition clusterpolicies.kyverno.io failed validation: error unmarshalling resource: error converting YAML to JSON: yaml: line 1898: did not find expected key, e ANDed together.

Resolutions:

  • Run with NumberOfWorkers set to 1
  • Increase the amount of memory to 8MB starting buffer - but this requires code change

It is strange that the changing maxBufSize doesn't seem to have an impact, but I suspect there is some odd goroutine stuff going on here when attempting to parse very large custom resources, when someone is passing in a very large (40MB worth of kubernetes manifests) into stdout.

As changing the number of workers is in my control, I'll do that, but I'd suggest increasing the size of the starting buffer as well as it perhaps isn't growing the way you'd expect.

I don't know if @varunthakur2480 was seeing the same problem as me, but I was getting the same error.

@yannh
Copy link
Owner

yannh commented Dec 4, 2024

Are you a bit familiar with go? Could you run kubeconform using "go run" and -race ? it should output a trace when running in a race condition (if that is the problem), which would help me understand what might be happening.

@TomHellier
Copy link

TomHellier commented Dec 4, 2024

@yannh took a while, but here you go:

note - this was ran with -n 100 for number of workers, I'm trying to get it to reproduce with -n 4 atm.

==================
WARNING: DATA RACE
Write at 0x00c0003de580 by goroutine 8:
  runtime.racewriterange()
      <autogenerated>:1 +0x24
  internal/poll.ignoringEINTRIO()
      /usr/local/go/src/internal/poll/fd_unix.go:736 +0x49a
  internal/poll.(*FD).Read()
      /usr/local/go/src/internal/poll/fd_unix.go:160 +0x1e5
  os.(*File).read()
      /usr/local/go/src/os/file_posix.go:29 +0xac
  os.(*File).Read()
      /usr/local/go/src/os/file.go:118 +0x89
  bufio.(*Scanner).Scan()
      /usr/local/go/src/bufio/scan.go:219 +0x13e1
  github.com/yannh/kubeconform/pkg/resource.FromStream.func1()
      /home/tomh/projects/github.com/kubeconform/pkg/resource/stream.go:59 +0x20e

Previous read at 0x00c0003de583 by goroutine 38:
  runtime.slicecopy()
      /usr/local/go/src/runtime/slice.go:325 +0x0
  sigs.k8s.io/yaml/goyaml%2ev2.yaml_string_read_handler()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/apic.go:45 +0x104
  sigs.k8s.io/yaml/goyaml%2ev2.yaml_parser_update_raw_buffer()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/readerc.go:77 +0x3c7
  sigs.k8s.io/yaml/goyaml%2ev2.yaml_parser_determine_encoding()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/readerc.go:28 +0x9c
  sigs.k8s.io/yaml/goyaml%2ev2.yaml_parser_update_buffer()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/readerc.go:117 +0x124
  sigs.k8s.io/yaml/goyaml%2ev2.yaml_parser_fetch_next_token()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/scannerc.go:654 +0x6b
  sigs.k8s.io/yaml/goyaml%2ev2.yaml_parser_fetch_more_tokens()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/scannerc.go:642 +0x45b
  sigs.k8s.io/yaml/goyaml%2ev2.peek_token()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/parserc.go:47 +0x74
  sigs.k8s.io/yaml/goyaml%2ev2.yaml_parser_parse_stream_start()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/parserc.go:175 +0x86
  sigs.k8s.io/yaml/goyaml%2ev2.yaml_parser_state_machine()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/parserc.go:98 +0x65
  sigs.k8s.io/yaml/goyaml%2ev2.yaml_parser_parse()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/parserc.go:72 +0xed
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).expect()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:84 +0x79
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).init()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:69 +0x5c
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).parse()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:142 +0x38
  sigs.k8s.io/yaml/goyaml%2ev2.unmarshal()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/yaml.go:142 +0x544
  sigs.k8s.io/yaml/goyaml%2ev2.Unmarshal()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/yaml.go:81 +0x51
  sigs.k8s.io/yaml.yamlToJSONTarget()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/yaml.go:159 +0x9d
  sigs.k8s.io/yaml.unmarshal()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/yaml.go:72 +0xcc
  sigs.k8s.io/yaml.Unmarshal()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/yaml.go:56 +0x95
  github.com/yannh/kubeconform/pkg/validator.(*v).ValidateResource()
      /home/tomh/projects/github.com/kubeconform/pkg/validator/validator.go:144 +0x1de
  main.kubeconform.func1()
      /home/tomh/projects/github.com/kubeconform/cmd/kubeconform/main.go:114 +0x179
  main.kubeconform.gowrap2()
      /home/tomh/projects/github.com/kubeconform/cmd/kubeconform/main.go:117 +0x6e

Goroutine 8 (running) created at:
  github.com/yannh/kubeconform/pkg/resource.FromStream()
      /home/tomh/projects/github.com/kubeconform/pkg/resource/stream.go:49 +0x1d0
  main.kubeconform()
      /home/tomh/projects/github.com/kubeconform/cmd/kubeconform/main.go:103 +0x67e
  main.main()
      /home/tomh/projects/github.com/kubeconform/cmd/kubeconform/main.go:182 +0x357

Goroutine 38 (running) created at:
  main.kubeconform()
      /home/tomh/projects/github.com/kubeconform/cmd/kubeconform/main.go:112 +0x831
  main.main()
      /home/tomh/projects/github.com/kubeconform/cmd/kubeconform/main.go:182 +0x357
==================
stdin - CustomResourceDefinition clusterpolicies.kyverno.io failed validation: error unmarshalling resource: error converting YAML to JSON: yaml: line 564: did not find expected key
==================
WARNING: DATA RACE
Write at 0x00c0003e636d by goroutine 8:
  runtime.racewriterange()
      <autogenerated>:1 +0x24
  internal/poll.ignoringEINTRIO()
      /usr/local/go/src/internal/poll/fd_unix.go:736 +0x49a
  internal/poll.(*FD).Read()
      /usr/local/go/src/internal/poll/fd_unix.go:160 +0x1e5
  os.(*File).read()
      /usr/local/go/src/os/file_posix.go:29 +0xac
  os.(*File).Read()
      /usr/local/go/src/os/file.go:118 +0x89
  bufio.(*Scanner).Scan()
      /usr/local/go/src/bufio/scan.go:219 +0x13e1
  github.com/yannh/kubeconform/pkg/resource.FromStream.func1()
      /home/tomh/projects/github.com/kubeconform/pkg/resource/stream.go:59 +0x20e

Previous read at 0x00c0003e6368 by goroutine 38:
  runtime.slicecopy()
      /usr/local/go/src/runtime/slice.go:325 +0x0
  sigs.k8s.io/yaml/goyaml%2ev2.yaml_string_read_handler()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/apic.go:45 +0x104
  sigs.k8s.io/yaml/goyaml%2ev2.yaml_parser_update_raw_buffer()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/readerc.go:77 +0x3c7
  sigs.k8s.io/yaml/goyaml%2ev2.yaml_parser_update_buffer()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/readerc.go:142 +0x4d5
  sigs.k8s.io/yaml/goyaml%2ev2.yaml_parser_scan_to_next_token()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/scannerc.go:1466 +0xb17
  sigs.k8s.io/yaml/goyaml%2ev2.yaml_parser_fetch_next_token()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/scannerc.go:664 +0xaa
  sigs.k8s.io/yaml/goyaml%2ev2.yaml_parser_fetch_more_tokens()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/scannerc.go:642 +0x45b
  sigs.k8s.io/yaml/goyaml%2ev2.peek_token()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/parserc.go:47 +0x319
  sigs.k8s.io/yaml/goyaml%2ev2.yaml_parser_parse_block_mapping_value()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/parserc.go:741 +0x32a
  sigs.k8s.io/yaml/goyaml%2ev2.yaml_parser_state_machine()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/parserc.go:137 +0x212
  sigs.k8s.io/yaml/goyaml%2ev2.yaml_parser_parse()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/parserc.go:72 +0xed
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).peek()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:105 +0x64
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).parse()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:143 +0x77
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).mapping()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:217 +0x28e
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).parse()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:149 +0xf5
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).mapping()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:217 +0x28e
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).parse()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:149 +0xf5
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).mapping()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:217 +0x28e
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).parse()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:149 +0xf5
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).mapping()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:217 +0x28e
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).parse()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:149 +0xf5
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).mapping()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:217 +0x28e
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).parse()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:149 +0xf5
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).mapping()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:217 +0x28e
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).parse()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:149 +0xf5
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).mapping()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:217 +0x28e
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).parse()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:149 +0xf5
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).mapping()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:217 +0x28e
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).parse()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:149 +0xf5
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).mapping()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:217 +0x28e
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).parse()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:149 +0xf5
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).mapping()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:217 +0x28e
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).parse()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:149 +0xf5
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).mapping()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:217 +0x28e
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).parse()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:149 +0xf5
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).mapping()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:217 +0x28e
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).parse()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:149 +0xf5
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).mapping()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:217 +0x28e
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).parse()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:149 +0xf5
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).mapping()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:217 +0x28e
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).parse()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:149 +0xf5
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).mapping()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:217 +0x28e
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).parse()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:149 +0xf5
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).mapping()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:217 +0x28e
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).parse()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:149 +0xf5
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).mapping()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:217 +0x28e
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).parse()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:149 +0xf5
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).sequence()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:206 +0x279
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).parse()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:151 +0x119
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).mapping()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:217 +0x28e
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).parse()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:149 +0xf5
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).mapping()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:217 +0x28e
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).parse()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:149 +0xf5
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).document()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:175 +0x1f3
  sigs.k8s.io/yaml/goyaml%2ev2.(*parser).parse()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go:153 +0xb9
  sigs.k8s.io/yaml/goyaml%2ev2.unmarshal()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/yaml.go:142 +0x544
  sigs.k8s.io/yaml/goyaml%2ev2.Unmarshal()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/goyaml.v2/yaml.go:81 +0x51
  sigs.k8s.io/yaml.yamlToJSONTarget()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/yaml.go:159 +0x9d
  sigs.k8s.io/yaml.unmarshal()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/yaml.go:72 +0xcc
  sigs.k8s.io/yaml.Unmarshal()
      /home/tomh/projects/github.com/kubeconform/vendor/sigs.k8s.io/yaml/yaml.go:56 +0x95
  github.com/yannh/kubeconform/pkg/validator.(*v).ValidateResource()
      /home/tomh/projects/github.com/kubeconform/pkg/validator/validator.go:144 +0x1de
  main.kubeconform.func1()
      /home/tomh/projects/github.com/kubeconform/cmd/kubeconform/main.go:114 +0x179
  main.kubeconform.gowrap2()
      /home/tomh/projects/github.com/kubeconform/cmd/kubeconform/main.go:117 +0x6e

Goroutine 8 (running) created at:
  github.com/yannh/kubeconform/pkg/resource.FromStream()
      /home/tomh/projects/github.com/kubeconform/pkg/resource/stream.go:49 +0x1d0
  main.kubeconform()
      /home/tomh/projects/github.com/kubeconform/cmd/kubeconform/main.go:103 +0x67e
  main.main()
      /home/tomh/projects/github.com/kubeconform/cmd/kubeconform/main.go:182 +0x357

Goroutine 38 (running) created at:
  main.kubeconform()
      /home/tomh/projects/github.com/kubeconform/cmd/kubeconform/main.go:112 +0x831
  main.main()
      /home/tomh/projects/github.com/kubeconform/cmd/kubeconform/main.go:182 +0x357

@yannh
Copy link
Owner

yannh commented Dec 4, 2024

This is perfect thank you so much! I ll try to fix this when i find some time 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants