You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
consul/ui/packages/consul-ui/mock-api/v1/acl/rolebindingrules

50 lines
1.4 KiB

${ env('CONSUL_ACLS_LEGACY', false) ? `rpc error making call: rpc: can't find method ACL.Method` : `
[
${
range(
env(
'CONSUL_BINDING_COUNT',
Math.floor(
(
Math.random() * env('CONSUL_BINDING_MAX', 10)
) + parseInt(env('CONSUL_BINDING_MIN', 1))
)
)
).map(
function(item, i) {
return `
{
"Description": "${fake.lorem.sentence()}",
"IDPName": "${fake.hacker.noun()}-idp",
"Matches": [
${
range(env('CONSUL_MATCH_COUNT', 3)).map(
function(item, i) {
return `
{
"Selectors": [
${
range(env('CONSUL_SELECTOR_COUNT', fake.random.number({min: 1, max: 5}))).map(
function(item, i) {
return `"serviceaccount.name=${fake.hacker.noun()}"`;
}
)
}
]
}
`;
}
)
}
],
"RoleName": "${ fake.random.boolean() ? `role-{$i}` : `{{ serviceaccount.name }}`}",
"CreateIndex": 10,
"ModifyIndex": 10
}
`
}
)
}
]
`}