File tree 2 files changed +29
-1
lines changed
2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change
1
+ # entries is a list of entries to include in
2
+ # release notes and/or the migration guide
3
+ entries :
4
+ - description : >
5
+ markUnsafe now correctly marks as unsafe the spec extra variable.
6
+
7
+ # kind is one of:
8
+ # - addition
9
+ # - change
10
+ # - deprecation
11
+ # - removal
12
+ # - bugfix
13
+ kind: "bugfix"
14
+
15
+ # Is this a breaking change?
16
+ breaking: false
17
+
18
+ # NOTE: ONLY USE `pull_request_override` WHEN ADDING THIS
19
+ # FILE FOR A PREVIOUSLY MERGED PULL_REQUEST!
20
+ #
21
+ # The generator auto-detects the PR number from the commit
22
+ # message in which this file was originally added.
23
+ #
24
+ # What is the pull request number (without the "#")?
25
+ # pull_request_override: 0
Original file line number Diff line number Diff line change @@ -366,6 +366,9 @@ func (r *runner) makeParameters(u *unstructured.Unstructured) map[string]interfa
366
366
367
367
specKey := fmt .Sprintf ("%s_spec" , objKey )
368
368
parameters [specKey ] = spec
369
+ if r .markUnsafe {
370
+ parameters [specKey ] = markUnsafe (spec )
371
+ }
369
372
370
373
for k , v := range r .Vars {
371
374
parameters [k ] = v
@@ -391,7 +394,7 @@ func (r *runner) makeParameters(u *unstructured.Unstructured) map[string]interfa
391
394
func markUnsafe (values interface {}) interface {} {
392
395
switch v := values .(type ) {
393
396
case []interface {}:
394
- var p []interface {}
397
+ p := make ( []interface {}, 0 )
395
398
for _ , n := range v {
396
399
p = append (p , markUnsafe (n ))
397
400
}
You can’t perform that action at this time.
0 commit comments