Skip to content

Commit

Permalink
Fix enumeration with indexes (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
khajduczenia authored Jun 27, 2018
1 parent 4a38574 commit 98ed1da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions marketplace/deployer_util/provision.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def provision_service_account(schema, prop, app_name, namespace):
'namespace': namespace,
},
}]
for i, rules in prop.service_account.custom_role_rules():
for i, rules in enumerate(prop.service_account.custom_role_rules()):
role_name = '{}:{}-r{}'.format(app_name, prop.name, i)
manifests.append({
'apiVersion': 'rbac.authorization.k8s.io/v1',
Expand All @@ -222,7 +222,7 @@ def provision_service_account(schema, prop, app_name, namespace):
},
'subjects': subjects,
})
for i, rules in prop.service_account.custom_cluster_role_rules():
for i, rules in enumerate(prop.service_account.custom_cluster_role_rules()):
role_name = '{}:{}:{}-r{}'.format(namespace, app_name, prop.name, i)
manifests.append({
'apiVersion': 'rbac.authorization.k8s.io/v1',
Expand Down

0 comments on commit 98ed1da

Please sign in to comment.