File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -269,7 +269,7 @@ func NewServiceAccountCommand(getServiceAccountClientFn GetServiceAccountClientF
269269 }
270270 }
271271
272- var acctActionGroup auth.AccountActionGroup
272+ var access * auth.AccountAccess
273273 if scope == nil {
274274 if len (ctx .String (accountRoleFlagName )) == 0 {
275275 return fmt .Errorf ("account role must be specified; valid types are %v" , accountActionGroups )
@@ -278,17 +278,17 @@ func NewServiceAccountCommand(getServiceAccountClientFn GetServiceAccountClientF
278278 if err != nil {
279279 return fmt .Errorf ("failed to parse account role: %w" , err )
280280 }
281- acctActionGroup = ag
281+ access = & auth.AccountAccess {
282+ Role : ag ,
283+ }
282284 } else if scope .Type == auth .SERVICE_ACCOUNT_SCOPE_TYPE_NAMESPACE && len (ctx .String (accountRoleFlagName )) > 0 {
283285 return fmt .Errorf ("namespace scoped service accounts may not have an account role" )
284286 }
285287
286288 spec := & auth.ServiceAccountSpec {
287289 Name : ctx .String (serviceAccountNameFlagName ),
288290 Access : & auth.Access {
289- AccountAccess : & auth.AccountAccess {
290- Role : acctActionGroup ,
291- },
291+ AccountAccess : access ,
292292 NamespaceAccesses : map [string ]* auth.NamespaceAccess {},
293293 },
294294 Description : ctx .String (serviceAccountDescriptionFlagName ),
You can’t perform that action at this time.
0 commit comments