Skip to content

Commit

Permalink
Merge pull request #95 from rexagod/openshift-master
Browse files Browse the repository at this point in the history
Merge with `upstream/release-2.9`
  • Loading branch information
openshift-merge-robot committed Jul 14, 2023
2 parents aa20a48 + 325b387 commit d13d44f
Show file tree
Hide file tree
Showing 1,317 changed files with 74,729 additions and 30,997 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Expand Up @@ -20,7 +20,7 @@ env:
E2E_SETUP_KIND: yes
E2E_SETUP_KUBECTL: yes
SUDO: sudo
GO_VERSION: "^1.19"
GO_VERSION: "^1.20"
GOLANGCI_LINT_VERSION: "v1.51.2"

jobs:
Expand All @@ -29,7 +29,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
id: go
Expand All @@ -51,7 +51,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
id: go
Expand All @@ -72,7 +72,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
id: go
Expand All @@ -93,7 +93,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
id: go
Expand All @@ -114,7 +114,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
id: go
Expand Down Expand Up @@ -150,7 +150,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
id: go
Expand All @@ -171,7 +171,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
id: go
Expand All @@ -192,7 +192,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
id: go
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/govulncheck.yml
Expand Up @@ -6,7 +6,7 @@ on:
- cron: '0 0 * * 1'

env:
GO_VERSION: "^1.19"
GO_VERSION: "^1.20"

jobs:
ci-security-checks:
Expand All @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v3
name: Checkout code
- name: Set up Go 1.x
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: Install govulncheck binary
Expand Down
32 changes: 32 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,35 @@
## v2.9.2 / 2023-05-30

This release does not incorporate any user-facing changes. Re-running release procedures as the process for the previous release failed. Changes are listed in v2.9.0.

## v2.9.1 / 2023-05-29

This release does not incorporate any user-facing changes. Re-running release procedures as the process for the previous release failed. Changes are listed in v2.9.0.

## v2.9.0 / 2023-05-23

The changes mentioned below are only the user-facing ones. For a list of the complete set of changes, refer the changelog associated with the release tag.

### Note

- The deprecated experimental VerticalPodAutoscaler metrics are no longer supported, and have been removed. We recommend to use CustomResourceState metrics to gather metrics from custom resources like the Vertical Pod Autoscaler.
- #2004 regulated label names to adhere with [OTel-Prometheus standards](https://github.com/open-telemetry/opentelemetry-specification/blob/8946dfc6a2302f78b0224fcc3f4dfb816a7bb1f4/specification/compatibility/prometheus_and_openmetrics.md?plain=1#L224-L229), so existing label names that do not follow the same may be replaced by the ones that do. Please refer to the PR for more details.

* [BUGFIX] Adhere to OTel-Prometheus standard for labels #2004 @rexagod
* [BUGFIX] Respect relative paths for label resolutions #2007 @rexagod
* [BUGFIX] Support LabelsFromPath functionality for Info-typed metrics #2048 @murphd40
* [CHANGE] Remove VerticalPodAutoscaler #2017 @mrueg
* [ENHANCEMENT] Add StatefulSet Start Ordinal metrics for KEP-3335 #1959 @pwschuurman
* [ENHANCEMENT] Add namespace label to `kube_lease_renew_time` #2073 @A-Hilaly
* [ENHANCEMENT] Add parameters for PodSecurity #2042 @jcpunk
* [ENHANCEMENT] Add support for multi cluster prometheus alerts #2058 @jkroepke
* [ENHANCEMENT] Don't crash on non-existent path values #1998 @rexagod
* [ENHANCEMENT] Only use OpenMetrics and Text in contentType #2024 @CatherineF-dev
* [ENHANCEMENT] Update go version to 1.20.4 #2056 @RamakrishnanArun
* [FEATURE] Add support for variable VKs in CRS config #1851 @rexagod
* [FEATURE] Support quantities and percentages #1989 @mrueg
* [FEATURE] Use prometheus/exporter-toolkit landing page #2034 @mrueg

## v2.8.2 / 2023-03-17

* [BUGFIX] Only use OpenMetrics and Text in contentType #2024 @CatherineF-dev
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
@@ -1,4 +1,4 @@
ARG GOVERSION=1.19
ARG GOVERSION=1.20
ARG GOARCH
FROM golang:${GOVERSION} as builder
ARG GOARCH
Expand Down
18 changes: 18 additions & 0 deletions MAINTAINER.md
@@ -0,0 +1,18 @@
# Maintaining kube-state-metrics

kube-state-metrics is welcoming contributions from the community. If you are interested in intensifying your contributions and becoming a maintainer, this doc describes the necessary steps.

As part of the Kubernetes project, we use the community membership process as described [here](https://github.com/kubernetes/community/blob/master/community-membership.md). We do not adhere strictly to the numbers of contributions and reviews. Still as becoming a maintainer is a trust-based process and we desire positive outcomes for the project, we look for a long-term interest and engagement.

## Adding a new reviewer
* Ensure the new reviewer is a member of the [kubernetes organization](https://github.com/kubernetes/org/blob/main/config/kubernetes/org.yaml).
* Add the new reviewer to the [OWNERS](OWNERS) file to be able to review pull requests.
* Add the new reviewer to the [kube-state-metrics-maintainers group](https://github.com/kubernetes/org/blob/main/config/kubernetes/sig-instrumentation/teams.yaml), to gain write access to the kube-state-metrics repository (e.g. for creating new releases).


## Adding a new approver
* Ensure the new approver is already a reviewer in the [OWNERS](OWNERS) file.
* Add the new approver to the [OWNERS](OWNERS) file to be able to approve pull requests.
* Add the new approver to the [SECURITY_CONTACTS](SECURITY_CONTACTS) file to be able to get notified on security related incidents.
* Add the new approver to the [kube-state-metrics-admin group](https://github.com/kubernetes/org/blob/main/config/kubernetes/sig-instrumentation/teams.yaml), to get admin access to the kube-state-metrics repository.
* Add the new approver to the k8s.io [OWNERS](https://github.com/kubernetes/k8s.io/blob/main/k8s.gcr.io/images/k8s-staging-kube-state-metrics/OWNERS) file to be able to approve image promotion from the staging registry.
11 changes: 8 additions & 3 deletions Makefile
Expand Up @@ -15,8 +15,8 @@ GIT_COMMIT ?= $(shell git rev-parse --short HEAD)
OS ?= $(shell uname -s | tr A-Z a-z)
ALL_ARCH = amd64 arm arm64 ppc64le s390x
PKG = github.com/prometheus/common
PROMETHEUS_VERSION = 2.40.6
GO_VERSION = 1.19.7
PROMETHEUS_VERSION = 2.44.0
GO_VERSION = 1.20.4
IMAGE = $(REGISTRY)/kube-state-metrics
MULTI_ARCH_IMG = $(IMAGE)-$(ARCH)
USER ?= $(shell id -u -n)
Expand Down Expand Up @@ -134,7 +134,7 @@ examples/prometheus-alerting-rules/alerts.yaml: jsonnet $(shell find jsonnet | g
mkdir -p examples/prometheus-alerting-rules
jsonnet -J scripts/vendor scripts/mixin.jsonnet | gojsontoyaml > examples/prometheus-alerting-rules/alerts.yaml

examples: examples/standard examples/autosharding mixin
examples: examples/standard examples/autosharding examples/daemonsetsharding mixin

examples/standard: jsonnet $(shell find jsonnet | grep ".libsonnet") scripts/standard.jsonnet scripts/vendor VERSION
mkdir -p examples/standard
Expand All @@ -146,6 +146,11 @@ examples/autosharding: jsonnet $(shell find jsonnet | grep ".libsonnet") scripts
jsonnet -J scripts/vendor -m examples/autosharding --ext-str version="$(VERSION)" scripts/autosharding.jsonnet | xargs -I{} sh -c 'cat {} | gojsontoyaml > `echo {} | sed "s/\(.\)\([A-Z]\)/\1-\2/g" | tr "[:upper:]" "[:lower:]"`.yaml' -- {}
find examples -type f ! -name '*.yaml' -delete

examples/daemonsetsharding: jsonnet $(shell find jsonnet | grep ".libsonnet") scripts/daemonsetsharding.jsonnet scripts/vendor VERSION
mkdir -p examples/daemonsetsharding
jsonnet -J scripts/vendor -m examples/daemonsetsharding --ext-str version="$(VERSION)" scripts/daemonsetsharding.jsonnet | xargs -I{} sh -c 'cat {} | gojsontoyaml > `echo {} | sed "s/\(.\)\([A-Z]\)/\1-\2/g" | tr "[:upper:]" "[:lower:]"`.yaml' -- {}
find examples -type f ! -name '*.yaml' -delete

scripts/vendor: scripts/jsonnetfile.json scripts/jsonnetfile.lock.json
cd scripts && jb install

Expand Down
17 changes: 5 additions & 12 deletions README.md
Expand Up @@ -37,7 +37,6 @@ are deleted they are no longer visible on the `/metrics` endpoint.
- [Container Image](#container-image)
- [Metrics Documentation](#metrics-documentation)
- [Conflict resolution in label names](#conflict-resolution-in-label-names)
- [Enabling VerticalPodAutoscalers](#enabling-verticalpodautoscalers)
- [Kube-state-metrics self metrics](#kube-state-metrics-self-metrics)
- [Resource recommendation](#resource-recommendation)
- [Latency](#latency)
Expand Down Expand Up @@ -74,11 +73,11 @@ Generally, it is recommended to use the latest release of kube-state-metrics. If

| kube-state-metrics | Kubernetes client-go Version |
|--------------------|:----------------------------:|
| **v2.4.2** | v1.23 |
| **v2.5.0** | v1.24 |
| **v2.6.0** | v1.24 |
| **v2.7.0** | v1.25 |
| **v2.8.1** | v1.26 |
| **v2.8.2** | v1.26 |
| **v2.9.2** | v1.26 |
| **main** | v1.26 |


Expand All @@ -91,7 +90,8 @@ release.
#### Container Image

The latest container image can be found at:
* `registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.8.1` (arch: `amd64`, `arm`, `arm64`, `ppc64le` and `s390x`)
* `registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.9.2` (arch: `amd64`, `arm`, `arm64`, `ppc64le` and `s390x`)
* View all multi-architecture images at [here](https://explore.ggcr.dev/?image=registry.k8s.io%2Fkube-state-metrics%2Fkube-state-metrics:v2.9.1)

### Metrics Documentation

Expand Down Expand Up @@ -123,13 +123,6 @@ e.g. by standardizing Kubernetes labels using an
[Admission Webhook](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/)
that ensures that there are no possible conflicts.

#### Enabling VerticalPodAutoscalers

Please note that the collector for `verticalpodautoscalers` is **disabled** by default; Vertical Pod Autoscaler metrics will not be collected until the collector is enabled. This is because Vertical Pod Autoscalers are managed as custom resources.

If you want to enable this collector,
the [instructions](./docs/verticalpodautoscaler-metrics.md#Configuration) are located in the [Vertical Pod Autoscaler Metrics](./docs/verticalpodautoscaler-metrics.md) documentation.

### Kube-state-metrics self metrics

kube-state-metrics exposes its own general process metrics under `--telemetry-host` and `--telemetry-port` (default 8081).
Expand Down Expand Up @@ -305,7 +298,7 @@ service account token that has read-only access to the Kubernetes cluster.

The ([`kube-prometheus`](https://github.com/prometheus-operator/kube-prometheus/)) stack installs kube-state-metrics as one of its [components](https://github.com/prometheus-operator/kube-prometheus#kube-prometheus); you do not need to install kube-state-metrics if you're using the kube-prometheus stack.

If you want to revise the default configuration for kube-prometheus, for example to enable non-default metrics, have a look at [Customizing Kube-Prometheus](https://github.com/prometheus-operator/kube-prometheus#customizing-kube-prometheus).
If you want to revise the default configuration for kube-prometheus, for example to enable non-default metrics, have a look at [Customizing Kube-Prometheus](https://github.com/prometheus-operator/kube-prometheus/blob/main/docs/customizing.md).

#### Kubernetes Deployment

Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
2.8.2
2.9.2
4 changes: 2 additions & 2 deletions cloudbuild.yaml
@@ -1,9 +1,9 @@
# See https://cloud.google.com/cloud-build/docs/build-config
timeout: 1800s
timeout: 2400s
options:
substitution_option: ALLOW_LOOSE
steps:
- name: 'gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20220609-2e4c91eb7e'
- name: 'gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20230522-312425ae46'
entrypoint: make
env:
- TAG=$_PULL_BASE_REF
Expand Down
1 change: 0 additions & 1 deletion docs/README.md
Expand Up @@ -70,7 +70,6 @@ See each file for specific documentation about the exposed metrics:
- [Role Metrics](role-metrics.md)
- [RoleBinding Metrics](rolebinding-metrics.md)
- [ServiceAccount Metrics](serviceaccount-metrics.md)
- [VerticalPodAutoscaler Metrics](verticalpodautoscaler-metrics.md)

## Join Metrics

Expand Down

0 comments on commit d13d44f

Please sign in to comment.