k8s-bake icon indicating copy to clipboard operation
k8s-bake copied to clipboard

Bug: bake fails when Helm Chart source file contains leading (SPDX copyright header) comments

Open edgarvonk opened this issue 1 year ago • 0 comments

What happened?

We want our Helm Chart source files to start with SPDX Copyright header files like:

#
# SPDX-FileCopyrightText: 2024 XXX
# SPDX-License-Identifier: EUPL-1.2+
#

apiVersion: v1
kind: ServiceAccount
[..]

However when we add these to our files the azure/k8s-bake@v3 fails to bake the Helm Chart because it incorrectly prepends the first line after the comments with a # like so:

# Source: templates/serviceaccount.yaml
#
# SPDX-FileCopyrightText: 2024 XXX
# SPDX-License-Identifier: EUPL-1.2+
#apiVersion: v1
kind: ServiceAccount

This seems a bug to me because comments in Helm Chart yaml files are quite normal and should be supported I think?

Version

  • [x] I am using the latest version

Runner

ubuntu-latest

Relevant log output

---
# Source: zaakafhandelcomponent/templates/serviceaccount.yaml
#
# SPDX-FileCopyrightText: 2022 Atos, 2024 Lifely
# SPDX-License-Identifier: EUPL-1.2+
#apiVersion: v1
kind: ServiceAccount

edgarvonk avatar Dec 04 '24 18:12 edgarvonk