Deprecate caseless driver name validation and enforce lowercase warnings

- Deprecate IsDNS1123SubdomainCaseless to avoid caseless validation issues.
- Warn when ResourceSlice driver names contain uppercase characters.
- Clarify driver names must be DNS subdomains and use only lowercase letters.
- Update tests, staging code, and OpenAPI spec to reflect the changes.

Kubernetes-commit: b40b67b9cfff1fdd6a1177372bdb545c5d2b6bbb
This commit is contained in:
Dan Bokete
2025-09-21 15:35:37 +01:00
committed by Kubernetes Publisher
parent 2a2f191a6d
commit 1d528010ef
12 changed files with 15 additions and 12 deletions

View File

@@ -37,7 +37,7 @@ type AllocatedDeviceStatusApplyConfiguration struct {
// needed on a node.
//
// Must be a DNS subdomain and should end with a DNS domain owned by the
// vendor of the driver.
// vendor of the driver. It should use only lower case characters.
Driver *string `json:"driver,omitempty"`
// This name together with the driver name and the device name field
// identify which device was allocated (`<driver name>/<pool name>/<device name>`).

View File

@@ -42,7 +42,7 @@ type DeviceRequestAllocationResultApplyConfiguration struct {
// needed on a node.
//
// Must be a DNS subdomain and should end with a DNS domain owned by the
// vendor of the driver.
// vendor of the driver. It should use only lower case characters.
Driver *string `json:"driver,omitempty"`
// This name together with the driver name and the device name field
// identify which device was allocated (`<driver name>/<pool name>/<device name>`).

View File

@@ -35,7 +35,7 @@ type OpaqueDeviceConfigurationApplyConfiguration struct {
// to decide whether it needs to validate them.
//
// Must be a DNS subdomain and should end with a DNS domain owned by the
// vendor of the driver.
// vendor of the driver. It should use only lower case characters.
Driver *string `json:"driver,omitempty"`
// Parameters can contain arbitrary data. It is the responsibility of
// the driver developer to handle validation and versioning. Typically this

View File

@@ -32,7 +32,8 @@ type ResourceSliceSpecApplyConfiguration struct {
// objects with a certain driver name.
//
// Must be a DNS subdomain and should end with a DNS domain owned by the
// vendor of the driver. This field is immutable.
// vendor of the driver. It should use only lower case characters.
// This field is immutable.
Driver *string `json:"driver,omitempty"`
// Pool describes the pool that this ResourceSlice belongs to.
Pool *ResourcePoolApplyConfiguration `json:"pool,omitempty"`

View File

@@ -37,7 +37,7 @@ type AllocatedDeviceStatusApplyConfiguration struct {
// needed on a node.
//
// Must be a DNS subdomain and should end with a DNS domain owned by the
// vendor of the driver.
// vendor of the driver. It should use only lower case characters.
Driver *string `json:"driver,omitempty"`
// This name together with the driver name and the device name field
// identify which device was allocated (`<driver name>/<pool name>/<device name>`).

View File

@@ -42,7 +42,7 @@ type DeviceRequestAllocationResultApplyConfiguration struct {
// needed on a node.
//
// Must be a DNS subdomain and should end with a DNS domain owned by the
// vendor of the driver.
// vendor of the driver. It should use only lower case characters.
Driver *string `json:"driver,omitempty"`
// This name together with the driver name and the device name field
// identify which device was allocated (`<driver name>/<pool name>/<device name>`).

View File

@@ -35,7 +35,7 @@ type OpaqueDeviceConfigurationApplyConfiguration struct {
// to decide whether it needs to validate them.
//
// Must be a DNS subdomain and should end with a DNS domain owned by the
// vendor of the driver.
// vendor of the driver. It should use only lower case characters.
Driver *string `json:"driver,omitempty"`
// Parameters can contain arbitrary data. It is the responsibility of
// the driver developer to handle validation and versioning. Typically this

View File

@@ -32,7 +32,8 @@ type ResourceSliceSpecApplyConfiguration struct {
// objects with a certain driver name.
//
// Must be a DNS subdomain and should end with a DNS domain owned by the
// vendor of the driver. This field is immutable.
// vendor of the driver. It should use only lower case characters.
// This field is immutable.
Driver *string `json:"driver,omitempty"`
// Pool describes the pool that this ResourceSlice belongs to.
Pool *ResourcePoolApplyConfiguration `json:"pool,omitempty"`

View File

@@ -37,7 +37,7 @@ type AllocatedDeviceStatusApplyConfiguration struct {
// needed on a node.
//
// Must be a DNS subdomain and should end with a DNS domain owned by the
// vendor of the driver.
// vendor of the driver. It should use only lower case characters.
Driver *string `json:"driver,omitempty"`
// This name together with the driver name and the device name field
// identify which device was allocated (`<driver name>/<pool name>/<device name>`).

View File

@@ -42,7 +42,7 @@ type DeviceRequestAllocationResultApplyConfiguration struct {
// needed on a node.
//
// Must be a DNS subdomain and should end with a DNS domain owned by the
// vendor of the driver.
// vendor of the driver. It should use only lower case characters.
Driver *string `json:"driver,omitempty"`
// This name together with the driver name and the device name field
// identify which device was allocated (`<driver name>/<pool name>/<device name>`).

View File

@@ -35,7 +35,7 @@ type OpaqueDeviceConfigurationApplyConfiguration struct {
// to decide whether it needs to validate them.
//
// Must be a DNS subdomain and should end with a DNS domain owned by the
// vendor of the driver.
// vendor of the driver. It should use only lower case characters.
Driver *string `json:"driver,omitempty"`
// Parameters can contain arbitrary data. It is the responsibility of
// the driver developer to handle validation and versioning. Typically this

View File

@@ -32,7 +32,8 @@ type ResourceSliceSpecApplyConfiguration struct {
// objects with a certain driver name.
//
// Must be a DNS subdomain and should end with a DNS domain owned by the
// vendor of the driver. This field is immutable.
// vendor of the driver. It should use only lower case characters.
// This field is immutable.
Driver *string `json:"driver,omitempty"`
// Pool describes the pool that this ResourceSlice belongs to.
Pool *ResourcePoolApplyConfiguration `json:"pool,omitempty"`