jlandowner / helm-chartsnap

Snapshot testing tool for Helm charts
MIT License
44 stars 7 forks source link

Unknow warning #69

Open sofiafernandezmoreno opened 6 months ago

sofiafernandezmoreno commented 6 months ago

First of all, thank you so much for this amazing tool. I'm creating this issue due since several days I'm facing this issue

WARN: failed to recognize a resource. snapshot as Unknown:
---
object:
    apiVersion: helm-chartsnap.jlandowner.dev/v1alpha1
    kind: Unknown
    raw: |
        coalesce.go:286: warning: cannot overwrite table with non table for certificate-exporter.hostPathsExporter.securityContext (map[capabilities:map[drop:[ALL]] readOnlyRootFilesystem:true runAsGroup:0 runAsUser:0])
        coalesce.go:286: warning: cannot overwrite table with non table for certificate-exporter.secretsExporter.securityContext (map[capabilities:map[drop:[ALL]] readOnlyRootFilesystem:true runAsGroup:65534 runAsUser:65534])

I don't know but maybe could be related with the array section this is my values.yaml:

certificate-exporter:
  exposePerCertificateErrorMetrics: true
  exposeRelativeMetrics: true
  secretsExporter:
    securityContext: []    
  hostPathsExporter:
    securityContext: []

My helm version is 3.14.2

jlandowner commented 6 months ago

Hi @sofiafernandezmoreno! Thank you for opening a issue and sorry for my late reply.

Unknown warning is stderr or stdout of the output of helm template command. So it seems the warning of your chart and values.

Can you run helm template command directly with your chart and values and check if the same warning appears?

sofiafernandezmoreno commented 6 months ago

Hi, @jlandowner , Yes, I tested with helm template and it's not showing that warning Thank you for the feedback and for the help

jlandowner commented 6 months ago

OK. I would like to reproduce it in my environment.

Can you share the additional information?