Flavor Naming Scheme: Use of colon character as delimiter
Created by: wwentland
Summary
The current flavor naming standard uses colon characters (i.e. :
) as delimiters. This is an unfortunate choice, as it is incompatible with requirements stipulated by downstream applications such as Kubernetes.
Details
Kubernetes uses labels and annotations for a variety of use cases. Most importantly in the context of this discussion will be their use for taints and tolerations and the standard well-known labels, annotations and taints.
The requirements for valid label values are:
- must be 63 characters or less (can be empty),
- unless empty, must begin and end with an alphanumeric character ([a-z0-9A-Z]),
- could contain dashes (-), underscores (_), dots (.), and alphanumerics between.
That is, it must adhere to the regular expression (([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')
.
The usage of colon characters is not allowed and their usage in flavor names causes issues when, for example, the kubelet wants to set the well-known node.kubernetes.io/instance-type
label:
Jan 01 08:09:10 foo-bar-box hyperkube[12345]: I0103 08:09:10.23456 14821 kubelet_node_status.go:426] "Adding node label from cloud provider" labelKey="node.kubernetes.io/instance-type" labelValue="SCS-4V:16:50"
[...]
Jan 01 08:09:10 foo-bar-box hyperkube[12345]: E0103 08:09:10.23456 14821 kubelet_node_status.go:94] "Unable to register node with API server" err="Node \"foo-bar-node\" is invalid: metadata.labels: Invalid value: \"SCS-4V:16:50\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')" node="foo-bar-node"
Given the significance of Kubernetes in the SCS project, it would be advisable to reconsider the naming scheme and adopt one that is compatible with the data model defined there.
Thank you!