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

YAML output of machine config incorrectly formatted for multidoc configurations #8687

Open
Tracked by #8484
steverfrancis opened this issue May 2, 2024 · 2 comments

Comments

@steverfrancis
Copy link
Collaborator

Bug Report

Multidoc YAML configurations after the first document are incorrectly indented 4 spaces

Description

if you edit the machine config and append a new document for the ingress firewall rules, it displays correctly with talosctl edit mc, but the output of talosctl get mc will show the documents after the first YAML doc incorrectly indented, which breaks processing with yq.

The multi-docs are applied correctly by Talos - it is just in display they are mal-formatted.

Logs

e.g. append a YAML document End via editing the machine config thus:

  #       apiVersion: v1
  #       kind: Namespace
  #       metadata:
  #             name: ci
    
... 

and it will show thus via get mc -o yaml

      #       apiVersion: v1
      #       kind: Namespace
      #       metadata:
      #       	name: ci
    
    ...

Environment

  • Talos version: 1.7
  • Kubernetes version: [kubectl version --short]
  • Platform:
  • This happens with talosctl and also omnictl get redactedclustermachineconfig
@smira
Copy link
Member

smira commented May 2, 2024

Yes, this is true. We don't have an easy answer for it, so we need to figure out what to do for it, as it won't an easy answer.

@smira
Copy link
Member

smira commented May 2, 2024

A workaround for now is to do talosctl read /system/state/config.yaml which will return correct multi-doc YAML

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants