-
Notifications
You must be signed in to change notification settings - Fork 226
Support Map of SecretKeyReferences #604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,6 +58,15 @@ func CleanGoType( | |
|
|
||
| gt = "[]" + mgt | ||
| gtwp = "[]" + mgtwp | ||
| } else if shape.Type == "map" && fieldCfg != nil && fieldCfg.IsSecret { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do you need to check for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The reason I check both here is that I only want to enter this block if the field is both a map and is secret whereas the |
||
| _, _, vgtwp := CleanGoType(api, cfg, shape.ValueRef.Shape, fieldCfg) | ||
| kgte, _, _ := CleanGoType(api, cfg, shape.KeyRef.Shape, nil) | ||
|
|
||
| gte = "map[" + kgte + "]" + vgtwp | ||
| gt = "map[" + kgte + "]" + vgtwp | ||
| gtwp = "map[" + kgte + "]" + vgtwp | ||
|
|
||
| return gte, gt, gtwp | ||
| } else if shape.Type == "timestamp" { | ||
| // time.Time needs to be converted to apimachinery/metav1.Time | ||
| // otherwise there is no DeepCopy support | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No changes to SetSDK were necessary, but there don't appear to be any tests validating the generated code for a map of secrets references. I was also able to verify that key/value pair of secrets references are written out as expected using a modified version of the lambda-controller.