Skip to content

Commit 623acad

Browse files
Merge branch 'kubernetes:main' into add-deployment-topology-spread-constraints-metric
2 parents f5f8ecd + 941c683 commit 623acad

File tree

13 files changed

+117
-36
lines changed

13 files changed

+117
-36
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ jobs:
161161
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
162162

163163
- name: Set up Go 1.x
164-
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
164+
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
165165
with:
166166
go-version: ${{ env.GO_VERSION }}
167167
id: go

CONTRIBUTING.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,34 @@ Here's a list of types that we use:
3838
| chore | Other changes that don't modify src or test files |
3939
| revert | Reverts a previous commit |
4040

41+
### Local Testing
42+
43+
We recommend you to do local testing on your changes before pushing.
44+
45+
You need to first validate your modules:
46+
47+
```shell
48+
make validate-modules
49+
```
50+
51+
Then, lint check:
52+
53+
```shell
54+
make lint
55+
```
56+
57+
For unit tests:
58+
59+
```shell
60+
make test-unit
61+
```
62+
63+
And for end-to-end integration tests:
64+
65+
```shell
66+
make e2e
67+
```
68+
4169
### Further Information
4270

4371
* [Contributor License Agreement](https://git.k8s.io/community/CLA.md) Kubernetes projects require that you sign a Contributor License Agreement (CLA) before we can accept your pull requests

docs/metrics/workload/cronjob-metrics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
| kube_cronjob_next_schedule_time | Gauge | | `cronjob`=&lt;cronjob-name&gt; <br> `namespace`=&lt;cronjob-namespace&gt; | STABLE |
1010
| kube_cronjob_status_active | Gauge | | `cronjob`=&lt;cronjob-name&gt; <br> `namespace`=&lt;cronjob-namespace&gt; | STABLE |
1111
| kube_cronjob_status_last_schedule_time | Gauge | | `cronjob`=&lt;cronjob-name&gt; <br> `namespace`=&lt;cronjob-namespace&gt; | STABLE |
12-
| kube_cronjob_status_last_successful_time | Gauge | | `cronjob`=&lt;cronjob-name&gt; <br> `namespace`=&lt;cronjob-namespace&gt; | EXPERIMENTAL |
12+
| kube_cronjob_status_last_successful_time | Gauge | | `cronjob`=&lt;cronjob-name&gt; <br> `namespace`=&lt;cronjob-namespace&gt; | BETA |
1313
| kube_cronjob_spec_suspend | Gauge | | `cronjob`=&lt;cronjob-name&gt; <br> `namespace`=&lt;cronjob-namespace&gt; | STABLE |
1414
| kube_cronjob_spec_starting_deadline_seconds | Gauge | | `cronjob`=&lt;cronjob-name&gt; <br> `namespace`=&lt;cronjob-namespace&gt; | STABLE |
1515
| kube_cronjob_metadata_resource_version | Gauge | | `cronjob`=&lt;cronjob-name&gt; <br> `namespace`=&lt;cronjob-namespace&gt; | STABLE |

docs/metrics/workload/horizontalpodautoscaler-metrics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
| kube_horizontalpodautoscaler_spec_max_replicas | Gauge | | `horizontalpodautoscaler`=&lt;hpa-name&gt; <br> `namespace`=&lt;hpa-namespace&gt; | STABLE |
1010
| kube_horizontalpodautoscaler_spec_min_replicas | Gauge | | `horizontalpodautoscaler`=&lt;hpa-name&gt; <br> `namespace`=&lt;hpa-namespace&gt; | STABLE |
1111
| kube_horizontalpodautoscaler_spec_target_metric | Gauge | | `horizontalpodautoscaler`=&lt;hpa-name&gt; <br> `namespace`=&lt;hpa-namespace&gt; <br> `metric_name`=&lt;metric-name&gt; <br> `metric_target_type`=&lt;value\|utilization\|average&gt; | EXPERIMENTAL |
12-
| kube_horizontalpodautoscaler_status_target_metric | Gauge | | `horizontalpodautoscaler`=&lt;hpa-name&gt; <br> `namespace`=&lt;hpa-namespace&gt; <br> `metric_name`=&lt;metric-name&gt; <br> `metric_target_type`=&lt;value\|utilization\|average&gt; | EXPERIMENTAL |
12+
| kube_horizontalpodautoscaler_status_target_metric | Gauge | | `horizontalpodautoscaler`=&lt;hpa-name&gt; <br> `namespace`=&lt;hpa-namespace&gt; <br> `metric_name`=&lt;metric-name&gt; <br> `metric_target_type`=&lt;value\|utilization\|average&gt; | BETA |
1313
| kube_horizontalpodautoscaler_status_condition | Gauge | | `horizontalpodautoscaler`=&lt;hpa-name&gt; <br> `namespace`=&lt;hpa-namespace&gt; <br> `condition`=&lt;hpa-condition&gt; <br> `status`=&lt;true\|false\|unknown&gt; | STABLE |
1414
| kube_horizontalpodautoscaler_status_current_replicas | Gauge | | `horizontalpodautoscaler`=&lt;hpa-name&gt; <br> `namespace`=&lt;hpa-namespace&gt; | STABLE |
1515
| kube_horizontalpodautoscaler_status_desired_replicas | Gauge | | `horizontalpodautoscaler`=&lt;hpa-name&gt; <br> `namespace`=&lt;hpa-namespace&gt; | STABLE |

docs/metrics/workload/job-metrics.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@
1818
| kube_job_failed | Gauge | | `job_name`=&lt;job-name&gt; <br> `namespace`=&lt;job-namespace&gt; <br> `condition`=&lt;true\|false\|unknown&gt; | STABLE |
1919
| kube_job_created | Gauge | | `job_name`=&lt;job-name&gt; <br> `namespace`=&lt;job-namespace&gt; | STABLE |
2020
| kube_job_status_suspended | Gauge | | `job_name`=&lt;job-name&gt; <br> `namespace`=&lt;job-namespace&gt; | EXPERIMENTAL |
21+
| kube_job_status_ready | Gauge | The number of ready pods that belong to this Job. | `job_name`=&lt;job-name&gt; <br> `namespace`=&lt;job-namespace&gt; | EXPERIMENTAL |

docs/metrics/workload/pod-metrics.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
| kube_pod_status_ready_time | Gauge | Time when pod passed readiness probes. | seconds | `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `uid`=&lt;pod-uid&gt; | EXPERIMENTAL | - |
3030
| kube_pod_status_container_ready_time | Gauge | Time when the container of the pod entered Ready state. | seconds | `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `uid`=&lt;pod-uid&gt; | EXPERIMENTAL | - |
3131
| kube_pod_container_status_restarts_total | Counter | The number of container restarts per container | | `container`=&lt;container-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `pod`=&lt;pod-name&gt; <br> `uid`=&lt;pod-uid&gt; | STABLE | - |
32-
| kube_pod_container_resource_requests | Gauge | The number of requested request resource by a container. It is recommended to use the `kube_pod_resource_requests` metric exposed by kube-scheduler instead, as it is more precise. | `cpu`=&lt;core&gt; <br> `memory`=&lt;bytes&gt; | `resource`=&lt;resource-name&gt; <br> `unit`=&lt;resource-unit&gt; <br> `container`=&lt;container-name&gt; <br> `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `node`=&lt; node-name&gt; <br> `uid`=&lt;pod-uid&gt; | EXPERIMENTAL | - |
33-
| kube_pod_container_resource_limits | Gauge | The number of requested limit resource by a container. It is recommended to use the `kube_pod_resource_limits` metric exposed by kube-scheduler instead, as it is more precise. | `cpu`=&lt;core&gt; <br> `memory`=&lt;bytes&gt; | `resource`=&lt;resource-name&gt; <br> `unit`=&lt;resource-unit&gt; <br> `container`=&lt;container-name&gt; <br> `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `node`=&lt; node-name&gt; <br> `uid`=&lt;pod-uid&gt; | EXPERIMENTAL | - |
32+
| kube_pod_container_resource_requests | Gauge | The number of requested request resource by a container. It is recommended to use the `kube_pod_resource_requests` metric exposed by kube-scheduler instead, as it is more precise. | `cpu`=&lt;core&gt; <br> `memory`=&lt;bytes&gt; | `resource`=&lt;resource-name&gt; <br> `unit`=&lt;resource-unit&gt; <br> `container`=&lt;container-name&gt; <br> `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `node`=&lt; node-name&gt; <br> `uid`=&lt;pod-uid&gt; | BETA | - |
33+
| kube_pod_container_resource_limits | Gauge | The number of requested limit resource by a container. It is recommended to use the `kube_pod_resource_limits` metric exposed by kube-scheduler instead, as it is more precise. | `cpu`=&lt;core&gt; <br> `memory`=&lt;bytes&gt; | `resource`=&lt;resource-name&gt; <br> `unit`=&lt;resource-unit&gt; <br> `container`=&lt;container-name&gt; <br> `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `node`=&lt; node-name&gt; <br> `uid`=&lt;pod-uid&gt; | BETA | - |
3434
| kube_pod_overhead_cpu_cores | Gauge | The pod overhead in regards to cpu cores associated with running a pod | core | `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `uid`=&lt;pod-uid&gt; | EXPERIMENTAL | - |
3535
| kube_pod_overhead_memory_bytes | Gauge | The pod overhead in regards to memory associated with running a pod | bytes | `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `uid`=&lt;pod-uid&gt; | EXPERIMENTAL | - |
3636
| kube_pod_runtimeclass_name_info | Gauge | The runtimeclass associated with the pod | | `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `uid`=&lt;pod-uid&gt; | EXPERIMENTAL | - |

go.mod

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ require (
1717
github.com/prometheus/exporter-toolkit v0.14.1
1818
github.com/robfig/cron/v3 v3.0.1
1919
github.com/spf13/cobra v1.10.1
20-
github.com/spf13/viper v1.20.1
20+
github.com/spf13/viper v1.21.0
2121
github.com/stretchr/testify v1.11.1
2222
k8s.io/api v0.33.4
2323
k8s.io/apimachinery v0.33.4
@@ -113,7 +113,7 @@ require (
113113
github.com/go-openapi/jsonpointer v0.21.0 // indirect
114114
github.com/go-openapi/jsonreference v0.20.2 // indirect
115115
github.com/go-openapi/swag v0.23.0 // indirect
116-
github.com/go-viper/mapstructure/v2 v2.3.0 // indirect
116+
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
117117
github.com/gogo/protobuf v1.3.2 // indirect
118118
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
119119
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
@@ -180,21 +180,21 @@ require (
180180
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
181181
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
182182
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
183-
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
183+
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
184184
github.com/pjbgf/sha1cd v0.3.0 // indirect
185185
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
186186
github.com/pkg/errors v0.9.1 // indirect
187187
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
188188
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
189189
github.com/prometheus/procfs v0.16.1 // indirect
190190
github.com/ryanuber/go-glob v1.0.0 // indirect
191-
github.com/sagikazarmark/locafero v0.7.0 // indirect
191+
github.com/sagikazarmark/locafero v0.11.0 // indirect
192192
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
193193
github.com/skeema/knownhosts v1.2.2 // indirect
194-
github.com/sourcegraph/conc v0.3.0 // indirect
195-
github.com/spf13/afero v1.12.0 // indirect
196-
github.com/spf13/cast v1.7.1 // indirect
197-
github.com/spf13/pflag v1.0.9 // indirect
194+
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect
195+
github.com/spf13/afero v1.15.0 // indirect
196+
github.com/spf13/cast v1.10.0 // indirect
197+
github.com/spf13/pflag v1.0.10 // indirect
198198
github.com/stoewer/go-strcase v1.3.0 // indirect
199199
github.com/subosito/gotenv v1.6.0 // indirect
200200
github.com/ugorji/go/codec v1.2.12 // indirect
@@ -213,9 +213,8 @@ require (
213213
go.opentelemetry.io/otel/sdk/metric v1.29.0 // indirect
214214
go.opentelemetry.io/otel/trace v1.33.0 // indirect
215215
go.opentelemetry.io/proto/otlp v1.4.0 // indirect
216-
go.uber.org/multierr v1.11.0 // indirect
217216
go.yaml.in/yaml/v2 v2.4.2 // indirect
218-
go.yaml.in/yaml/v3 v3.0.3 // indirect
217+
go.yaml.in/yaml/v3 v3.0.4 // indirect
219218
go4.org/intern v0.0.0-20230525184215-6c62f75575cb // indirect
220219
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba // indirect
221220
go4.org/unsafe/assume-no-moving-gc v0.0.0-20231121144256-b99613f794b6 // indirect

0 commit comments

Comments
 (0)