Merge pull request #151 from metalmatze/kube-state-metrics-1.7.0-rc.1

Bump kube-state-metrics to v1.7.0
This commit is contained in:
Sergiusz Urbaniak
2019-08-01 09:34:36 +02:00
committed by GitHub
4 changed files with 94 additions and 80 deletions

View File

@@ -16,7 +16,7 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
},
versions+:: {
kubeStateMetrics: 'v1.6.0',
kubeStateMetrics: 'v1.7.1',
kubeRbacProxy: 'v0.4.1',
addonResizer: '1.8.4',
},
@@ -43,7 +43,8 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
local clusterRole = k.rbac.v1.clusterRole;
local rulesType = clusterRole.rulesType;
local coreRule = rulesType.new() +
local rules = [
rulesType.new() +
rulesType.withApiGroups(['']) +
rulesType.withResources([
'configmaps',
@@ -59,9 +60,9 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
'namespaces',
'endpoints',
]) +
rulesType.withVerbs(['list', 'watch']);
rulesType.withVerbs(['list', 'watch']),
local extensionsRule = rulesType.new() +
rulesType.new() +
rulesType.withApiGroups(['extensions']) +
rulesType.withResources([
'daemonsets',
@@ -69,9 +70,9 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
'replicasets',
'ingresses',
]) +
rulesType.withVerbs(['list', 'watch']);
rulesType.withVerbs(['list', 'watch']),
local appsRule = rulesType.new() +
rulesType.new() +
rulesType.withApiGroups(['apps']) +
rulesType.withResources([
'statefulsets',
@@ -79,52 +80,58 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
'deployments',
'replicasets',
]) +
rulesType.withVerbs(['list', 'watch']);
rulesType.withVerbs(['list', 'watch']),
local batchRule = rulesType.new() +
rulesType.new() +
rulesType.withApiGroups(['batch']) +
rulesType.withResources([
'cronjobs',
'jobs',
]) +
rulesType.withVerbs(['list', 'watch']);
rulesType.withVerbs(['list', 'watch']),
local autoscalingRule = rulesType.new() +
rulesType.new() +
rulesType.withApiGroups(['autoscaling']) +
rulesType.withResources([
'horizontalpodautoscalers',
]) +
rulesType.withVerbs(['list', 'watch']);
rulesType.withVerbs(['list', 'watch']),
local authenticationRole = rulesType.new() +
rulesType.new() +
rulesType.withApiGroups(['authentication.k8s.io']) +
rulesType.withResources([
'tokenreviews',
]) +
rulesType.withVerbs(['create']);
rulesType.withVerbs(['create']),
local authorizationRole = rulesType.new() +
rulesType.new() +
rulesType.withApiGroups(['authorization.k8s.io']) +
rulesType.withResources([
'subjectaccessreviews',
]) +
rulesType.withVerbs(['create']);
rulesType.withVerbs(['create']),
local policyRule = rulesType.new() +
rulesType.new() +
rulesType.withApiGroups(['policy']) +
rulesType.withResources([
'poddisruptionbudgets',
]) +
rulesType.withVerbs(['list', 'watch']);
rulesType.withVerbs(['list', 'watch']),
local certificateRule = rulesType.new() +
rulesType.new() +
rulesType.withApiGroups(['certificates.k8s.io']) +
rulesType.withResources([
'certificatesigningrequests',
]) +
rulesType.withVerbs(['list', 'watch']);
rulesType.withVerbs(['list', 'watch']),
local rules = [coreRule, extensionsRule, appsRule, batchRule, autoscalingRule, authenticationRole, authorizationRole, policyRule, certificateRule];
rulesType.new() +
rulesType.withApiGroups(['storage.k8s.io']) +
rulesType.withResources([
'storageclasses',
]) +
rulesType.withVerbs(['list', 'watch']),
];
clusterRole.new() +
clusterRole.mixin.metadata.withName('kube-state-metrics') +

View File

@@ -8,7 +8,7 @@
"subdir": "jsonnet/kube-prometheus"
}
},
"version": "aa7df507e98312f638c6a2aa7429906bc63949a6"
"version": "eb132e923ef07147131a62ed0e597cf0a90e984b"
},
{
"name": "ksonnet",
@@ -48,7 +48,7 @@
"subdir": "grafana-builder"
}
},
"version": "dbc94ab71afa538b2cf467f06751b1836920dce9"
"version": "8e77b50ee8aea319dac9964b2cc2183f3bc184d2"
},
{
"name": "grafana",
@@ -78,7 +78,7 @@
"subdir": "Documentation/etcd-mixin"
}
},
"version": "d137fa9d4ad7aa242f6fed04186a700ce082fdda"
"version": "149e5dc291a97eb41585fbd2b44ce00c4db684ad"
},
{
"name": "prometheus",
@@ -88,7 +88,7 @@
"subdir": "documentation/prometheus-mixin"
}
},
"version": "87a0fe0c75a42d66fcfc82a0ad89bd2549fcfadf"
"version": "0f007373087bfb2d581f77a4a9a47941e5eeee6b"
}
]
}

View File

@@ -82,3 +82,10 @@ rules:
verbs:
- list
- watch
- apiGroups:
- storage.k8s.io
resources:
- storageclasses
verbs:
- list
- watch

View File

@@ -55,7 +55,7 @@ spec:
- --port=8081
- --telemetry-host=127.0.0.1
- --telemetry-port=8082
image: quay.io/coreos/kube-state-metrics:v1.6.0
image: quay.io/coreos/kube-state-metrics:v1.7.1
name: kube-state-metrics
resources:
limits: