Skip to content

Node default configuration results in invalid yaml through talm template #58

@CafeLungo

Description

@CafeLungo

I have a worker node, whose network configuration was the default (no modifications needed, dhcp assigned, etc.). The original worker.yaml contained:

...snip...
network: {}
...snip...

When attempting to migrate to using talm, I hit this error when running a command such as: talm --context my_cluster -e <endpoint> -n <node id> template -t templates/worker.yaml (Using the original and unmodified rendered templates and talm chart via talm init).

# talm --context my_cluster -e <endpoint> -n <node id> template -t templates/worker.yaml      
failed to render templates: decode error: yaml: line 40: could not find expected ':'

The debug output resulted in the problem section:

  network:
    hostname: "MYWORKERNODE1"
    nameservers: ["<my.ga.te.way>"]
    
    # -- Discovered interfaces:
    # enp1s0:
    #   hardwareAddr:00:02:c9:de:ad:be
    #   busPath: 0000:01:00.0
    #   driver: mlx4_core
    #   vendor: Mellanox Technologies
    #   product: MT26448 [ConnectX EN 10GigE, PCIe 2.0 5GT/s])
    # enp1s0d1:
    #   hardwareAddr:00:02:c9:de:ad:bf
    #   busPath: 0000:01:00.0
    #   driver: mlx4_core
    #   vendor: Mellanox Technologies
    #   product: MT26448 [ConnectX EN 10GigE, PCIe 2.0 5GT/s])
    interfaces:
    
    []

The problem is the [] being 2 lines below.

Expected result would exclude the interfaces object at all, I think. Or maybe even the whole network object. But, it's possible my worker's configuration isn't entirely valid, either. But it does work as it currently is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions