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

fix(helm): image repo transformation yielding invalid yaml string syntax #4447

Merged
merged 1 commit into from
Mar 26, 2024

Conversation

st3iny
Copy link
Member

@st3iny st3iny commented Mar 26, 2024

Did not test the update script! Please verify syntax etc.!

Helm fails to install the release: Error: YAML parse error on [...]: error converting YAML to JSON: yaml: line 42: did not find expected key

Broken

image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.NEXTCLOUD_IMAGE_ORG }}"/foo-bar:baz

Working

image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.NEXTCLOUD_IMAGE_ORG }}/foo-bar:baz"

Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
@st3iny st3iny added 3. to review Waiting for reviews bug Something isn't working labels Mar 26, 2024
@st3iny st3iny requested a review from szaimen March 26, 2024 12:44
@st3iny st3iny self-assigned this Mar 26, 2024
@szaimen
Copy link
Collaborator

szaimen commented Mar 26, 2024

@st3iny do you know if there is some helm linting workflow available somewhere?

Copy link
Collaborator

@szaimen szaimen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@szaimen szaimen added this to the next milestone Mar 26, 2024
@szaimen szaimen merged commit 03f9288 into main Mar 26, 2024
3 checks passed
@szaimen szaimen deleted the fix/helm/mirror-prefix branch March 26, 2024 12:51
@st3iny
Copy link
Member Author

st3iny commented Mar 26, 2024

You could run helm lint 😄

$ helm lint
==> Linting .
[INFO] Chart.yaml: icon is recommended
[ERROR] templates/nextcloud-enterprise-database-deployment.yaml: unable to parse YAML: error converting YAML to JSON: yaml: line 66: did not find expected key
[ERROR] templates/nextcloud-enterprise-imaginary-deployment.yaml: unable to parse YAML: error converting YAML to JSON: yaml: line 31: did not find expected key
[ERROR] templates/nextcloud-enterprise-notify-push-deployment.yaml: unable to parse YAML: error converting YAML to JSON: yaml: line 54: did not find expected key
[ERROR] templates/nextcloud-enterprise-redis-deployment.yaml: unable to parse YAML: error converting YAML to JSON: yaml: line 43: did not find expected key

Error: 1 chart(s) linted, 1 chart(s) failed

@szaimen
Copy link
Collaborator

szaimen commented Mar 26, 2024

You could run helm lint 😄

$ helm lint
==> Linting .
[INFO] Chart.yaml: icon is recommended
[ERROR] templates/nextcloud-enterprise-database-deployment.yaml: unable to parse YAML: error converting YAML to JSON: yaml: line 66: did not find expected key
[ERROR] templates/nextcloud-enterprise-imaginary-deployment.yaml: unable to parse YAML: error converting YAML to JSON: yaml: line 31: did not find expected key
[ERROR] templates/nextcloud-enterprise-notify-push-deployment.yaml: unable to parse YAML: error converting YAML to JSON: yaml: line 54: did not find expected key
[ERROR] templates/nextcloud-enterprise-redis-deployment.yaml: unable to parse YAML: error converting YAML to JSON: yaml: line 43: did not find expected key

Error: 1 chart(s) linted, 1 chart(s) failed

okay you mean during the helm publish workflow?

@st3iny
Copy link
Member Author

st3iny commented Mar 26, 2024

You could run helm lint 😄

$ helm lint
==> Linting .
[INFO] Chart.yaml: icon is recommended
[ERROR] templates/nextcloud-enterprise-database-deployment.yaml: unable to parse YAML: error converting YAML to JSON: yaml: line 66: did not find expected key
[ERROR] templates/nextcloud-enterprise-imaginary-deployment.yaml: unable to parse YAML: error converting YAML to JSON: yaml: line 31: did not find expected key
[ERROR] templates/nextcloud-enterprise-notify-push-deployment.yaml: unable to parse YAML: error converting YAML to JSON: yaml: line 54: did not find expected key
[ERROR] templates/nextcloud-enterprise-redis-deployment.yaml: unable to parse YAML: error converting YAML to JSON: yaml: line 43: did not find expected key

Error: 1 chart(s) linted, 1 chart(s) failed

okay you mean during the helm publish workflow?

I could also imagine a separate workflow lint-helm.yaml that is required for merges. Could even be made conditional (only on changes in nextcloud-enterprise-helm-chart/**) to save some CI time.

@st3iny
Copy link
Member Author

st3iny commented Mar 26, 2024

We actually have such a workflow but it doesn't seem to run anymore. I'll investigate.

@st3iny
Copy link
Member Author

st3iny commented Mar 26, 2024

It was disabled manually it seems.

@szaimen
Copy link
Collaborator

szaimen commented Mar 26, 2024

Lets for now add it to the helm release workflow: #4450

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants