convertPostgresIDToK8sName returns a postgres identifier without the characters that are illegal in K8s names and domains. (Lowercase RFC 1123)
(tablespaceName string)
| 58 | // convertPostgresIDToK8sName returns a postgres identifier without the characters |
| 59 | // that are illegal in K8s names and domains. (Lowercase RFC 1123) |
| 60 | func convertPostgresIDToK8sName(tablespaceName string) string { |
| 61 | name := convertPostgresIDToK8s(tablespaceName) |
| 62 | name = strings.ReplaceAll(name, "_", "-") // reversible |
| 63 | name = strings.ToLower(name) // irreversible |
| 64 | return name |
| 65 | } |
| 66 | |
| 67 | // convertPostgresIDToK8s transforms a postgres identifier to be a valid K8s |
| 68 | // label. |
no test coverage detected