kube-prometheus: Convert to jsonnet
This commit is contained in:
18
jsonnet/prometheus/prometheus-k8s-role-config.libsonnet
Normal file
18
jsonnet/prometheus/prometheus-k8s-role-config.libsonnet
Normal file
@@ -0,0 +1,18 @@
|
||||
local k = import "ksonnet.beta.3/k.libsonnet";
|
||||
local role = k.rbac.v1.role;
|
||||
local policyRule = role.rulesType;
|
||||
|
||||
local configmapRule = policyRule.new() +
|
||||
policyRule.withApiGroups([""]) +
|
||||
policyRule.withResources([
|
||||
"configmaps",
|
||||
]) +
|
||||
policyRule.withVerbs(["get"]);
|
||||
|
||||
{
|
||||
new(namespace)::
|
||||
role.new() +
|
||||
role.mixin.metadata.withName("prometheus-k8s-config") +
|
||||
role.mixin.metadata.withNamespace(namespace) +
|
||||
role.withRules(configmapRule),
|
||||
}
|
||||
Reference in New Issue
Block a user