-
Notifications
You must be signed in to change notification settings - Fork 556
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates deploy/manifest to latest version in sync with kube-prom
Issue #426
- Loading branch information
1 parent
9008b12
commit c6e43f1
Showing
24 changed files
with
365 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apiVersion: apiregistration.k8s.io/v1 | ||
kind: APIService | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: metrics-adapter | ||
app.kubernetes.io/name: prometheus-adapter | ||
app.kubernetes.io/version: 0.9.1 | ||
name: v1beta1.metrics.k8s.io | ||
spec: | ||
group: metrics.k8s.io | ||
groupPriorityMinimum: 100 | ||
insecureSkipTLSVerify: true | ||
service: | ||
name: prometheus-adapter | ||
namespace: monitoring | ||
version: v1beta1 | ||
versionPriority: 100 |
22 changes: 22 additions & 0 deletions
22
deploy/manifests/cluster-role-aggregated-metrics-reader.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: metrics-adapter | ||
app.kubernetes.io/name: prometheus-adapter | ||
app.kubernetes.io/version: 0.9.1 | ||
rbac.authorization.k8s.io/aggregate-to-admin: "true" | ||
rbac.authorization.k8s.io/aggregate-to-edit: "true" | ||
rbac.authorization.k8s.io/aggregate-to-view: "true" | ||
name: system:aggregated-metrics-reader | ||
namespace: monitoring | ||
rules: | ||
- apiGroups: | ||
- metrics.k8s.io | ||
resources: | ||
- pods | ||
- nodes | ||
verbs: | ||
- get | ||
- list | ||
- watch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: metrics-adapter | ||
app.kubernetes.io/name: prometheus-adapter | ||
app.kubernetes.io/version: 0.9.1 | ||
name: resource-metrics:system:auth-delegator | ||
namespace: monitoring | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: system:auth-delegator | ||
subjects: | ||
- kind: ServiceAccount | ||
name: prometheus-adapter | ||
namespace: monitoring |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: metrics-adapter | ||
app.kubernetes.io/name: prometheus-adapter | ||
app.kubernetes.io/version: 0.9.1 | ||
name: prometheus-adapter | ||
namespace: monitoring | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: prometheus-adapter | ||
subjects: | ||
- kind: ServiceAccount | ||
name: prometheus-adapter | ||
namespace: monitoring |
15 changes: 15 additions & 0 deletions
15
deploy/manifests/cluster-role-metrics-server-resources.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: metrics-adapter | ||
app.kubernetes.io/name: prometheus-adapter | ||
app.kubernetes.io/version: 0.9.1 | ||
name: resource-metrics-server-resources | ||
rules: | ||
- apiGroups: | ||
- metrics.k8s.io | ||
resources: | ||
- '*' | ||
verbs: | ||
- '*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: metrics-adapter | ||
app.kubernetes.io/name: prometheus-adapter | ||
app.kubernetes.io/version: 0.9.1 | ||
name: prometheus-adapter | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- nodes | ||
- namespaces | ||
- pods | ||
- services | ||
verbs: | ||
- get | ||
- list | ||
- watch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
apiVersion: v1 | ||
data: | ||
config.yaml: |- | ||
"resourceRules": | ||
"cpu": | ||
"containerLabel": "container" | ||
"containerQuery": | | ||
sum by (<<.GroupBy>>) ( | ||
irate ( | ||
container_cpu_usage_seconds_total{<<.LabelMatchers>>,container!="",pod!=""}[4m] | ||
) | ||
) | ||
"nodeQuery": | | ||
sum by (<<.GroupBy>>) ( | ||
1 - irate( | ||
node_cpu_seconds_total{mode="idle"}[4m] | ||
) | ||
* on(namespace, pod) group_left(node) ( | ||
node_namespace_pod:kube_pod_info:{<<.LabelMatchers>>} | ||
) | ||
) | ||
or sum by (<<.GroupBy>>) ( | ||
1 - irate( | ||
windows_cpu_time_total{mode="idle", job="windows-exporter",<<.LabelMatchers>>}[4m] | ||
) | ||
) | ||
"resources": | ||
"overrides": | ||
"namespace": | ||
"resource": "namespace" | ||
"node": | ||
"resource": "node" | ||
"pod": | ||
"resource": "pod" | ||
"memory": | ||
"containerLabel": "container" | ||
"containerQuery": | | ||
sum by (<<.GroupBy>>) ( | ||
container_memory_working_set_bytes{<<.LabelMatchers>>,container!="",pod!=""} | ||
) | ||
"nodeQuery": | | ||
sum by (<<.GroupBy>>) ( | ||
node_memory_MemTotal_bytes{job="node-exporter",<<.LabelMatchers>>} | ||
- | ||
node_memory_MemAvailable_bytes{job="node-exporter",<<.LabelMatchers>>} | ||
) | ||
or sum by (<<.GroupBy>>) ( | ||
windows_cs_physical_memory_bytes{job="windows-exporter",<<.LabelMatchers>>} | ||
- | ||
windows_memory_available_bytes{job="windows-exporter",<<.LabelMatchers>>} | ||
) | ||
"resources": | ||
"overrides": | ||
"instance": | ||
"resource": "node" | ||
"namespace": | ||
"resource": "namespace" | ||
"pod": | ||
"resource": "pod" | ||
"window": "5m" | ||
kind: ConfigMap | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: metrics-adapter | ||
app.kubernetes.io/name: prometheus-adapter | ||
app.kubernetes.io/version: 0.9.1 | ||
name: adapter-config | ||
namespace: monitoring |
12 changes: 0 additions & 12 deletions
12
deploy/manifests/custom-metrics-apiserver-auth-delegator-cluster-role-binding.yaml
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
deploy/manifests/custom-metrics-apiserver-resource-reader-cluster-role-binding.yaml
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
deploy/manifests/custom-metrics-apiserver-service-account.yaml
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.