Skip to content

DRA: deviceClassName field names violate API conventions documentation #132206

Closed
@tenzen-y

Description

@tenzen-y

The RecouseClaim API has deviceClassName fields to reference the DeviceClass resource in the .spec.devices.requests[*].exactly.deviceClass and the .spec.devices.requests[*].firstAvailable.deviceClassName in the following:

  • // DeviceClassName references a specific DeviceClass, which can define
    // additional configuration and selectors to be inherited by this
    // subrequest.
    //
    // A class is required. Which classes are available depends on the cluster.
    //
    // Administrators may use this to restrict which devices may get
    // requested by only installing classes with selectors for permitted
    // devices. If users are free to request anything without restrictions,
    // then administrators can create an empty DeviceClass for users
    // to reference.
    //
    // +required
    DeviceClassName string `json:"deviceClassName" protobuf:"bytes,2,name=deviceClassName"`
  • // DeviceClassName references a specific DeviceClass, which can define
    // additional configuration and selectors to be inherited by this
    // request.
    //
    // A DeviceClassName is required.
    //
    // Administrators may use this to restrict which devices may get
    // requested by only installing classes with selectors for permitted
    // devices. If users are free to request anything without restrictions,
    // then administrators can create an empty DeviceClass for users
    // to reference.
    //
    // +required
    DeviceClassName string `json:"deviceClassName" protobuf:"bytes,1,name=deviceClassName"`

However, as I can see API conventions documentation, the object referencing field name should be named as {field}Ref format: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#naming-of-the-reference-field

Are these intended violations? Or is the documentation not correct?

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.sig/nodeCategorizes an issue or PR as relevant to SIG Node.wg/device-managementCategorizes an issue or PR as relevant to WG Device Management.

    Type

    No type

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions