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

Kustomize fails rendering Baremetal Operator function #542

Closed
teoyaomiqui opened this issue May 4, 2021 · 2 comments
Closed

Kustomize fails rendering Baremetal Operator function #542

teoyaomiqui opened this issue May 4, 2021 · 2 comments
Labels
bug Something isn't working triage Needs evaluation by project members

Comments

@teoyaomiqui
Copy link
Contributor

teoyaomiqui commented May 4, 2021

Describe the bug
Baremetal Operator function fails when rendering or building by kustomize with error:

Error: map[string]interface {}{"apiVersion":"v1", "data":map[string]interface {}{"API_WORKERS":"4", "AUTOMATED_CLEAN":"true", "DEPLOY_KERNEL_PATH":"/images/ipa-ubuntu-master.kernel", "DEPLOY_RAMDISK_PATH":"/images/ipa-ubuntu-master.initramfs", "DHCP_RANGE":"192.168.10.200,192.168.10.250", "FAST_TRACK":"false", "HTTP":"80", "HTTPS_PROXY":"", "HTTP_PROXY":"", "IRONIC_HOST_PATH":"/opt/metal3-dev-env/ironic/", "IRONIC_STORAGE_CLASS_NAME":"default", "IRONIC_VOLUME_CAPACITY":"10Gi", "NO_PROXY":"", "PROVISIONING_INTERFACE":"pxe", "PROVISIONING_IP":"192.168.10.100", "http_proxy":"", "https_proxy":"", "no_proxy":""}, "kind":"ConfigMap", "metadata":map[string]interface {}{"labels":interface {}(nil), "name":"ironic-vars", "namespace":"metal3"}}: yaml: invalid trailing UTF-8 octet

Suspected root cause
Kustomize fails to handle quotes like this even if they are in the comments.

Steps To Reproduce

  1. clone airshipctl master repository
  2. Install kustomize binary
  3. run kustomize build manifests/function/baremetal-operator/ --enable-alpha-plugins

Expected behavior
Kustomize successfully rendering yaml documents

Steps to Fix
Change quotes to " in baremetal function:

  # IRONIC_AUTOMATED_CLEAN: “false”

https://github.com/airshipit/airshipctl/blob/master/manifests/function/baremetal-operator/ironic-vars.yaml#L33

Environment

  • airshipctl Version: master branch: commit hash: ab7bbfc
  • Operating System: Linux Ubuntu 20.04.1 LTS
  • Kernel version: 5.4.0-72-generic
  • Kubernetes Version: N/A
  • Kustomize version: v4.0.5
  • Go version: 1.16.3
  • Hardware specs (e.g. 4 vCPUs, 16GB RAM, bare metal vs VM): N/A
@teoyaomiqui teoyaomiqui added bug Something isn't working triage Needs evaluation by project members labels May 4, 2021
@airshipbot
Copy link

airshipbot commented May 4, 2021

Related Change #789430

Subject: Use correct quotes in BMO manifests
Link: https://review.opendev.org/c/airship/airshipctl/+/789430
Status: MERGED
Owner: Kostyantyn Kalynovskyi (kkalynovskyi@mirantis.com)

This change will close this issue when merged.

Approvals

Code-Review
+2 Dmitry Ukov
+1 Alexey
+2 Ian Howell
Verified
+1 ATT Airship2.0 CI
+2 Zuul
Workflow
+1 Ian Howell

Last Updated: 2021-05-04 13:39:37 CDT

@aodinokov
Copy link

Seems like a known issue in kustomize, e.g. kubernetes-sigs/kustomize#3778

the attempt to fix that was done here (tried to update go-yaml, but this resulted in other issues)
kubernetes-sigs/kustomize#3789

so far the root-cause isn't fixed and we probably just need to keep our manifests in a state so kustomize would pass as @teoyaomiqui made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Needs evaluation by project members
Projects
None yet
Development

No branches or pull requests

3 participants