Closed cr7258 closed 6 months ago
Good Catch! This is as expected, as fixing this issue in the latest version (KCL v0.8) resulted in https://github.com/kcl-lang/kcl/issues/1061 Therefore, in version 0.8 of kcl, we should appropriately fix the configuration code. PRs welcome! ❤️
template.spec.containers = [
{
"name" = name # Quote the name attribute instead of name = name
Or we can change this code like this and add a unit test case for the kubernetes_render.k
file and ensure the container name attribute must be name and its value must equal to guest book.
I've opened a PR #304 to fix this. Could you help review it? Thank you!
Bug Report
I'm practicing the tutorial according to this guide: Implement GitOps with KCL and ArgoCD. However, the deployment manifest can't be applied to the cluster properly with the following error:
After checking the YAML, I found that the container name variable was not rendered correctly. The expected output was
name: guestbook
instead ofguestbook: guestbook
.It seems the kcllang/kcl:latest docker image has problems processing variables or is outdated.
1. Minimal reproduce step (Required)
Run locally:
Using kcllang/kcl:latest docker image:
2. What did you expect to see? (Required)
The variable should be rendered as
name: guestbook
when use the kcllang/kcl:latest docker image.3. What did you see instead (Required)
4. What is your KCL components version? (Required)
KCL local version v0.7.5 KCL docker version v0.8.0-beta.1