k8s和头盔的新手。
[尝试使用{{ .Release.Name }}
声明部署中的字段,该字段不得包含字母(大写+小写),数字和_以外的字符。
排除的字符应替换为_,例如:feature/my-feature-1130
应替换为:feature_my_feature_1130
有人可以帮我创建一个这样的领域吗?
非常感谢!
您在寻找这个
String s = "feature/my-feature-1130";
s = s.replaceAll("\\W","_");
System.out.println(s);
输出 feature_my_feature_1130
抱歉,我使用的不是哪种编程语言,此regex可在java中使用,但您可以尝试使用它,是否适合您]