Add namespace to helm template filename

This commit is contained in:
Matt Anson 2022-03-15 15:09:51 +00:00
parent 8f14e9dd2b
commit 865e7e1fac

View File

@ -42,9 +42,10 @@ def main(name, directory):
# For each YAML document in the stdin, write it to a separate file in the given directory
# CRDs go in the crds directory and everything else in the chart's templates directory
for document in yaml.safe_load_all(sys.stdin):
filename = "{}_{}_{}.yaml".format(
filename = "{}_{}_{}_{}.yaml".format(
document["apiVersion"].replace("/", "_"),
document["kind"].lower(),
document["metadata"].get("namespace", ""),
document["metadata"]["name"]
)
if document["kind"] == "CustomResourceDefinition":