Skip to content

Commit

Permalink
Merge pull request #5612 from justinsb/cherrypick_5533_release-1.10
Browse files Browse the repository at this point in the history
Cherry pick of #5533 onto release-1.10
  • Loading branch information
k8s-ci-robot authored Aug 14, 2018
2 parents 06ae871 + ea19240 commit 2aea5f3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/model/iam.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,10 @@ func (b *IAMModelBuilder) buildIAMTasks(igRole kops.InstanceGroupRole, iamName s
}

statements := make([]*iam.Statement, 0)
json.Unmarshal([]byte(additionalPolicy), &statements)
if err := json.Unmarshal([]byte(additionalPolicy), &statements); err != nil {
return fmt.Errorf("additionalPolicy %q is invalid: %v", strings.ToLower(string(igRole)), err)
}

p.Statement = append(p.Statement, statements...)

policy, err := p.AsJSON()
Expand Down

0 comments on commit 2aea5f3

Please sign in to comment.