mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #104244 from dgrisonnet/bootstrap-hpa-external-metrics
Add bootstrap policy for HPA external metrics
This commit is contained in:
commit
85c43df3f6
@ -220,9 +220,10 @@ func buildControllerRoles() ([]rbacv1.ClusterRole, []rbacv1.ClusterRoleBinding)
|
|||||||
rbacv1helpers.NewRule("list").Groups(legacyGroup).Resources("pods").RuleOrDie(),
|
rbacv1helpers.NewRule("list").Groups(legacyGroup).Resources("pods").RuleOrDie(),
|
||||||
// TODO: restrict this to the appropriate namespace
|
// TODO: restrict this to the appropriate namespace
|
||||||
rbacv1helpers.NewRule("get").Groups(legacyGroup).Resources("services/proxy").Names("https:heapster:", "http:heapster:").RuleOrDie(),
|
rbacv1helpers.NewRule("get").Groups(legacyGroup).Resources("services/proxy").Names("https:heapster:", "http:heapster:").RuleOrDie(),
|
||||||
// allow listing resource metrics and custom metrics
|
// allow listing resource, custom, and external metrics
|
||||||
rbacv1helpers.NewRule("list").Groups(resMetricsGroup).Resources("pods").RuleOrDie(),
|
rbacv1helpers.NewRule("list").Groups(resMetricsGroup).Resources("pods").RuleOrDie(),
|
||||||
rbacv1helpers.NewRule("get", "list").Groups(customMetricsGroup).Resources("*").RuleOrDie(),
|
rbacv1helpers.NewRule("get", "list").Groups(customMetricsGroup).Resources("*").RuleOrDie(),
|
||||||
|
rbacv1helpers.NewRule("get", "list").Groups(externalMetricsGroup).Resources("*").RuleOrDie(),
|
||||||
eventsRule(),
|
eventsRule(),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@ -57,6 +57,7 @@ const (
|
|||||||
storageGroup = "storage.k8s.io"
|
storageGroup = "storage.k8s.io"
|
||||||
resMetricsGroup = "metrics.k8s.io"
|
resMetricsGroup = "metrics.k8s.io"
|
||||||
customMetricsGroup = "custom.metrics.k8s.io"
|
customMetricsGroup = "custom.metrics.k8s.io"
|
||||||
|
externalMetricsGroup = "external.metrics.k8s.io"
|
||||||
networkingGroup = "networking.k8s.io"
|
networkingGroup = "networking.k8s.io"
|
||||||
eventsGroup = "events.k8s.io"
|
eventsGroup = "events.k8s.io"
|
||||||
internalAPIServerGroup = "internal.apiserver.k8s.io"
|
internalAPIServerGroup = "internal.apiserver.k8s.io"
|
||||||
|
@ -765,6 +765,13 @@ items:
|
|||||||
verbs:
|
verbs:
|
||||||
- get
|
- get
|
||||||
- list
|
- list
|
||||||
|
- apiGroups:
|
||||||
|
- external.metrics.k8s.io
|
||||||
|
resources:
|
||||||
|
- '*'
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- ""
|
- ""
|
||||||
- events.k8s.io
|
- events.k8s.io
|
||||||
|
Loading…
Reference in New Issue
Block a user