Error converting YAML to JSON when using additionalVolumes
Closed this issue · 8 comments
Hi, I encountered issue with error message: Error: UPGRADE FAILED: YAML parse error on home-assistant/templates/statefulset.yaml: error converting YAML to JSON: yaml: line 53: did not find expected key
I tried looing into the statefulset.yaml
but found nothing suspicious on related lines
my values.yaml are almost default, and work without specifing additional volumes/mounts (I do this for the zigbee dongle).
The specific values causing issues are:
additionalVolumes:
- hostPath:
path: >-
/dev/serial/by-id/usb-Nabu_Casa_SkyConnect_v1.0_1e174f6d9de5ed118383606262c613ac-if00-port0
type: CharDevice
name: usb
additionalMounts:
- mountPath: /dev/ttyUSB0
name: usb
Hi, please double-check your indentation, especially your additionalMounts, it seems there are two extra spaces on each line.
thanks for the quick response. I double-checked it, but I use autoformatters, and would be unlikely. Anyway, it was not it.
Ok, it looks like I misread, now I see it seems to be correct. Try this one, this is my current working setup. Just to be sure, that the problem is still the same.
You can use my dongle path, we need to test the yaml parser inside Helm.
additionalVolumes:
- hostPath:
type: CharDevice
path: >-
/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20230509111242-if00
name: usb
# if you need any additional volume mounts, you can define them here
additionalMounts:
- mountPath: /dev/ttyACM0
name: usb
tried those values, but the issue persists. apart from this the yaml is unchanged for the debugging purposes, and commenting out these values fixes the issue.
Assuming you are using the most recent version of the Helm chart, could you please share your values.yaml file and the command you are using to install the chart? Thank you.
Sure. the command I'm running is:
h upgrade home-assistant pajikos/home-assistant -n homeassistant --values=homeassistant/values.yaml
; and the file is here: https://pastebin.com/b1YBaDdn
I found an issue in a case when using emptyDir together with extra volume mounts. Chart released, try helm repo update
and upgrade again.
Thanks, that worked! Solved my issue :)