- 
                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
Support Map of SecretKeyReferences #604
Conversation
- Add Test case for mapping string to secrets references - Update CleanGoType to update value type of map to SecretKeyReference if is_secret set. - Add tests validating SetSDK() for map of secrets references
| if r.ko.Spec.Environment != nil { | ||
| f4 := &svcsdktypes.Environment{} | ||
| if r.ko.Spec.Environment.Variables != nil { | ||
| f4f0 := map[string]string{} | 
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.
| /retest | 
| /test ec2-controller-test | 
    
      
        2 similar comments
      
    
  
    | /test ec2-controller-test | 
| /test ec2-controller-test | 
| /retest | 
| @knottnt: The following tests failed, say  
 Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. | 
|  | ||
| 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 comment
The reason will be displayed to describe this comment to others. Learn more.
do you need to check for fieldCfg != nil && fieldCfg.IsSecret ? looks like the list case doesn't need it
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.
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 list block needs be entered regardless of the secret status.
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.
Neat, thanks Trevor 👍
| /lgtm | 
| [APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: a-hilaly, knottnt, michaelhtm The full list of commands accepted by this bot can be found here. The pull request process is described here 
Needs approval from an approver in each of these files:
 
 Approvers can indicate their approval by writing  | 
a488d4e
      into
      
  
    aws-controllers-k8s:main
  
    
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.