Fix: component name generated by vela adopt is not in lowecase (#5775)

CUE: fix the adopt-templates/default.cue

closes #5771

Signed-off-by: Zhenghao Lou <rhzx3519@gmail.com>
This commit is contained in:
Zhenghao Lou
2023-03-30 13:58:32 +08:00
committed by GitHub
parent bb34012c3a
commit 784106cdf3
+6 -3
View File
@@ -1,4 +1,7 @@
import "list"
import (
"list"
"strings"
)
#Resource: {
apiVersion: string
@@ -126,7 +129,7 @@ import "list"
},
for r in resourceMap.workload + resourceMap.service {
type: "k8s-objects"
name: "\(r.kind).\(r.metadata.name)"
name: strings.ToLower("\(r.kind)-\(r.metadata.name)")
properties: objects: [{
apiVersion: r.apiVersion
kind: r.kind
@@ -216,4 +219,4 @@ import "list"
properties: cluster: c
}]
}
}
}