File tree Expand file tree Collapse file tree 4 files changed +25
-2
lines changed
example-charts/files-values Expand file tree Collapse file tree 4 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,12 @@ dataSecret:
47
47
resource2.yaml: c29tZToKICByZXNvdXJjZTogImJsYWgyIg==
48
48
```
49
49
50
+ File: Chart.yaml
51
+ File: somefile.yaml
52
+ File: templates/resource1.yaml
53
+ File: templates/resource2.yaml
54
+ File: values.yaml
55
+
50
56
## Values
51
57
52
58
| Key | Type | Default | Description |
@@ -61,5 +67,3 @@ dataSecret:
61
67
| statefulset.livenessProbe | object | ` {"enabled":false} ` | Configure the healthcheck for the database |
62
68
| statefulset.podLabels | object | ` {} ` | The labels to be applied to instances of the database |
63
69
64
- ----------------------------------------------
65
- Autogenerated from chart metadata using [ helm-docs v1.11.0] ( https://github.com/norwoodj/helm-docs/releases/v1.11.0 )
Original file line number Diff line number Diff line change @@ -39,6 +39,10 @@ dataSecret:
39
39
{{ (.Files.Glob "templates/**.yaml").AsSecrets | indent 2 }}
40
40
```
41
41
42
+ {{ range $path, $_ := (.Files.Glob "**.yaml").AsMap -}}
43
+ File: {{$path}}
44
+ {{ end }}
45
+
42
46
{{ template "chart.requirementsSection" . }}
43
47
44
48
{{ template "chart.valuesSection" . }}
Original file line number Diff line number Diff line change @@ -122,6 +122,10 @@ func (f files) AsSecrets() string {
122
122
return toYAML (m )
123
123
}
124
124
125
+ func (f files ) AsMap () map [string ]* fileEntry {
126
+ return f .foundFiles
127
+ }
128
+
125
129
func (f files ) Lines (path string ) []string {
126
130
if len (f .foundFiles ) == 0 {
127
131
return []string {}
Original file line number Diff line number Diff line change @@ -83,6 +83,17 @@ func TestToSecret(t *testing.T) {
83
83
as .Equal ("captain.txt: VGhlIENhcHRhaW4=\n stowaway.txt: TGVnYXR0" , out )
84
84
}
85
85
86
+ func TestToMap (t * testing.T ) {
87
+ as := assert .New (t )
88
+
89
+ f := getTestFiles ()
90
+
91
+ out := f .Glob ("ship/**" ).AsMap ()
92
+ as .Contains (out , "ship/captain.txt" )
93
+ as .Contains (out , "ship/stowaway.txt" )
94
+ as .NotContains (out , "story/name.txt" )
95
+ }
96
+
86
97
func TestLines (t * testing.T ) {
87
98
as := assert .New (t )
88
99
You can’t perform that action at this time.
0 commit comments