Update kube-state-metrics.libsonnet

With the bump to kube-state-metrics v1.6 they added ingress and certificates but this updates the rbac rules so that those work with the new version.
This commit is contained in:
Zach Aller
2019-07-09 16:28:17 -05:00
committed by GitHub
parent a5ba4c5116
commit 48651090a6

View File

@@ -67,6 +67,7 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
'daemonsets',
'deployments',
'replicasets',
'ingresses',
]) +
rulesType.withVerbs(['list', 'watch']);
@@ -116,7 +117,14 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
]) +
rulesType.withVerbs(['list', 'watch']);
local rules = [coreRule, extensionsRule, appsRule, batchRule, autoscalingRule, authenticationRole, authorizationRole, policyRule];
local certificateRule = rulesType.new() +
rulesType.withApiGroups(['certificates.k8s.io']) +
rulesType.withResources([
'certificatesigningrequests',
]) +
rulesType.withVerbs(['list', 'watch']);
local rules = [coreRule, extensionsRule, appsRule, batchRule, autoscalingRule, authenticationRole, authorizationRole, policyRule, certificateRule];
clusterRole.new() +
clusterRole.mixin.metadata.withName('kube-state-metrics') +