Skip to content

[BUG] File-to-field-aliases UI handling is incorrect for external node drivers #17065

Description

@fujitsu-domzalskis

Setup

  • Rancher version: 2.13.2
  • Rancher UI Extensions: n/a
  • Browser type & version: Microsoft Edge v146.0.3856.84

Describe the bug
Using annotation nodedriver.cattle.io/file-to-field-aliases in external node drivers (tested specifically on https://github.com/fujitsu/docker-machine-driver-fsas) automatically adds multiline UI annotation io.cattle.nodedriver/ui-field-hints: '{"userdata":{"type":"multiline"}}' but input field remains one-line string field. Also "\n" is not interpreted as newline character.

To Reproduce

  1. Import external node driver which uses annotation nodedriver.cattle.io/file-to-field-aliases.
  2. Navigate to Cluster Management > Create > Imported Node Driver ("fsas" in tested scenario).
  3. Create dummy cloud credentials.
  4. Navigate to Machine Pools > userdata parameter.
  5. Try to insert there multiline YAML file with custom userdata.

Result

New line character is ignored.

Expected Result
Multiline input field which allows inserting YAML files or possibility to upload a file instead of text input.

Screenshots
Import of external node driver on "local" cluster:
Image

YAML of node driver resource after it was important - ui field hint automatically added:
Image

Dummy cloud credentials:
Image

Attempt to insert multiline input to "userdata" field (typed "test" + Enter + Shift&Enter + "test"):
Image

Element inspect:
Image

Additional context
We confirmed that the kubectl patch command from the PR Replaces hardcoded schema-driver field mappings with annotation-based configuration by apoorvajagtap · Pull Request #50520 · rancher/rancher worked correctly — custom userdata was applied alongside the generated one but this is not solution or even a workaround for users.

@richard-cox was notified about this issue via email before creating it.

Metadata

Metadata

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions