You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by GitBox <gi...@apache.org> on 2022/07/05 13:27:02 UTC

[GitHub] [brooklyn-server] algairim commented on a diff in pull request #1333: Added proper symbol removal and edited tests to make sure it works as…

algairim commented on code in PR #1333:
URL: https://github.com/apache/brooklyn-server/pull/1333#discussion_r913796944


##########
software/base/src/main/java/org/apache/brooklyn/tasks/kubectl/ContainerTaskFactory.java:
##########
@@ -68,10 +68,8 @@ public Task<RET> newTask() {
 
         final String containerName = (Strings.isBlank(containerNameFromCfg)
                 ? ( (Strings.isNonBlank(this.tag) ? this.tag + "-" : "").concat(cleanImageName).concat("-").concat(Strings.makeRandomId(10)))
-                : containerNameFromCfg).replace(" ", "-")
-                .replace("/", "-")
-                .replace("_", "-")
-                .replaceAll("[^a-z0-9-]", "") // remove other symbols
+                : containerNameFromCfg)
+                .replaceAll("[^A-Za-z0-9-]", "") // remove all symbols

Review Comment:
   https://kubernetes.io/docs/concepts/overview/working-with-objects/names/



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brooklyn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org