Skip to content

Commit

Permalink
feat: 变量列表只展示 .Values 前缀
Browse files Browse the repository at this point in the history
  • Loading branch information
LidolLxf committed Nov 26, 2024
1 parent d08983c commit 4d926ef
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bcs-services/cluster-resources/pkg/action/template/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,9 @@ func parseTemplateFileVar(template string) []string {
if match == nil || len(match) < 2 {
continue
}
if match[1] == "" {
continue
if strings.HasPrefix(match[1], ".Values.") {
vars = append(vars, strings.TrimSpace(match[1]))
}
vars = append(vars, strings.TrimSpace(match[1]))
}
vars = slice.RemoveDuplicateValues(vars)
return vars
Expand Down

0 comments on commit 4d926ef

Please sign in to comment.