We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25134cd commit 8c58ba8Copy full SHA for 8c58ba8
pkg/virtualKubelet/forge/configmaps.go
@@ -49,7 +49,13 @@ func LocalConfigMapName(remote string) string {
49
// RemoteConfigMapName forges the name for the reflected configmap, remapping the one of the root CA to prevent collisions.
50
func RemoteConfigMapName(local string) string {
51
if local == RootCAConfigMapName {
52
- name := RootCAConfigMapName + "." + string(LocalCluster)[0:5]
+ var suffix string
53
+ if len(LocalCluster) > 5 {
54
+ suffix = string(LocalCluster)[0:5]
55
+ } else {
56
+ suffix = string(LocalCluster)
57
+ }
58
+ name := RootCAConfigMapName + "." + suffix
59
// if the last character is not alphanumeric, we add a random alphanumeric character to avoid issues with k8s
60
if !isAlphanumeric(name[len(name)-1]) {
61
name += "a"
0 commit comments