Skip to content

Commit c888603

Browse files
committed
Merge branch 'master' into release-1.5
2 parents c56e5ee + a38c84f commit c888603

16 files changed

Lines changed: 48 additions & 56 deletions

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ sudo: required
33
language: go
44

55
go:
6-
- "1.11.2"
6+
- "1.11.4"
77

88
install:
99
- mkdir -p $HOME/gopath/src/k8s.io

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
1+
## v1.5.0 / 2019-01-10
2+
3+
After a testing period of 30 days, there were no additional bugs found or features introduced. Due to no bugs being reported over an in total 41 days period, we feel no more pre-releases are necessary for a stable release.
4+
5+
This release's focus was a large architectural change in order to improve performance and resource usage of kube-state-metrics drastically. Special thanks to @mxinden for his hard work on this! See the changelog of the pre-releases for more detailed information and related pull requests.
6+
7+
An additional change has been requested to be listed in the release notes:
8+
9+
* [CHANGE] Due to removal of the surrounding mechanism the `ksm_resources_per_scrape` and `ksm_scrape_error_total` metrics no longer exists.
10+
111
## v1.5.0-beta.0 / 2018-12-11
212

313
After a testing period of 11 days, there were no additional bugs found or features introduced.
414

515
## v1.5.0-alpha.0 / 2018-11-30
616

717
* [CHANGE] Disable gzip compression of kube-state-metrics responses by default. Can be re-enabled via `--enable-gzip-encoding`. See #563 for more details.
8-
* [FEATURE] Add `kube_replicatset_owner` metric (#520).
18+
* [FEATURE] Add `kube_replicaset_owner` metric (#520).
919
* [FEATURE] Add `kube_pod_container_status_last_terminated_reason` metric (#535).
1020
* [FEATURE] Add `stateful_set_status.{current,update}_revision` metric (#545).
1121
* [FEATURE] Add pod disruption budget collector (#551).

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
FROM alpine:3.7
1+
FROM alpine:3.8
22

33
COPY kube-state-metrics /
44

55
ENTRYPOINT ["/kube-state-metrics", "--port=8080", "--telemetry-port=8081"]
66

7-
EXPOSE 8080
8-
EXPOSE 8081
7+
EXPOSE 8080 8081

Documentation/job-metrics.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
| Metric name| Metric type | Labels/tags | Status |
44
| ---------- | ----------- | ----------- | ----------- |
5-
| kube_job_info | Gauge | `job`=&lt;job-name&gt; <br> `namespace`=&lt;job-namespace&gt; | STABLE |
6-
| kube_job_labels | Gauge | `job`=&lt;job-name&gt; <br> `namespace`=&lt;job-namespace&gt; <br> `label_JOB_LABEL`=&lt;JOB_LABEL&gt; | STABLE |
7-
| kube_job_spec_parallelism | Gauge | `job`=&lt;job-name&gt; <br> `namespace`=&lt;job-namespace&gt; | STABLE |
8-
| kube_job_spec_completions | Gauge | `job`=&lt;job-name&gt; <br> `namespace`=&lt;job-namespace&gt; | STABLE |
9-
| kube_job_spec_active_deadline_seconds | Gauge | `job`=&lt;job-name&gt; <br> `namespace`=&lt;job-namespace&gt; | STABLE |
10-
| kube_job_status_active | Gauge | `job`=&lt;job-name&gt; <br> `namespace`=&lt;job-namespace&gt; | STABLE |
11-
| kube_job_status_succeeded | Gauge | `job`=&lt;job-name&gt; <br> `namespace`=&lt;job-namespace&gt; | STABLE |
12-
| kube_job_status_failed | Gauge | `job`=&lt;job-name&gt; <br> `namespace`=&lt;job-namespace&gt; | STABLE |
13-
| kube_job_status_start_time | Gauge | `job`=&lt;job-name&gt; <br> `namespace`=&lt;job-namespace&gt; | STABLE |
14-
| kube_job_status_completion_time | Gauge | `job`=&lt;job-name&gt; <br> `namespace`=&lt;job-namespace&gt; | STABLE |
15-
| kube_job_complete | Gauge | `job`=&lt;job-name&gt; <br> `namespace`=&lt;job-namespace&gt; | STABLE |
16-
| kube_job_failed | Gauge | `job`=&lt;job-name&gt; <br> `namespace`=&lt;job-namespace&gt; | STABLE |
17-
| kube_job_created | Gauge | `job`=&lt;job-name&gt; <br> `namespace`=&lt;job-namespace&gt; | STABLE |
5+
| kube_job_info | Gauge | `job_name`=&lt;job-name&gt; <br> `namespace`=&lt;job-namespace&gt; | STABLE |
6+
| kube_job_labels | Gauge | `job_name`=&lt;job-name&gt; <br> `namespace`=&lt;job-namespace&gt; <br> `label_JOB_LABEL`=&lt;JOB_LABEL&gt; | STABLE |
7+
| kube_job_spec_parallelism | Gauge | `job_name`=&lt;job-name&gt; <br> `namespace`=&lt;job-namespace&gt; | STABLE |
8+
| kube_job_spec_completions | Gauge | `job_name`=&lt;job-name&gt; <br> `namespace`=&lt;job-namespace&gt; | STABLE |
9+
| kube_job_spec_active_deadline_seconds | Gauge | `job_name`=&lt;job-name&gt; <br> `namespace`=&lt;job-namespace&gt; | STABLE |
10+
| kube_job_status_active | Gauge | `job_name`=&lt;job-name&gt; <br> `namespace`=&lt;job-namespace&gt; | STABLE |
11+
| kube_job_status_succeeded | Gauge | `job_name`=&lt;job-name&gt; <br> `namespace`=&lt;job-namespace&gt; | STABLE |
12+
| kube_job_status_failed | Gauge | `job_name`=&lt;job-name&gt; <br> `namespace`=&lt;job-namespace&gt; | STABLE |
13+
| kube_job_status_start_time | Gauge | `job_name`=&lt;job-name&gt; <br> `namespace`=&lt;job-namespace&gt; | STABLE |
14+
| kube_job_status_completion_time | Gauge | `job_name`=&lt;job-name&gt; <br> `namespace`=&lt;job-namespace&gt; | STABLE |
15+
| kube_job_complete | Gauge | `job_name`=&lt;job-name&gt; <br> `namespace`=&lt;job-namespace&gt; | STABLE |
16+
| kube_job_failed | Gauge | `job_name`=&lt;job-name&gt; <br> `namespace`=&lt;job-namespace&gt; | STABLE |
17+
| kube_job_created | Gauge | `job_name`=&lt;job-name&gt; <br> `namespace`=&lt;job-namespace&gt; | STABLE |

Documentation/node-metrics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
| Metric name| Metric type | Labels/tags | Status |
44
| ---------- | ----------- | ----------- | ----------- |
5-
| kube_node_info | Gauge | `node`=&lt;node-address&gt; <br> `kernel_version`=&lt;kernel-version&gt; <br> `os_image`=&lt;os-image-name&gt; <br> `container_runtime_version`=&lt;container-runtime-and-version-combination&gt; <br> `kubelet_version`=&lt;kubelet-version&gt; <br> `kubeproxy_version`=&lt;kubeproxy-version&gt; | STABLE |
5+
| kube_node_info | Gauge | `node`=&lt;node-address&gt; <br> `kernel_version`=&lt;kernel-version&gt; <br> `os_image`=&lt;os-image-name&gt; <br> `container_runtime_version`=&lt;container-runtime-and-version-combination&gt; <br> `kubelet_version`=&lt;kubelet-version&gt; <br> `kubeproxy_version`=&lt;kubeproxy-version&gt; <br> `provider_id`=&lt;provider-id&gt; | STABLE |
66
| kube_node_labels | Gauge | `node`=&lt;node-address&gt; <br> `label_NODE_LABEL`=&lt;NODE_LABEL&gt; | STABLE |
77
| kube_node_spec_unschedulable | Gauge | `node`=&lt;node-address&gt;|
88
| kube_node_spec_taint | Gauge | `node`=&lt;node-address&gt; <br> `key`=&lt;taint-key&gt; <br> `value=`&lt;taint-value&gt; <br> `effect=`&lt;taint-effect&gt; | STABLE |

Documentation/pod-metrics.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
| Metric name| Metric type | Labels/tags | Status |
44
| ---------- | ----------- | ----------- | ----------- |
5-
| kube_pod_info | Gauge | `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `host_ip`=&lt;host-ip&gt; <br> `pod_ip`=&lt;pod-ip&gt; <br> `node`=&lt;node-name&gt;<br> `created_by_kind`=&lt;created_by_kind&gt;<br> `created_by_name`=&lt;created_by_name&gt;<br> | STABLE |
5+
| kube_pod_info | Gauge | `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `host_ip`=&lt;host-ip&gt; <br> `pod_ip`=&lt;pod-ip&gt; <br> `node`=&lt;node-name&gt;<br> `created_by_kind`=&lt;created_by_kind&gt;<br> `created_by_name`=&lt;created_by_name&gt;<br> `uid`=&lt;pod-uid&gt;| STABLE |
66
| kube_pod_start_time | Gauge | `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; |
77
| kube_pod_completion_time | Gauge | `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; | STABLE |
88
| kube_pod_owner | Gauge | `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `owner_kind`=&lt;owner kind&gt; <br> `owner_name`=&lt;owner name&gt; <br> `owner_is_controller`=&lt;whether owner is controller&gt; | STABLE |
@@ -12,7 +12,7 @@
1212
| kube_pod_status_scheduled | Gauge | `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `condition`=&lt;true\|false\|unknown&gt; | STABLE |
1313
| kube_pod_container_info | Gauge | `container`=&lt;container-name&gt; <br> `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `image`=&lt;image-name&gt; <br> `image_id`=&lt;image-id&gt; <br> `container_id`=&lt;containerid&gt; | STABLE |
1414
| kube_pod_container_status_waiting | Gauge | `container`=&lt;container-name&gt; <br> `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; | STABLE |
15-
| kube_pod_container_status_waiting_reason | Gauge | `container`=&lt;container-name&gt; <br> `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `reason`=&lt;ContainerCreating\|CrashLoopBackOff\|ErrImagePull\|ImagePullBackOff&gt; | STABLE |
15+
| kube_pod_container_status_waiting_reason | Gauge | `container`=&lt;container-name&gt; <br> `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `reason`=&lt;ContainerCreating\|CrashLoopBackOff\|ErrImagePull\|ImagePullBackOff\|CreateContainerConfigError&gt; | STABLE |
1616
| kube_pod_container_status_running | Gauge | `container`=&lt;container-name&gt; <br> `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; | STABLE |
1717
| kube_pod_container_status_terminated | Gauge | `container`=&lt;container-name&gt; <br> `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; | STABLE |
1818
| kube_pod_container_status_terminated_reason | Gauge | `container`=&lt;container-name&gt; <br> `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `reason`=&lt;OOMKilled\|Error\|Completed\|ContainerCannotRun&gt; | STABLE |

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ BuildDate = $(shell date -u +'%Y-%m-%dT%H:%M:%SZ')
88
Commit = $(shell git rev-parse --short HEAD)
99
ALL_ARCH = amd64 arm arm64 ppc64le s390x
1010
PKG=k8s.io/kube-state-metrics/pkg
11-
GO_VERSION=1.11.2
11+
GO_VERSION=1.11.4
1212

1313
IMAGE = $(REGISTRY)/kube-state-metrics
1414
MULTI_ARCH_IMG = $(IMAGE)-$(ARCH)

README.md

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ the raw metrics.
3333
- [Metrics Documentation](#metrics-documentation)
3434
- [Kube-state-metrics self metrics](#kube-state-metrics-self-metrics)
3535
- [Resource recommendation](#resource-recommendation)
36-
- [kube-state-metrics vs. Heapster(metrics-server)](#kube-state-metrics-vs-heapstermetrics-server)
36+
- [kube-state-metrics vs. metrics-server(Heapster)](#kube-state-metrics-vs-metrics-serverheapster)
3737
- [Setup](#setup)
3838
- [Building the Docker container](#building-the-docker-container)
3939
- [Usage](#usage)
@@ -60,6 +60,7 @@ At most 5 kube-state-metrics releases will be recorded below.
6060
| **v1.3.0** | v6.0.0 |||||
6161
| **v1.3.1** | v6.0.0 |||||
6262
| **v1.4.0** | v8.0.0 |||||
63+
| **v1.5.0** | v8.0.0 |||||
6364
| **master** | v8.0.0 |||||
6465
- `` Fully supported version range.
6566
- `-` The Kubernetes cluster has features the client-go library can't use (additional API objects, etc).
@@ -72,8 +73,8 @@ release.
7273
#### Container Image
7374

7475
The latest container image can be found at:
75-
* `quay.io/coreos/kube-state-metrics:v1.4.0`
76-
* `k8s.gcr.io/kube-state-metrics:v1.4.0`
76+
* `quay.io/coreos/kube-state-metrics:v1.5.0`
77+
* `k8s.gcr.io/kube-state-metrics:v1.5.0`
7778

7879
**Note**:
7980
The recommended docker registry for kube-state-metrics is `quay.io`. kube-state-metrics on
@@ -102,12 +103,7 @@ additional metrics!
102103
See the [`Documentation`](Documentation) directory for more informations of the exposed metrics.
103104

104105
### Kube-state-metrics self metrics
105-
kube-state-metrics exposes its own metrics under `--telemetry-host` and `--telemetry-port` (default 81).
106-
107-
| Metric name | Metric type | Description | Labels/tags |
108-
| ----------- | ----------- | ----------- | ----------- |
109-
| ksm_scrape_error_total | Counter | Total scrape errors encountered when scraping a resource | `resource`=&lt;resource name&gt; |
110-
| ksm_resources_per_scrape | Summary | Number of resources returned per scrape | `resource`=&lt;resource name&gt; |
106+
kube-state-metrics exposes its own general process metrics under `--telemetry-host` and `--telemetry-port` (default 81).
111107

112108
### Resource recommendation
113109

@@ -132,32 +128,32 @@ These numbers are based on [scalability tests](https://github.com/kubernetes/kub
132128

133129
Note that if CPU limits are set too low, kube-state-metrics' internal queues will not be able to be worked off quickly enough, resulting in increased memory consumption as the queue length grows. If you experience problems resulting from high memory allocation, try increasing the CPU limits.
134130

135-
### kube-state-metrics vs. Heapster(metrics-server)
131+
### kube-state-metrics vs. metrics-server(Heapster)
136132

137-
Heapster([metrics-server](https://github.com/kubernetes-incubator/metrics-server)) is a project which fetches
133+
[metrics-server](https://github.com/kubernetes-incubator/metrics-server)(Heapster) is a project which fetches
138134
metrics (such as CPU and memory utilization) from the Kubernetes API server and
139135
nodes and sends them to various time-series backends such as InfluxDB or Google
140136
Cloud Monitoring. Its most important function right now is implementing certain
141137
metric APIs that Kubernetes components like the horizontal pod auto-scaler
142138
query to make decisions.
143139

144-
While Heapster([metrics-server](https://github.com/kubernetes-incubator/metrics-server))'s focus is on forwarding metrics already generated by
140+
While [metrics-server](https://github.com/kubernetes-incubator/metrics-server)(Heapster)'s focus is on forwarding metrics already generated by
145141
Kubernetes, kube-state-metrics is focused on generating completely new metrics
146142
from Kubernetes' object state (e.g. metrics based on deployments, replica sets,
147-
etc.). The reason not to extend Heapster([metrics-server](https://github.com/kubernetes-incubator/metrics-server)) with kube-state-metrics' abilities is
148-
because the concerns are fundamentally different: Heapster([metrics-server](https://github.com/kubernetes-incubator/metrics-server)) only needs to fetch,
143+
etc.). The reason not to extend [metrics-server](https://github.com/kubernetes-incubator/metrics-server)(Heapster) with kube-state-metrics' abilities is
144+
because the concerns are fundamentally different: [metrics-server](https://github.com/kubernetes-incubator/metrics-server)(Heapster) only needs to fetch,
149145
format and forward metrics that already exist, in particular from Kubernetes
150146
components, and write them into sinks, which are the actual monitoring
151147
systems. kube-state-metrics, in contrast, holds an entire snapshot of
152148
Kubernetes state in memory and continuously generates new metrics based off of
153149
it but has no responsibility for exporting its metrics anywhere.
154150

155151
In other words, kube-state-metrics itself is designed to be another source for
156-
Heapster([metrics-server](https://github.com/kubernetes-incubator/metrics-server)) (although this is not currently the case).
152+
[metrics-server](https://github.com/kubernetes-incubator/metrics-server)(Heapster) (although this is not currently the case).
157153

158-
Additionally, some monitoring systems such as Prometheus do not use Heapster([metrics-server](https://github.com/kubernetes-incubator/metrics-server))
154+
Additionally, some monitoring systems such as Prometheus do not use [metrics-server](https://github.com/kubernetes-incubator/metrics-server)(Heapster)
159155
for metric collection at all and instead implement their own, but
160-
[Prometheus can scrape metrics from heapster itself to alert on Heapster(metrics-server)'s health](https://kubernetes.io/docs/tasks/debug-application-cluster/core-metrics-pipeline/).
156+
[Prometheus can scrape metrics from metrics-server(Heapster) itself to alert on metrics-server(Heapster)'s health](https://kubernetes.io/docs/tasks/debug-application-cluster/core-metrics-pipeline/).
161157
Having kube-state-metrics as a separate project enables access to these metrics
162158
from those monitoring systems.
163159

kubernetes/kube-state-metrics-cluster-role-binding.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: rbac.authorization.k8s.io/v1
1+
apiVersion: rbac.authorization.k8s.io/v1
22
# kubernetes versions before 1.8.0 should use rbac.authorization.k8s.io/v1beta1
33
kind: ClusterRoleBinding
44
metadata:
@@ -11,4 +11,3 @@ subjects:
1111
- kind: ServiceAccount
1212
name: kube-state-metrics
1313
namespace: kube-system
14-

kubernetes/kube-state-metrics-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ spec:
1818
serviceAccountName: kube-state-metrics
1919
containers:
2020
- name: kube-state-metrics
21-
image: quay.io/coreos/kube-state-metrics:v1.4.0
21+
image: quay.io/coreos/kube-state-metrics:v1.5.0
2222
ports:
2323
- name: http-metrics
2424
containerPort: 8080

0 commit comments

Comments
 (0)