Skip to content

feat(common.go): add K8sRandomString to create an RFC1123...

Karen Almog requested to merge random_k8s_string into main

feat(common.go): add a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is 'a-z0-9?(.a-z0-9?)*') to create an RFC1123 compatible string for k8s resources

The RandomString function creates a string that may not be compatible with k8s and will issue the following error: a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*') This MR adds a function that generates a random string that complies with k8s validation rules.

Merge request reports