diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96955aee4a..c10fdbea5d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ env: E2E_SETUP_KIND: yes E2E_SETUP_KUBECTL: yes SUDO: sudo - GO_VERSION: "^1.18" + GO_VERSION: "^1.19" GOLANGCI_LINT_VERSION: "v1.48.0" jobs: diff --git a/Dockerfile b/Dockerfile index ae9ea350cf..c28baf6f1d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG GOVERSION=1.18 +ARG GOVERSION=1.19 ARG GOARCH FROM golang:${GOVERSION} as builder ARG GOARCH diff --git a/Makefile b/Makefile index 5d0b6db6ff..c33e9a177a 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ OS ?= $(shell uname -s | tr A-Z a-z) ALL_ARCH = amd64 arm arm64 ppc64le s390x PKG = github.com/prometheus/common PROMETHEUS_VERSION = 2.37.0 -GO_VERSION = 1.18.5 +GO_VERSION = 1.19.2 IMAGE = $(REGISTRY)/kube-state-metrics MULTI_ARCH_IMG = $(IMAGE)-$(ARCH) USER ?= $(shell id -u -n) diff --git a/README.md b/README.md index 727a49bed0..096c11840c 100644 --- a/README.md +++ b/README.md @@ -67,19 +67,16 @@ All additional compatibility is only best effort, or happens to still/already be #### Compatibility matrix At most, 5 kube-state-metrics and 5 [kubernetes releases](https://github.com/kubernetes/kubernetes/releases) will be recorded below. +Generally, it is recommended to use the latest release of kube-state-metrics. If you run a very recent version of Kubernetes, you might want to use an unreleased version to have the full range of supported resources. If you run an older version of Kubernetes, you might need to run an older version in order to have full support for all resources. Be aware, that the maintainers will only support the latest release. Older versions might be supported by interested users of the community. -| kube-state-metrics | **Kubernetes 1.20** | **Kubernetes 1.21** | **Kubernetes 1.22** | **Kubernetes 1.23** | **Kubernetes 1.24** | -|--------------------|:--------------------:|:---------------------:|:-------------------:|:-------------------:|:-------------------:| -| **v2.3.0** | ✓ | ✓ | ✓ | ✓ | - | -| **v2.4.2** | -/✓ | -/✓ | ✓ | ✓ | - | -| **v2.5.0** | -/✓ | -/✓ | ✓ | ✓ | ✓ | -| **v2.6.0** | -/✓ | -/✓ | ✓ | ✓ | ✓ | -| **master** | -/✓ | -/✓ | ✓ | ✓ | ✓ | +| kube-state-metrics | Kubernetes client-go Version | +|--------------------|:----------------------------:| +| **v2.3.0** | v1.23 | +| **v2.4.2** | v1.23 | +| **v2.5.0** | v1.24 | +| **v2.6.0** | v1.24 | +| **master** | v1.25 | -- `✓` Fully supported version range. -- `-` The Kubernetes cluster has features the client-go library can't use (additional API objects, deprecated APIs, etc). - -**Note:** The current kube-state-metrics `v2.0.0 +` releases work on Kubernetes v1.17 & v1.18 excluding Ingress or CertificateSigningRequest resource metrics. If you require those metrics on an older Kubernetes version, use kube-state-metrics `v1.9.8`. #### Resource group version compatibility diff --git a/docs/customresourcestate-metrics.md b/docs/customresourcestate-metrics.md index 963e5fc55b..3242cefdfd 100644 --- a/docs/customresourcestate-metrics.md +++ b/docs/customresourcestate-metrics.md @@ -43,8 +43,9 @@ spec: metrics: - name: active_count help: "Count of active Foo" - type: Gauge - ... + each: + type: Gauge + ... - --resources=certificatesigningrequests,configmaps,cronjobs,daemonsets,deployments,endpoints,foos,horizontalpodautoscalers,ingresses,jobs,limitranges,mutatingwebhookconfigurations,namespaces,networkpolicies,nodes,persistentvolumeclaims,persistentvolumes,poddisruptionbudgets,pods,replicasets,replicationcontrollers,resourcequotas,secrets,services,statefulsets,storageclasses,validatingwebhookconfigurations,volumeattachments,verticalpodautoscalers ``` diff --git a/docs/lease-metrics.md b/docs/lease-metrics.md index 8d995116a3..ee6bfb9ba7 100644 --- a/docs/lease-metrics.md +++ b/docs/lease-metrics.md @@ -1,6 +1,6 @@ # Lease Metrics -| Metric name| Metric type | Labels/tags | Status | -| ---------- | ----------- | ----------- | ----------- | -| kube_lease_owner | Gauge | `lease`=<lease-name>
`owner_kind`=<onwer kind>
`owner_name`=<owner name> | EXPERIMENTAL | -| kube_lease_renew_time | Gauge | `lease`=<lease-name> | EXPERIMENTAL | +| Metric name| Metric type | Labels/tags | Status | +| ---------- | ----------- |-------------------------------------------------------------------------------------------------------------------------------------------| ----------- | +| kube_lease_owner | Gauge | `lease`=<lease-name>
`owner_kind`=<onwer kind>
`owner_name`=<owner name>
`namespace` = <namespace>
`lease_holder`=<lease holder name>| EXPERIMENTAL | +| kube_lease_renew_time | Gauge | `lease`=<lease-name> | EXPERIMENTAL | diff --git a/go.mod b/go.mod index 6422f4a6d4..8e45889a6b 100644 --- a/go.mod +++ b/go.mod @@ -18,20 +18,21 @@ require ( github.com/stretchr/testify v1.8.0 golang.org/x/perf v0.0.0-20220722155240-3d85ee92886d gopkg.in/yaml.v3 v3.0.1 - k8s.io/api v0.24.4 - k8s.io/apimachinery v0.24.4 - k8s.io/autoscaler/vertical-pod-autoscaler v0.11.0 - k8s.io/client-go v0.24.4 - k8s.io/klog/v2 v2.70.1 - k8s.io/sample-controller v0.24.4 - k8s.io/utils v0.0.0-20220812165043-ad590609e2e5 + k8s.io/api v0.25.2 + k8s.io/apimachinery v0.25.2 + k8s.io/autoscaler/vertical-pod-autoscaler v0.12.0 + k8s.io/client-go v0.25.2 + k8s.io/component-base v0.25.2 + k8s.io/klog/v2 v2.80.1 + k8s.io/sample-controller v0.25.2 + k8s.io/utils v0.0.0-20220922133306-665eaaec4324 ) require ( - cloud.google.com/go v0.81.0 // indirect + cloud.google.com/go v0.97.0 // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect - github.com/Azure/go-autorest/autorest v0.11.18 // indirect - github.com/Azure/go-autorest/autorest/adal v0.9.13 // indirect + github.com/Azure/go-autorest/autorest v0.11.27 // indirect + github.com/Azure/go-autorest/autorest/adal v0.9.20 // indirect github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect github.com/Azure/go-autorest/logger v0.2.1 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect @@ -40,25 +41,25 @@ require ( github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/beorn7/perks v1.0.1 // indirect + github.com/blang/semver/v4 v4.0.0 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emicklei/go-restful v2.9.5+incompatible // indirect + github.com/emicklei/go-restful/v3 v3.8.0 // indirect github.com/evanphx/json-patch v4.12.0+incompatible // indirect github.com/fatih/color v1.13.0 // indirect - github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect - github.com/fsnotify/fsnotify v1.5.1 // indirect github.com/ghodss/yaml v1.0.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect - github.com/go-logr/logr v1.2.0 // indirect + github.com/go-logr/logr v1.2.3 // indirect github.com/go-openapi/jsonpointer v0.19.5 // indirect github.com/go-openapi/jsonreference v0.19.5 // indirect github.com/go-openapi/swag v0.19.14 // indirect github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang-jwt/jwt/v4 v4.2.0 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/google/gnostic v0.5.7-v3refs // indirect github.com/google/gofuzz v1.1.0 // indirect - github.com/imdario/mergo v0.3.5 // indirect + github.com/imdario/mergo v0.3.6 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect @@ -70,15 +71,13 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect - github.com/onsi/ginkgo v1.16.5 // indirect - github.com/onsi/gomega v1.17.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/procfs v0.8.0 // indirect golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect - golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect + golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect - golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c // indirect + golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect golang.org/x/text v0.3.7 // indirect golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect @@ -87,9 +86,9 @@ require ( gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 // indirect - sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect + k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect + sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/go.sum b/go.sum index bb456a1215..08186905a8 100644 --- a/go.sum +++ b/go.sum @@ -18,8 +18,15 @@ cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKP cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0 h1:at8Tk2zUz63cLPR0JPWm5vp77pEZmzxEQBEfRKn1VV8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0 h1:3DXvAyifywvq64LfkKaMOmkWPS1CikIQdMe2lY9vxU8= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -39,35 +46,30 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest v0.11.18 h1:90Y4srNYrwOtAgVo3ndrQkTYn6kf1Eg/AjTFJ8Is2aM= -github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= -github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/adal v0.9.13 h1:Mp5hbtOePIzM8pJVRa3YLrWWmZtoxRXqUEzCfJt3+/Q= -github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= -github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest v0.11.27 h1:F3R3q42aWytozkV8ihzcgMO4OA4cuqr3bNlsEuF6//A= +github.com/Azure/go-autorest/autorest v0.11.27/go.mod h1:7l8ybrIdUmGqZMTD0sRtAr8NvbHjfofbf8RSP2q7w7U= +github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= +github.com/Azure/go-autorest/autorest/adal v0.9.20 h1:gJ3E98kMpFB1MFqQCvA1yFab8vthOeD4VlFRQULxahg= +github.com/Azure/go-autorest/autorest/adal v0.9.20/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/autorest/mocks v0.4.2 h1:PGN4EDXnuQbojHbU0UWoNvmu9AGVwYHG9/fkDYhtAfw= +github.com/Azure/go-autorest/autorest/mocks v0.4.2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU= github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/GoogleCloudPlatform/cloudsql-proxy v0.0.0-20190129172621-c8b1d7a94ddf/go.mod h1:aJ4qN3TfrelA6NZ6AXsXRfmEVaYin3EDbSPJrKS8OXo= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= -github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/aclements/go-gg v0.0.0-20170118225347-6dbb4e4fefb0/go.mod h1:55qNq4vcpkIuHowELi5C8e+1yUHtoLoOUR9QU5j7Tes= @@ -82,13 +84,17 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= +github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/brancz/gojsontoyaml v0.1.0 h1:SdzR3+BCVOqaI42nFGTeaB7/2DgDM4fhuvRLqxatA8M= @@ -96,6 +102,8 @@ github.com/brancz/gojsontoyaml v0.1.0/go.mod h1:+ycZY94+V11XZBUaDEsbLr3hPNS/ZPrD github.com/campoy/embedmd v1.0.0 h1:V4kI2qTJJLf4J29RzI/MAt2c3Bl4dQSYPuflzwFH2hY= github.com/campoy/embedmd v1.0.0/go.mod h1:oxyr9RCiSXg0M3VJ3ks0UGfp98BpSSGr0kpiX3MzVl8= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -106,42 +114,43 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-jump v0.0.0-20211018200510-ba001c3ffce0 h1:0wH6nO9QEa02Qx8sIQGw6ieKdz+BXjpccSOo9vXNl4U= github.com/dgryski/go-jump v0.0.0-20211018200510-ba001c3ffce0/go.mod h1:4hKCXuwrJoYvHZxJ86+bRVTOMyJ0Ej+RqfSm8mHi6KA= -github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk= -github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful/v3 v3.8.0 h1:eCZ8ulSerjdAiaNpF7GxXIE7ZCMo1moN1qX+S609eVw= +github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= -github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/form3tech-oss/jwt-go v3.2.3+incompatible h1:7ZaBxOI7TMoYBfyA3cQHErNNyAWIKUMIwqxEtgHOs5c= -github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= -github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= -github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= @@ -167,23 +176,17 @@ github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNV github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v1.2.0 h1:QK40JKJyMdUDz+h+xvCsru/bJhvG0UxvePV0ufL/AcE= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= -github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= +github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= -github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/jsonreference v0.19.5 h1:1WJP/wi4OjB4iV8KVbH73rQaoialJrqv8gitZLxGLtM= github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= -github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= -github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= -github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= -github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.14 h1:gm3vOOXfiuw5i9p5N9xJvfjvuofpyvLA9Wr6QfK5Fng= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= @@ -194,12 +197,13 @@ github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg78 github.com/gobuffalo/flect v0.2.5 h1:H6vvsv2an0lalEaCDRThvtBfmg44W/QHXBCYUXf/6S4= github.com/gobuffalo/flect v0.2.5/go.mod h1:1ZyCLIbg0YD7sDkzvFdPoOydPtD8y9JQnrOROolUcM8= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU= +github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -212,7 +216,7 @@ github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -231,6 +235,7 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gonum/blas v0.0.0-20181208220705-f22b278b28ac/go.mod h1:P32wAyui1PQ58Oce/KYkOqQv8cVw1zAapXOl+dRFGbc= github.com/gonum/floats v0.0.0-20181209220543-c233463c7e82/go.mod h1:PxC8OnwL11+aosOB5+iEPoV3picfs8tUpkVd0pDo+Kg= github.com/gonum/internal v0.0.0-20181124074243-f884aa714029/go.mod h1:Pu4dmpkhSyOzRwuXkOgAvijx4o+4YMUJJo9OvPYMkks= @@ -252,6 +257,7 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-jsonnet v0.18.0 h1:/6pTy6g+Jh1a1I2UMoAODkqELFiVIdOxbNwv0DDzoOg= @@ -262,6 +268,7 @@ github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -273,32 +280,34 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go v0.0.0-20161107002406-da06d194a00e/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.5 h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q= -github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= +github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -311,7 +320,6 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -323,14 +331,11 @@ github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= @@ -346,6 +351,7 @@ github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182aff github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -362,24 +368,23 @@ github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRW github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= -github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= +github.com/onsi/ginkgo/v2 v2.1.6 h1:Fx2POJZfKRQcM1pH49qSZiYeu319wji004qX+GDovrU= +github.com/onsi/ginkgo/v2 v2.1.6/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7AG4VIk= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= +github.com/onsi/gomega v1.20.1 h1:PA/3qinGoukvymdIDV8pii6tiZgC8kbmJO6Z5+b002Q= +github.com/onsi/gomega v1.20.1/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY= github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= @@ -414,7 +419,6 @@ github.com/prometheus/exporter-toolkit v0.7.1 h1:c6RXaK8xBVercEeUQ4tRNL8UGWzDHfv github.com/prometheus/exporter-toolkit v0.7.1/go.mod h1:ZUBIj498ePooX9t/2xtDjeQYwvRpiPP2lh5u4iblj2g= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= @@ -422,10 +426,12 @@ github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5 github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= @@ -433,8 +439,10 @@ github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNX github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= @@ -458,6 +466,7 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -465,20 +474,30 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= +go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= +go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= +go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= +go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= +go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= +go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= +go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= +go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd h1:XcWmESyNjXJMLahc3mqVQJcgSTDxFxhETVlfk9uGc38= golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -517,6 +536,7 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -529,7 +549,7 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= -golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -546,7 +566,6 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -571,12 +590,15 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20170207211851-4464e7848382/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -590,6 +612,9 @@ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b h1:clP8eMhB30EHdc0bd2Twtq6kgU7yl5ub2cQLSdrv1Dg= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= @@ -607,12 +632,11 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -620,13 +644,11 @@ golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -643,7 +665,6 @@ golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -664,21 +685,28 @@ golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -696,8 +724,6 @@ golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0k golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -708,14 +734,14 @@ golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -751,8 +777,13 @@ golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.10-0.20220218145154-897bd77cd717/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -786,6 +817,13 @@ google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34q google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -817,6 +855,7 @@ google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= @@ -834,6 +873,22 @@ google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/grpc v0.0.0-20170208002647-2a6bf6142e96/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -848,11 +903,21 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -866,6 +931,7 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= @@ -880,10 +946,10 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -896,6 +962,8 @@ gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= +gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -903,56 +971,46 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.18.3/go.mod h1:UOaMwERbqJMfeeeHc8XJKawj4P9TgDRnViIqqBeH2QA= -k8s.io/api v0.24.4 h1:I5Y645gJ8zWKawyr78lVfDQkZrAViSbeRXsPZWTxmXk= -k8s.io/api v0.24.4/go.mod h1:42pVfA0NRxrtJhZQOvRSyZcJihzAdU59WBtTjYcB0/M= -k8s.io/apimachinery v0.18.3/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= -k8s.io/apimachinery v0.24.4 h1:S0Ur3J/PbivTcL43EdSdPhqCqKla2NIuneNwZcTDeGQ= -k8s.io/apimachinery v0.24.4/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= -k8s.io/autoscaler/vertical-pod-autoscaler v0.11.0 h1:vh6cHU/sZBjdfYlKZOhXkMI5CTCgK12TauHGoQOue+4= -k8s.io/autoscaler/vertical-pod-autoscaler v0.11.0/go.mod h1:CviXA+byKc3EV10oxt8S+YYVipks1+onIqLGNPV52xM= -k8s.io/client-go v0.18.3/go.mod h1:4a/dpQEvzAhT1BbuWW09qvIaGw6Gbu1gZYiQZIi1DMw= -k8s.io/client-go v0.24.4 h1:hIAIJZIPyaw46AkxwyR0FRfM/pRxpUNTd3ysYu9vyRg= -k8s.io/client-go v0.24.4/go.mod h1:+AxlPWw/H6f+EJhRSjIeALaJT4tbeB/8g9BNvXGPd0Y= -k8s.io/code-generator v0.18.3/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= -k8s.io/code-generator v0.24.4/go.mod h1:dpVhs00hTuTdTY6jvVxvTFCk6gSMrtfRydbhZwHI15w= -k8s.io/component-base v0.18.3/go.mod h1:bp5GzGR0aGkYEfTj+eTY0AN/vXTgkJdQXjNTTVUaa3k= -k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/api v0.25.0/go.mod h1:ttceV1GyV1i1rnmvzT3BST08N6nGt+dudGrquzVQWPk= +k8s.io/api v0.25.2 h1:v6G8RyFcwf0HR5jQGIAYlvtRNrxMJQG1xJzaSeVnIS8= +k8s.io/api v0.25.2/go.mod h1:qP1Rn4sCVFwx/xIhe+we2cwBLTXNcheRyYXwajonhy0= +k8s.io/apimachinery v0.25.0/go.mod h1:qMx9eAk0sZQGsXGu86fab8tZdffHbwUfsvzqKn4mfB0= +k8s.io/apimachinery v0.25.2 h1:WbxfAjCx+AeN8Ilp9joWnyJ6xu9OMeS/fsfjK/5zaQs= +k8s.io/apimachinery v0.25.2/go.mod h1:hqqA1X0bsgsxI6dXsJ4HnNTBOmJNxyPp8dw3u2fSHwA= +k8s.io/autoscaler/vertical-pod-autoscaler v0.12.0 h1:cy8LoXSl5GkTNJDTx3ZCS143f9Ai7gqnGkoUxPlGSmI= +k8s.io/autoscaler/vertical-pod-autoscaler v0.12.0/go.mod h1:LraL5kR2xX7jb4VMCG6/tUH4I75uRHlnzC0VWQHcyWk= +k8s.io/client-go v0.25.0/go.mod h1:lxykvypVfKilxhTklov0wz1FoaUZ8X4EwbhS6rpRfN8= +k8s.io/client-go v0.25.2 h1:SUPp9p5CwM0yXGQrwYurw9LWz+YtMwhWd0GqOsSiefo= +k8s.io/client-go v0.25.2/go.mod h1:i7cNU7N+yGQmJkewcRD2+Vuj4iz7b30kI8OcL3horQ4= +k8s.io/code-generator v0.25.0/go.mod h1:B6jZgI3DvDFAualltPitbYMQ74NjaCFxum3YeKZZ+3w= +k8s.io/code-generator v0.25.2/go.mod h1:f61OcU2VqVQcjt/6TrU0sta1TA5hHkOO6ZZPwkL9Eys= +k8s.io/component-base v0.25.0/go.mod h1:F2Sumv9CnbBlqrpdf7rKZTmmd2meJq0HizeyY/yAFxk= +k8s.io/component-base v0.25.2 h1:Nve/ZyHLUBHz1rqwkjXm/Re6IniNa5k7KgzxZpTfSQY= +k8s.io/component-base v0.25.2/go.mod h1:90W21YMr+Yjg7MX+DohmZLzjsBtaxQDDwaX4YxDkl60= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/gengo v0.0.0-20211129171323-c02415ce4185/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= -k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/klog/v2 v2.70.1 h1:7aaoSdahviPmR+XkS7FyxlkkXs6tHISSG03RxleQAVQ= k8s.io/klog/v2 v2.70.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= -k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 h1:Gii5eqf+GmIEwGNKQYQClCayuJCe2/4fZUvF7VG99sU= -k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= -k8s.io/metrics v0.18.3/go.mod h1:TkuJE3ezDZ1ym8pYkZoEzJB7HDiFE7qxl+EmExEBoPA= -k8s.io/sample-controller v0.24.4 h1:IN6Nu37mfD5eWcsFqSyWiSPeBLMGIopYy0VLshKzHHk= -k8s.io/sample-controller v0.24.4/go.mod h1:umvQrzpq2SpLYM1rrGOY9w8w3puL2vRGESQFYHe2MBM= -k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4= +k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 h1:MQ8BAZPZlWk3S9K4a9NCkIFQtZShWqoha7snGixVgEA= +k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1/go.mod h1:C/N6wCaBHeBHkHUesQOQy2/MZqGgMAFPqGsGQLdbZBU= +k8s.io/metrics v0.25.0/go.mod h1:HZZrbhuRX+fsDcRc3u59o2FbrKhqD67IGnoFECNmovc= +k8s.io/sample-controller v0.25.2 h1:nNbg1HWuurEFNnPgQmup4zDza2FJ+TG6vxfPOnSMlEo= +k8s.io/sample-controller v0.25.2/go.mod h1:JYee8Sey/F0WrkhkUdB3vVMQYzzmMQTVRpcgg7Veddg= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20220812165043-ad590609e2e5 h1:XmRqFcQlCy/lKRZ39j+RVpokYNroHPqV3mcBRfnhT5o= -k8s.io/utils v0.0.0-20220812165043-ad590609e2e5/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20220922133306-665eaaec4324 h1:i+xdFemcSNuJvIfBlaYuXgRondKxK4z4prVPKzEaelI= +k8s.io/utils v0.0.0-20220922133306-665eaaec4324/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y= -sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= -sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= -sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= +sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= +sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= diff --git a/internal/store/certificatesigningrequest.go b/internal/store/certificatesigningrequest.go index bec123b7f2..1b0eae4fcd 100644 --- a/internal/store/certificatesigningrequest.go +++ b/internal/store/certificatesigningrequest.go @@ -19,6 +19,8 @@ package store import ( "context" + basemetrics "k8s.io/component-base/metrics" + "k8s.io/kube-state-metrics/v2/pkg/metric" generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator" @@ -58,10 +60,11 @@ func csrMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generat } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( descCSRLabelsName, descCSRLabelsHelp, metric.Gauge, + basemetrics.STABLE, "", wrapCSRFunc(func(j *certv1.CertificateSigningRequest) *metric.Family { labelKeys, labelValues := createPrometheusLabelKeysValues("label", j.Labels, allowLabelsList) @@ -76,10 +79,11 @@ func csrMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generat } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_certificatesigningrequest_created", "Unix creation timestamp", metric.Gauge, + basemetrics.STABLE, "", wrapCSRFunc(func(csr *certv1.CertificateSigningRequest) *metric.Family { ms := []*metric.Metric{} @@ -96,10 +100,11 @@ func csrMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generat } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_certificatesigningrequest_condition", "The number of each certificatesigningrequest condition", metric.Gauge, + basemetrics.STABLE, "", wrapCSRFunc(func(csr *certv1.CertificateSigningRequest) *metric.Family { return &metric.Family{ @@ -107,10 +112,11 @@ func csrMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generat } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_certificatesigningrequest_cert_length", "Length of the issued cert", metric.Gauge, + basemetrics.STABLE, "", wrapCSRFunc(func(csr *certv1.CertificateSigningRequest) *metric.Family { return &metric.Family{ diff --git a/internal/store/certificatesigningrequest_test.go b/internal/store/certificatesigningrequest_test.go index 4849b87363..990061942a 100644 --- a/internal/store/certificatesigningrequest_test.go +++ b/internal/store/certificatesigningrequest_test.go @@ -28,13 +28,13 @@ import ( func TestCsrStore(t *testing.T) { const metadata = ` - # HELP kube_certificatesigningrequest_labels Kubernetes labels converted to Prometheus labels. + # HELP kube_certificatesigningrequest_labels [STABLE] Kubernetes labels converted to Prometheus labels. # TYPE kube_certificatesigningrequest_labels gauge - # HELP kube_certificatesigningrequest_created Unix creation timestamp + # HELP kube_certificatesigningrequest_created [STABLE] Unix creation timestamp # TYPE kube_certificatesigningrequest_created gauge - # HELP kube_certificatesigningrequest_condition The number of each certificatesigningrequest condition + # HELP kube_certificatesigningrequest_condition [STABLE] The number of each certificatesigningrequest condition # TYPE kube_certificatesigningrequest_condition gauge - # HELP kube_certificatesigningrequest_cert_length Length of the issued cert + # HELP kube_certificatesigningrequest_cert_length [STABLE] Length of the issued cert # TYPE kube_certificatesigningrequest_cert_length gauge ` cases := []generateMetricsTestCase{ diff --git a/internal/store/configmap.go b/internal/store/configmap.go index 8a6e4a172a..2f26a8e7b7 100644 --- a/internal/store/configmap.go +++ b/internal/store/configmap.go @@ -25,6 +25,7 @@ import ( "k8s.io/apimachinery/pkg/watch" clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/cache" + basemetrics "k8s.io/component-base/metrics" "k8s.io/kube-state-metrics/v2/pkg/metric" generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator" @@ -54,10 +55,11 @@ func configMapMetricFamilies(allowAnnotationsList, allowLabelsList []string) []g } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_configmap_labels", "Kubernetes labels converted to Prometheus labels.", metric.Gauge, + basemetrics.STABLE, "", wrapConfigMapFunc(func(c *v1.ConfigMap) *metric.Family { labelKeys, labelValues := createPrometheusLabelKeysValues("label", c.Labels, allowLabelsList) @@ -72,10 +74,11 @@ func configMapMetricFamilies(allowAnnotationsList, allowLabelsList []string) []g } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_configmap_info", "Information about configmap.", metric.Gauge, + basemetrics.STABLE, "", wrapConfigMapFunc(func(c *v1.ConfigMap) *metric.Family { return &metric.Family{ @@ -87,10 +90,11 @@ func configMapMetricFamilies(allowAnnotationsList, allowLabelsList []string) []g } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_configmap_created", "Unix creation timestamp", metric.Gauge, + basemetrics.STABLE, "", wrapConfigMapFunc(func(c *v1.ConfigMap) *metric.Family { ms := []*metric.Metric{} diff --git a/internal/store/configmap_test.go b/internal/store/configmap_test.go index 0cbc08d3bc..aecf13c4d7 100644 --- a/internal/store/configmap_test.go +++ b/internal/store/configmap_test.go @@ -54,8 +54,8 @@ func TestConfigMapStore(t *testing.T) { }, Want: ` # HELP kube_configmap_annotations Kubernetes annotations converted to Prometheus labels. - # HELP kube_configmap_labels Kubernetes labels converted to Prometheus labels. - # HELP kube_configmap_info Information about configmap. + # HELP kube_configmap_labels [STABLE] Kubernetes labels converted to Prometheus labels. + # HELP kube_configmap_info [STABLE] Information about configmap. # HELP kube_configmap_metadata_resource_version Resource version representing a specific version of the configmap. # TYPE kube_configmap_annotations gauge # TYPE kube_configmap_labels gauge @@ -82,8 +82,8 @@ func TestConfigMapStore(t *testing.T) { }, }, Want: ` - # HELP kube_configmap_created Unix creation timestamp - # HELP kube_configmap_info Information about configmap. + # HELP kube_configmap_created [STABLE] Unix creation timestamp + # HELP kube_configmap_info [STABLE] Information about configmap. # HELP kube_configmap_metadata_resource_version Resource version representing a specific version of the configmap. # TYPE kube_configmap_created gauge # TYPE kube_configmap_info gauge diff --git a/internal/store/cronjob.go b/internal/store/cronjob.go index f7b82deb86..dc762e1b2f 100644 --- a/internal/store/cronjob.go +++ b/internal/store/cronjob.go @@ -29,6 +29,7 @@ import ( "k8s.io/apimachinery/pkg/watch" clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/cache" + basemetrics "k8s.io/component-base/metrics" "k8s.io/kube-state-metrics/v2/pkg/metric" generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator" @@ -62,10 +63,11 @@ func cronJobMetricFamilies(allowAnnotationsList, allowLabelsList []string) []gen } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( descCronJobLabelsName, descCronJobLabelsHelp, metric.Gauge, + basemetrics.STABLE, "", wrapCronJobFunc(func(j *batchv1.CronJob) *metric.Family { labelKeys, labelValues := createPrometheusLabelKeysValues("label", j.Labels, allowLabelsList) @@ -80,10 +82,11 @@ func cronJobMetricFamilies(allowAnnotationsList, allowLabelsList []string) []gen } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_cronjob_info", "Info about cronjob.", metric.Gauge, + basemetrics.STABLE, "", wrapCronJobFunc(func(j *batchv1.CronJob) *metric.Family { return &metric.Family{ @@ -97,10 +100,11 @@ func cronJobMetricFamilies(allowAnnotationsList, allowLabelsList []string) []gen } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_cronjob_created", "Unix creation timestamp", metric.Gauge, + basemetrics.STABLE, "", wrapCronJobFunc(func(j *batchv1.CronJob) *metric.Family { ms := []*metric.Metric{} @@ -117,10 +121,11 @@ func cronJobMetricFamilies(allowAnnotationsList, allowLabelsList []string) []gen } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_cronjob_status_active", "Active holds pointers to currently running jobs.", metric.Gauge, + basemetrics.STABLE, "", wrapCronJobFunc(func(j *batchv1.CronJob) *metric.Family { return &metric.Family{ @@ -134,10 +139,11 @@ func cronJobMetricFamilies(allowAnnotationsList, allowLabelsList []string) []gen } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_cronjob_status_last_schedule_time", "LastScheduleTime keeps information of when was the last time the job was successfully scheduled.", metric.Gauge, + basemetrics.STABLE, "", wrapCronJobFunc(func(j *batchv1.CronJob) *metric.Family { ms := []*metric.Metric{} @@ -176,10 +182,11 @@ func cronJobMetricFamilies(allowAnnotationsList, allowLabelsList []string) []gen } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_cronjob_spec_suspend", "Suspend flag tells the controller to suspend subsequent executions.", metric.Gauge, + basemetrics.STABLE, "", wrapCronJobFunc(func(j *batchv1.CronJob) *metric.Family { ms := []*metric.Metric{} @@ -197,10 +204,11 @@ func cronJobMetricFamilies(allowAnnotationsList, allowLabelsList []string) []gen } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_cronjob_spec_starting_deadline_seconds", "Deadline in seconds for starting the job if it misses scheduled time for any reason.", metric.Gauge, + basemetrics.STABLE, "", wrapCronJobFunc(func(j *batchv1.CronJob) *metric.Family { ms := []*metric.Metric{} @@ -219,10 +227,11 @@ func cronJobMetricFamilies(allowAnnotationsList, allowLabelsList []string) []gen } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_cronjob_next_schedule_time", "Next time the cronjob should be scheduled. The time after lastScheduleTime, or after the cron job's creation time if it's never been scheduled. Use this to determine if the job is delayed.", metric.Gauge, + basemetrics.STABLE, "", wrapCronJobFunc(func(j *batchv1.CronJob) *metric.Family { ms := []*metric.Metric{} @@ -244,10 +253,11 @@ func cronJobMetricFamilies(allowAnnotationsList, allowLabelsList []string) []gen } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_cronjob_metadata_resource_version", "Resource version representing a specific version of the cronjob.", metric.Gauge, + basemetrics.STABLE, "", wrapCronJobFunc(func(j *batchv1.CronJob) *metric.Family { return &metric.Family{ diff --git a/internal/store/cronjob_test.go b/internal/store/cronjob_test.go index 7c1b684fdf..9b992874b2 100644 --- a/internal/store/cronjob_test.go +++ b/internal/store/cronjob_test.go @@ -135,18 +135,18 @@ func TestCronJobStore(t *testing.T) { }, }, Want: ` - # HELP kube_cronjob_created Unix creation timestamp - # HELP kube_cronjob_info Info about cronjob. + # HELP kube_cronjob_created [STABLE] Unix creation timestamp + # HELP kube_cronjob_info [STABLE] Info about cronjob. # HELP kube_cronjob_annotations Kubernetes annotations converted to Prometheus labels. - # HELP kube_cronjob_labels Kubernetes labels converted to Prometheus labels. - # HELP kube_cronjob_next_schedule_time Next time the cronjob should be scheduled. The time after lastScheduleTime, or after the cron job's creation time if it's never been scheduled. Use this to determine if the job is delayed. + # HELP kube_cronjob_labels [STABLE] Kubernetes labels converted to Prometheus labels. + # HELP kube_cronjob_next_schedule_time [STABLE] Next time the cronjob should be scheduled. The time after lastScheduleTime, or after the cron job's creation time if it's never been scheduled. Use this to determine if the job is delayed. # HELP kube_cronjob_spec_failed_job_history_limit Failed job history limit tells the controller how many failed jobs should be preserved. - # HELP kube_cronjob_spec_starting_deadline_seconds Deadline in seconds for starting the job if it misses scheduled time for any reason. + # HELP kube_cronjob_spec_starting_deadline_seconds [STABLE] Deadline in seconds for starting the job if it misses scheduled time for any reason. # HELP kube_cronjob_spec_successful_job_history_limit Successful job history limit tells the controller how many completed jobs should be preserved. - # HELP kube_cronjob_spec_suspend Suspend flag tells the controller to suspend subsequent executions. - # HELP kube_cronjob_status_active Active holds pointers to currently running jobs. - # HELP kube_cronjob_metadata_resource_version Resource version representing a specific version of the cronjob. - # HELP kube_cronjob_status_last_schedule_time LastScheduleTime keeps information of when was the last time the job was successfully scheduled. + # HELP kube_cronjob_spec_suspend [STABLE] Suspend flag tells the controller to suspend subsequent executions. + # HELP kube_cronjob_status_active [STABLE] Active holds pointers to currently running jobs. + # HELP kube_cronjob_metadata_resource_version [STABLE] Resource version representing a specific version of the cronjob. + # HELP kube_cronjob_status_last_schedule_time [STABLE] LastScheduleTime keeps information of when was the last time the job was successfully scheduled. # TYPE kube_cronjob_created gauge # TYPE kube_cronjob_info gauge # TYPE kube_cronjob_annotations gauge @@ -212,16 +212,16 @@ func TestCronJobStore(t *testing.T) { }, }, Want: ` - # HELP kube_cronjob_created Unix creation timestamp - # HELP kube_cronjob_info Info about cronjob. - # HELP kube_cronjob_labels Kubernetes labels converted to Prometheus labels. + # HELP kube_cronjob_created [STABLE] Unix creation timestamp + # HELP kube_cronjob_info [STABLE] Info about cronjob. + # HELP kube_cronjob_labels [STABLE] Kubernetes labels converted to Prometheus labels. # HELP kube_cronjob_spec_failed_job_history_limit Failed job history limit tells the controller how many failed jobs should be preserved. - # HELP kube_cronjob_spec_starting_deadline_seconds Deadline in seconds for starting the job if it misses scheduled time for any reason. + # HELP kube_cronjob_spec_starting_deadline_seconds [STABLE] Deadline in seconds for starting the job if it misses scheduled time for any reason. # HELP kube_cronjob_spec_successful_job_history_limit Successful job history limit tells the controller how many completed jobs should be preserved. - # HELP kube_cronjob_spec_suspend Suspend flag tells the controller to suspend subsequent executions. - # HELP kube_cronjob_status_active Active holds pointers to currently running jobs. - # HELP kube_cronjob_metadata_resource_version Resource version representing a specific version of the cronjob. - # HELP kube_cronjob_status_last_schedule_time LastScheduleTime keeps information of when was the last time the job was successfully scheduled. + # HELP kube_cronjob_spec_suspend [STABLE] Suspend flag tells the controller to suspend subsequent executions. + # HELP kube_cronjob_status_active [STABLE] Active holds pointers to currently running jobs. + # HELP kube_cronjob_metadata_resource_version [STABLE] Resource version representing a specific version of the cronjob. + # HELP kube_cronjob_status_last_schedule_time [STABLE] LastScheduleTime keeps information of when was the last time the job was successfully scheduled. # HELP kube_cronjob_status_last_successful_time LastSuccessfulTime keeps information of when was the last time the job was completed successfully. # TYPE kube_cronjob_created gauge # TYPE kube_cronjob_info gauge @@ -272,16 +272,16 @@ func TestCronJobStore(t *testing.T) { }, }, Want: ` - # HELP kube_cronjob_created Unix creation timestamp - # HELP kube_cronjob_info Info about cronjob. - # HELP kube_cronjob_labels Kubernetes labels converted to Prometheus labels. + # HELP kube_cronjob_created [STABLE] Unix creation timestamp + # HELP kube_cronjob_info [STABLE] Info about cronjob. + # HELP kube_cronjob_labels [STABLE] Kubernetes labels converted to Prometheus labels. # HELP kube_cronjob_spec_failed_job_history_limit Failed job history limit tells the controller how many failed jobs should be preserved. - # HELP kube_cronjob_spec_starting_deadline_seconds Deadline in seconds for starting the job if it misses scheduled time for any reason. + # HELP kube_cronjob_spec_starting_deadline_seconds [STABLE] Deadline in seconds for starting the job if it misses scheduled time for any reason. # HELP kube_cronjob_spec_successful_job_history_limit Successful job history limit tells the controller how many completed jobs should be preserved. - # HELP kube_cronjob_spec_suspend Suspend flag tells the controller to suspend subsequent executions. - # HELP kube_cronjob_status_active Active holds pointers to currently running jobs. - # HELP kube_cronjob_metadata_resource_version Resource version representing a specific version of the cronjob. - # HELP kube_cronjob_status_last_schedule_time LastScheduleTime keeps information of when was the last time the job was successfully scheduled. + # HELP kube_cronjob_spec_suspend [STABLE] Suspend flag tells the controller to suspend subsequent executions. + # HELP kube_cronjob_status_active [STABLE] Active holds pointers to currently running jobs. + # HELP kube_cronjob_metadata_resource_version [STABLE] Resource version representing a specific version of the cronjob. + # HELP kube_cronjob_status_last_schedule_time [STABLE] LastScheduleTime keeps information of when was the last time the job was successfully scheduled. # HELP kube_cronjob_status_last_successful_time LastSuccessfulTime keeps information of when was the last time the job was completed successfully. # TYPE kube_cronjob_created gauge # TYPE kube_cronjob_info gauge @@ -334,17 +334,17 @@ func TestCronJobStore(t *testing.T) { }, }, Want: ` - # HELP kube_cronjob_created Unix creation timestamp - # HELP kube_cronjob_info Info about cronjob. - # HELP kube_cronjob_labels Kubernetes labels converted to Prometheus labels. - # HELP kube_cronjob_next_schedule_time Next time the cronjob should be scheduled. The time after lastScheduleTime, or after the cron job's creation time if it's never been scheduled. Use this to determine if the job is delayed. + # HELP kube_cronjob_created [STABLE] Unix creation timestamp + # HELP kube_cronjob_info [STABLE] Info about cronjob. + # HELP kube_cronjob_labels [STABLE] Kubernetes labels converted to Prometheus labels. + # HELP kube_cronjob_next_schedule_time [STABLE] Next time the cronjob should be scheduled. The time after lastScheduleTime, or after the cron job's creation time if it's never been scheduled. Use this to determine if the job is delayed. # HELP kube_cronjob_spec_failed_job_history_limit Failed job history limit tells the controller how many failed jobs should be preserved. - # HELP kube_cronjob_spec_starting_deadline_seconds Deadline in seconds for starting the job if it misses scheduled time for any reason. + # HELP kube_cronjob_spec_starting_deadline_seconds [STABLE] Deadline in seconds for starting the job if it misses scheduled time for any reason. # HELP kube_cronjob_spec_successful_job_history_limit Successful job history limit tells the controller how many completed jobs should be preserved. - # HELP kube_cronjob_spec_suspend Suspend flag tells the controller to suspend subsequent executions. - # HELP kube_cronjob_status_active Active holds pointers to currently running jobs. + # HELP kube_cronjob_spec_suspend [STABLE] Suspend flag tells the controller to suspend subsequent executions. + # HELP kube_cronjob_status_active [STABLE] Active holds pointers to currently running jobs. # HELP kube_cronjob_status_last_successful_time LastSuccessfulTime keeps information of when was the last time the job was completed successfully. - # HELP kube_cronjob_metadata_resource_version Resource version representing a specific version of the cronjob. + # HELP kube_cronjob_metadata_resource_version [STABLE] Resource version representing a specific version of the cronjob. # TYPE kube_cronjob_created gauge # TYPE kube_cronjob_info gauge # TYPE kube_cronjob_labels gauge diff --git a/internal/store/daemonset.go b/internal/store/daemonset.go index aef94427b4..d770cad585 100644 --- a/internal/store/daemonset.go +++ b/internal/store/daemonset.go @@ -25,6 +25,7 @@ import ( "k8s.io/apimachinery/pkg/watch" clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/cache" + basemetrics "k8s.io/component-base/metrics" "k8s.io/kube-state-metrics/v2/pkg/metric" generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator" @@ -40,10 +41,11 @@ var ( func daemonSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generator.FamilyGenerator { return []generator.FamilyGenerator{ - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_daemonset_created", "Unix creation timestamp", metric.Gauge, + basemetrics.STABLE, "", wrapDaemonSetFunc(func(d *v1.DaemonSet) *metric.Family { ms := []*metric.Metric{} @@ -61,10 +63,11 @@ func daemonSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) []g } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_daemonset_status_current_number_scheduled", "The number of nodes running at least one daemon pod and are supposed to.", metric.Gauge, + basemetrics.STABLE, "", wrapDaemonSetFunc(func(d *v1.DaemonSet) *metric.Family { return &metric.Family{ @@ -78,10 +81,11 @@ func daemonSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) []g } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_daemonset_status_desired_number_scheduled", "The number of nodes that should be running the daemon pod.", metric.Gauge, + basemetrics.STABLE, "", wrapDaemonSetFunc(func(d *v1.DaemonSet) *metric.Family { return &metric.Family{ @@ -95,10 +99,11 @@ func daemonSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) []g } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_daemonset_status_number_available", "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available", metric.Gauge, + basemetrics.STABLE, "", wrapDaemonSetFunc(func(d *v1.DaemonSet) *metric.Family { return &metric.Family{ @@ -112,10 +117,11 @@ func daemonSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) []g } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_daemonset_status_number_misscheduled", "The number of nodes running a daemon pod but are not supposed to.", metric.Gauge, + basemetrics.STABLE, "", wrapDaemonSetFunc(func(d *v1.DaemonSet) *metric.Family { return &metric.Family{ @@ -129,10 +135,11 @@ func daemonSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) []g } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_daemonset_status_number_ready", "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready.", metric.Gauge, + basemetrics.STABLE, "", wrapDaemonSetFunc(func(d *v1.DaemonSet) *metric.Family { return &metric.Family{ @@ -146,10 +153,11 @@ func daemonSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) []g } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_daemonset_status_number_unavailable", "The number of nodes that should be running the daemon pod and have none of the daemon pod running and available", metric.Gauge, + basemetrics.STABLE, "", wrapDaemonSetFunc(func(d *v1.DaemonSet) *metric.Family { return &metric.Family{ @@ -163,10 +171,11 @@ func daemonSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) []g } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_daemonset_status_observed_generation", "The most recent generation observed by the daemon set controller.", metric.Gauge, + basemetrics.STABLE, "", wrapDaemonSetFunc(func(d *v1.DaemonSet) *metric.Family { return &metric.Family{ @@ -180,10 +189,11 @@ func daemonSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) []g } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_daemonset_status_updated_number_scheduled", "The total number of nodes that are running updated daemon pod", metric.Gauge, + basemetrics.STABLE, "", wrapDaemonSetFunc(func(d *v1.DaemonSet) *metric.Family { return &metric.Family{ @@ -195,10 +205,11 @@ func daemonSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) []g } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_daemonset_metadata_generation", "Sequence number representing a specific generation of the desired state.", metric.Gauge, + basemetrics.STABLE, "", wrapDaemonSetFunc(func(d *v1.DaemonSet) *metric.Family { return &metric.Family{ @@ -230,10 +241,11 @@ func daemonSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) []g } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( descDaemonSetLabelsName, descDaemonSetLabelsHelp, metric.Gauge, + basemetrics.STABLE, "", wrapDaemonSetFunc(func(d *v1.DaemonSet) *metric.Family { labelKeys, labelValues := createPrometheusLabelKeysValues("label", d.Labels, allowLabelsList) diff --git a/internal/store/daemonset_test.go b/internal/store/daemonset_test.go index e7cea91e79..7a8f06ed3a 100644 --- a/internal/store/daemonset_test.go +++ b/internal/store/daemonset_test.go @@ -55,16 +55,16 @@ func TestDaemonSetStore(t *testing.T) { }, Want: ` # HELP kube_daemonset_annotations Kubernetes annotations converted to Prometheus labels. - # HELP kube_daemonset_labels Kubernetes labels converted to Prometheus labels. - # HELP kube_daemonset_metadata_generation Sequence number representing a specific generation of the desired state. - # HELP kube_daemonset_status_current_number_scheduled The number of nodes running at least one daemon pod and are supposed to. - # HELP kube_daemonset_status_desired_number_scheduled The number of nodes that should be running the daemon pod. - # HELP kube_daemonset_status_number_available The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available - # HELP kube_daemonset_status_number_misscheduled The number of nodes running a daemon pod but are not supposed to. - # HELP kube_daemonset_status_number_ready The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready. - # HELP kube_daemonset_status_number_unavailable The number of nodes that should be running the daemon pod and have none of the daemon pod running and available - # HELP kube_daemonset_status_observed_generation The most recent generation observed by the daemon set controller. - # HELP kube_daemonset_status_updated_number_scheduled The total number of nodes that are running updated daemon pod + # HELP kube_daemonset_labels [STABLE] Kubernetes labels converted to Prometheus labels. + # HELP kube_daemonset_metadata_generation [STABLE] Sequence number representing a specific generation of the desired state. + # HELP kube_daemonset_status_current_number_scheduled [STABLE] The number of nodes running at least one daemon pod and are supposed to. + # HELP kube_daemonset_status_desired_number_scheduled [STABLE] The number of nodes that should be running the daemon pod. + # HELP kube_daemonset_status_number_available [STABLE] The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available + # HELP kube_daemonset_status_number_misscheduled [STABLE] The number of nodes running a daemon pod but are not supposed to. + # HELP kube_daemonset_status_number_ready [STABLE] The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready. + # HELP kube_daemonset_status_number_unavailable [STABLE] The number of nodes that should be running the daemon pod and have none of the daemon pod running and available + # HELP kube_daemonset_status_observed_generation [STABLE] The most recent generation observed by the daemon set controller. + # HELP kube_daemonset_status_updated_number_scheduled [STABLE] The total number of nodes that are running updated daemon pod # TYPE kube_daemonset_annotations gauge # TYPE kube_daemonset_labels gauge # TYPE kube_daemonset_metadata_generation gauge @@ -121,25 +121,25 @@ func TestDaemonSetStore(t *testing.T) { }, }, Want: ` - # HELP kube_daemonset_created Unix creation timestamp + # HELP kube_daemonset_created [STABLE] Unix creation timestamp # TYPE kube_daemonset_created gauge - # HELP kube_daemonset_status_current_number_scheduled The number of nodes running at least one daemon pod and are supposed to. + # HELP kube_daemonset_status_current_number_scheduled [STABLE] The number of nodes running at least one daemon pod and are supposed to. # TYPE kube_daemonset_status_current_number_scheduled gauge - # HELP kube_daemonset_status_desired_number_scheduled The number of nodes that should be running the daemon pod. + # HELP kube_daemonset_status_desired_number_scheduled [STABLE] The number of nodes that should be running the daemon pod. # TYPE kube_daemonset_status_desired_number_scheduled gauge - # HELP kube_daemonset_status_number_available The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available + # HELP kube_daemonset_status_number_available [STABLE] The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available # TYPE kube_daemonset_status_number_available gauge - # HELP kube_daemonset_status_number_misscheduled The number of nodes running a daemon pod but are not supposed to. + # HELP kube_daemonset_status_number_misscheduled [STABLE] The number of nodes running a daemon pod but are not supposed to. # TYPE kube_daemonset_status_number_misscheduled gauge - # HELP kube_daemonset_status_number_ready The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready. + # HELP kube_daemonset_status_number_ready [STABLE] The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready. # TYPE kube_daemonset_status_number_ready gauge - # HELP kube_daemonset_status_number_unavailable The number of nodes that should be running the daemon pod and have none of the daemon pod running and available + # HELP kube_daemonset_status_number_unavailable [STABLE] The number of nodes that should be running the daemon pod and have none of the daemon pod running and available # TYPE kube_daemonset_status_number_unavailable gauge - # HELP kube_daemonset_status_updated_number_scheduled The total number of nodes that are running updated daemon pod + # HELP kube_daemonset_status_updated_number_scheduled [STABLE] The total number of nodes that are running updated daemon pod # TYPE kube_daemonset_status_updated_number_scheduled gauge - # HELP kube_daemonset_metadata_generation Sequence number representing a specific generation of the desired state. + # HELP kube_daemonset_metadata_generation [STABLE] Sequence number representing a specific generation of the desired state. # TYPE kube_daemonset_metadata_generation gauge - # HELP kube_daemonset_labels Kubernetes labels converted to Prometheus labels. + # HELP kube_daemonset_labels [STABLE] Kubernetes labels converted to Prometheus labels. # TYPE kube_daemonset_labels gauge kube_daemonset_metadata_generation{daemonset="ds2",namespace="ns2"} 14 kube_daemonset_status_current_number_scheduled{daemonset="ds2",namespace="ns2"} 10 @@ -187,25 +187,25 @@ func TestDaemonSetStore(t *testing.T) { }, }, Want: ` - # HELP kube_daemonset_created Unix creation timestamp + # HELP kube_daemonset_created [STABLE] Unix creation timestamp # TYPE kube_daemonset_created gauge - # HELP kube_daemonset_status_current_number_scheduled The number of nodes running at least one daemon pod and are supposed to. + # HELP kube_daemonset_status_current_number_scheduled [STABLE] The number of nodes running at least one daemon pod and are supposed to. # TYPE kube_daemonset_status_current_number_scheduled gauge - # HELP kube_daemonset_status_desired_number_scheduled The number of nodes that should be running the daemon pod. + # HELP kube_daemonset_status_desired_number_scheduled [STABLE] The number of nodes that should be running the daemon pod. # TYPE kube_daemonset_status_desired_number_scheduled gauge - # HELP kube_daemonset_status_number_available The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available + # HELP kube_daemonset_status_number_available [STABLE] The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available # TYPE kube_daemonset_status_number_available gauge - # HELP kube_daemonset_status_number_misscheduled The number of nodes running a daemon pod but are not supposed to. + # HELP kube_daemonset_status_number_misscheduled [STABLE] The number of nodes running a daemon pod but are not supposed to. # TYPE kube_daemonset_status_number_misscheduled gauge - # HELP kube_daemonset_status_number_ready The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready. + # HELP kube_daemonset_status_number_ready [STABLE] The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready. # TYPE kube_daemonset_status_number_ready gauge - # HELP kube_daemonset_status_number_unavailable The number of nodes that should be running the daemon pod and have none of the daemon pod running and available + # HELP kube_daemonset_status_number_unavailable [STABLE] The number of nodes that should be running the daemon pod and have none of the daemon pod running and available # TYPE kube_daemonset_status_number_unavailable gauge - # HELP kube_daemonset_status_updated_number_scheduled The total number of nodes that are running updated daemon pod + # HELP kube_daemonset_status_updated_number_scheduled [STABLE] The total number of nodes that are running updated daemon pod # TYPE kube_daemonset_status_updated_number_scheduled gauge - # HELP kube_daemonset_metadata_generation Sequence number representing a specific generation of the desired state. + # HELP kube_daemonset_metadata_generation [STABLE] Sequence number representing a specific generation of the desired state. # TYPE kube_daemonset_metadata_generation gauge - # HELP kube_daemonset_labels Kubernetes labels converted to Prometheus labels. + # HELP kube_daemonset_labels [STABLE] Kubernetes labels converted to Prometheus labels. # TYPE kube_daemonset_labels gauge kube_daemonset_created{daemonset="ds3",namespace="ns3"} 1.5e+09 kube_daemonset_metadata_generation{daemonset="ds3",namespace="ns3"} 15 diff --git a/internal/store/deployment.go b/internal/store/deployment.go index fca897dca5..d20a2ffcb3 100644 --- a/internal/store/deployment.go +++ b/internal/store/deployment.go @@ -19,6 +19,8 @@ package store import ( "context" + basemetrics "k8s.io/component-base/metrics" + "k8s.io/kube-state-metrics/v2/pkg/metric" generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator" @@ -41,10 +43,11 @@ var ( func deploymentMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generator.FamilyGenerator { return []generator.FamilyGenerator{ - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_deployment_created", "Unix creation timestamp", metric.Gauge, + basemetrics.STABLE, "", wrapDeploymentFunc(func(d *v1.Deployment) *metric.Family { ms := []*metric.Metric{} @@ -60,10 +63,11 @@ func deploymentMetricFamilies(allowAnnotationsList, allowLabelsList []string) [] } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_deployment_status_replicas", "The number of replicas per deployment.", metric.Gauge, + basemetrics.STABLE, "", wrapDeploymentFunc(func(d *v1.Deployment) *metric.Family { return &metric.Family{ @@ -75,10 +79,11 @@ func deploymentMetricFamilies(allowAnnotationsList, allowLabelsList []string) [] } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_deployment_status_replicas_ready", "The number of ready replicas per deployment.", metric.Gauge, + basemetrics.STABLE, "", wrapDeploymentFunc(func(d *v1.Deployment) *metric.Family { return &metric.Family{ @@ -90,10 +95,11 @@ func deploymentMetricFamilies(allowAnnotationsList, allowLabelsList []string) [] } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_deployment_status_replicas_available", "The number of available replicas per deployment.", metric.Gauge, + basemetrics.STABLE, "", wrapDeploymentFunc(func(d *v1.Deployment) *metric.Family { return &metric.Family{ @@ -105,10 +111,11 @@ func deploymentMetricFamilies(allowAnnotationsList, allowLabelsList []string) [] } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_deployment_status_replicas_unavailable", "The number of unavailable replicas per deployment.", metric.Gauge, + basemetrics.STABLE, "", wrapDeploymentFunc(func(d *v1.Deployment) *metric.Family { return &metric.Family{ @@ -120,10 +127,11 @@ func deploymentMetricFamilies(allowAnnotationsList, allowLabelsList []string) [] } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_deployment_status_replicas_updated", "The number of updated replicas per deployment.", metric.Gauge, + basemetrics.STABLE, "", wrapDeploymentFunc(func(d *v1.Deployment) *metric.Family { return &metric.Family{ @@ -135,10 +143,11 @@ func deploymentMetricFamilies(allowAnnotationsList, allowLabelsList []string) [] } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_deployment_status_observed_generation", "The generation observed by the deployment controller.", metric.Gauge, + basemetrics.STABLE, "", wrapDeploymentFunc(func(d *v1.Deployment) *metric.Family { return &metric.Family{ @@ -150,10 +159,11 @@ func deploymentMetricFamilies(allowAnnotationsList, allowLabelsList []string) [] } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_deployment_status_condition", "The current status conditions of a deployment.", metric.Gauge, + basemetrics.STABLE, "", wrapDeploymentFunc(func(d *v1.Deployment) *metric.Family { ms := make([]*metric.Metric, len(d.Status.Conditions)*len(conditionStatuses)) @@ -175,10 +185,11 @@ func deploymentMetricFamilies(allowAnnotationsList, allowLabelsList []string) [] } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_deployment_spec_replicas", "Number of desired pods for a deployment.", metric.Gauge, + basemetrics.STABLE, "", wrapDeploymentFunc(func(d *v1.Deployment) *metric.Family { return &metric.Family{ @@ -190,10 +201,11 @@ func deploymentMetricFamilies(allowAnnotationsList, allowLabelsList []string) [] } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_deployment_spec_paused", "Whether the deployment is paused and will not be processed by the deployment controller.", metric.Gauge, + basemetrics.STABLE, "", wrapDeploymentFunc(func(d *v1.Deployment) *metric.Family { return &metric.Family{ @@ -205,10 +217,11 @@ func deploymentMetricFamilies(allowAnnotationsList, allowLabelsList []string) [] } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_deployment_spec_strategy_rollingupdate_max_unavailable", "Maximum number of unavailable replicas during a rolling update of a deployment.", metric.Gauge, + basemetrics.STABLE, "", wrapDeploymentFunc(func(d *v1.Deployment) *metric.Family { if d.Spec.Strategy.RollingUpdate == nil { @@ -229,10 +242,11 @@ func deploymentMetricFamilies(allowAnnotationsList, allowLabelsList []string) [] } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_deployment_spec_strategy_rollingupdate_max_surge", "Maximum number of replicas that can be scheduled above the desired number of replicas during a rolling update of a deployment.", metric.Gauge, + basemetrics.STABLE, "", wrapDeploymentFunc(func(d *v1.Deployment) *metric.Family { if d.Spec.Strategy.RollingUpdate == nil { @@ -253,10 +267,11 @@ func deploymentMetricFamilies(allowAnnotationsList, allowLabelsList []string) [] } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_deployment_metadata_generation", "Sequence number representing a specific generation of the desired state.", metric.Gauge, + basemetrics.STABLE, "", wrapDeploymentFunc(func(d *v1.Deployment) *metric.Family { return &metric.Family{ @@ -286,10 +301,11 @@ func deploymentMetricFamilies(allowAnnotationsList, allowLabelsList []string) [] } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( descDeploymentLabelsName, descDeploymentLabelsHelp, metric.Gauge, + basemetrics.STABLE, "", wrapDeploymentFunc(func(d *v1.Deployment) *metric.Family { labelKeys, labelValues := createPrometheusLabelKeysValues("label", d.Labels, allowLabelsList) diff --git a/internal/store/deployment_test.go b/internal/store/deployment_test.go index 093fc3cf6e..0223011e09 100644 --- a/internal/store/deployment_test.go +++ b/internal/store/deployment_test.go @@ -45,33 +45,33 @@ func TestDeploymentStore(t *testing.T) { const metadata = ` # HELP kube_deployment_annotations Kubernetes annotations converted to Prometheus labels. # TYPE kube_deployment_annotations gauge - # HELP kube_deployment_created Unix creation timestamp + # HELP kube_deployment_created [STABLE] Unix creation timestamp # TYPE kube_deployment_created gauge - # HELP kube_deployment_metadata_generation Sequence number representing a specific generation of the desired state. + # HELP kube_deployment_metadata_generation [STABLE] Sequence number representing a specific generation of the desired state. # TYPE kube_deployment_metadata_generation gauge - # HELP kube_deployment_spec_paused Whether the deployment is paused and will not be processed by the deployment controller. + # HELP kube_deployment_spec_paused [STABLE] Whether the deployment is paused and will not be processed by the deployment controller. # TYPE kube_deployment_spec_paused gauge - # HELP kube_deployment_spec_replicas Number of desired pods for a deployment. + # HELP kube_deployment_spec_replicas [STABLE] Number of desired pods for a deployment. # TYPE kube_deployment_spec_replicas gauge - # HELP kube_deployment_status_replicas The number of replicas per deployment. + # HELP kube_deployment_status_replicas [STABLE] The number of replicas per deployment. # TYPE kube_deployment_status_replicas gauge - # HELP kube_deployment_status_replicas_ready The number of ready replicas per deployment. + # HELP kube_deployment_status_replicas_ready [STABLE] The number of ready replicas per deployment. # TYPE kube_deployment_status_replicas_ready gauge - # HELP kube_deployment_status_replicas_available The number of available replicas per deployment. + # HELP kube_deployment_status_replicas_available [STABLE] The number of available replicas per deployment. # TYPE kube_deployment_status_replicas_available gauge - # HELP kube_deployment_status_replicas_unavailable The number of unavailable replicas per deployment. + # HELP kube_deployment_status_replicas_unavailable [STABLE] The number of unavailable replicas per deployment. # TYPE kube_deployment_status_replicas_unavailable gauge - # HELP kube_deployment_status_replicas_updated The number of updated replicas per deployment. + # HELP kube_deployment_status_replicas_updated [STABLE] The number of updated replicas per deployment. # TYPE kube_deployment_status_replicas_updated gauge - # HELP kube_deployment_status_observed_generation The generation observed by the deployment controller. + # HELP kube_deployment_status_observed_generation [STABLE] The generation observed by the deployment controller. # TYPE kube_deployment_status_observed_generation gauge - # HELP kube_deployment_status_condition The current status conditions of a deployment. + # HELP kube_deployment_status_condition [STABLE] The current status conditions of a deployment. # TYPE kube_deployment_status_condition gauge - # HELP kube_deployment_spec_strategy_rollingupdate_max_unavailable Maximum number of unavailable replicas during a rolling update of a deployment. + # HELP kube_deployment_spec_strategy_rollingupdate_max_unavailable [STABLE] Maximum number of unavailable replicas during a rolling update of a deployment. # TYPE kube_deployment_spec_strategy_rollingupdate_max_unavailable gauge - # HELP kube_deployment_spec_strategy_rollingupdate_max_surge Maximum number of replicas that can be scheduled above the desired number of replicas during a rolling update of a deployment. + # HELP kube_deployment_spec_strategy_rollingupdate_max_surge [STABLE] Maximum number of replicas that can be scheduled above the desired number of replicas during a rolling update of a deployment. # TYPE kube_deployment_spec_strategy_rollingupdate_max_surge gauge - # HELP kube_deployment_labels Kubernetes labels converted to Prometheus labels. + # HELP kube_deployment_labels [STABLE] Kubernetes labels converted to Prometheus labels. # TYPE kube_deployment_labels gauge ` cases := []generateMetricsTestCase{ diff --git a/internal/store/endpoint.go b/internal/store/endpoint.go index 8a26477a15..1763392dba 100644 --- a/internal/store/endpoint.go +++ b/internal/store/endpoint.go @@ -26,6 +26,7 @@ import ( "k8s.io/apimachinery/pkg/watch" clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/cache" + basemetrics "k8s.io/component-base/metrics" "k8s.io/kube-state-metrics/v2/pkg/metric" generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator" @@ -41,10 +42,11 @@ var ( func endpointMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generator.FamilyGenerator { return []generator.FamilyGenerator{ - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_endpoint_info", "Information about endpoint.", metric.Gauge, + basemetrics.STABLE, "", wrapEndpointFunc(func(e *v1.Endpoints) *metric.Family { return &metric.Family{ @@ -56,10 +58,11 @@ func endpointMetricFamilies(allowAnnotationsList, allowLabelsList []string) []ge } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_endpoint_created", "Unix creation timestamp", metric.Gauge, + basemetrics.STABLE, "", wrapEndpointFunc(func(e *v1.Endpoints) *metric.Family { ms := []*metric.Metric{} @@ -94,10 +97,11 @@ func endpointMetricFamilies(allowAnnotationsList, allowLabelsList []string) []ge } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( descEndpointLabelsName, descEndpointLabelsHelp, metric.Gauge, + basemetrics.STABLE, "", wrapEndpointFunc(func(e *v1.Endpoints) *metric.Family { labelKeys, labelValues := createPrometheusLabelKeysValues("label", e.Labels, allowLabelsList) @@ -151,10 +155,11 @@ func endpointMetricFamilies(allowAnnotationsList, allowLabelsList []string) []ge } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_endpoint_address", "Information about Endpoint available and non available addresses.", metric.Gauge, + basemetrics.STABLE, "", wrapEndpointFunc(func(e *v1.Endpoints) *metric.Family { ms := []*metric.Metric{} @@ -179,10 +184,11 @@ func endpointMetricFamilies(allowAnnotationsList, allowLabelsList []string) []ge } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_endpoint_ports", "Information about the Endpoint ports.", metric.Gauge, + basemetrics.STABLE, "", wrapEndpointFunc(func(e *v1.Endpoints) *metric.Family { ms := []*metric.Metric{} diff --git a/internal/store/endpoint_test.go b/internal/store/endpoint_test.go index 3dfb49c818..46df12e7df 100644 --- a/internal/store/endpoint_test.go +++ b/internal/store/endpoint_test.go @@ -36,15 +36,15 @@ func TestEndpointStore(t *testing.T) { # TYPE kube_endpoint_address_available gauge # HELP kube_endpoint_address_not_ready (Deprecated since v2.6.0) Number of addresses not ready in endpoint # TYPE kube_endpoint_address_not_ready gauge - # HELP kube_endpoint_created Unix creation timestamp + # HELP kube_endpoint_created [STABLE] Unix creation timestamp # TYPE kube_endpoint_created gauge - # HELP kube_endpoint_info Information about endpoint. + # HELP kube_endpoint_info [STABLE] Information about endpoint. # TYPE kube_endpoint_info gauge - # HELP kube_endpoint_labels Kubernetes labels converted to Prometheus labels. + # HELP kube_endpoint_labels [STABLE] Kubernetes labels converted to Prometheus labels. # TYPE kube_endpoint_labels gauge - # HELP kube_endpoint_ports Information about the Endpoint ports. + # HELP kube_endpoint_ports [STABLE] Information about the Endpoint ports. # TYPE kube_endpoint_ports gauge - # HELP kube_endpoint_address Information about Endpoint available and non available addresses. + # HELP kube_endpoint_address [STABLE] Information about Endpoint available and non available addresses. # TYPE kube_endpoint_address gauge ` cases := []generateMetricsTestCase{ @@ -166,15 +166,15 @@ func TestEndpointStoreWithLabels(t *testing.T) { # TYPE kube_endpoint_address_not_ready gauge # HELP kube_endpoint_annotations Kubernetes annotations converted to Prometheus labels. # TYPE kube_endpoint_annotations gauge - # HELP kube_endpoint_created Unix creation timestamp + # HELP kube_endpoint_created [STABLE] Unix creation timestamp # TYPE kube_endpoint_created gauge - # HELP kube_endpoint_info Information about endpoint. + # HELP kube_endpoint_info [STABLE] Information about endpoint. # TYPE kube_endpoint_info gauge - # HELP kube_endpoint_labels Kubernetes labels converted to Prometheus labels. + # HELP kube_endpoint_labels [STABLE] Kubernetes labels converted to Prometheus labels. # TYPE kube_endpoint_labels gauge - # HELP kube_endpoint_ports Information about the Endpoint ports. + # HELP kube_endpoint_ports [STABLE] Information about the Endpoint ports. # TYPE kube_endpoint_ports gauge - # HELP kube_endpoint_address Information about Endpoint available and non available addresses. + # HELP kube_endpoint_address [STABLE] Information about Endpoint available and non available addresses. # TYPE kube_endpoint_address gauge ` cases := []generateMetricsTestCase{ diff --git a/internal/store/horizontalpodautoscaler.go b/internal/store/horizontalpodautoscaler.go index 1b0de5241a..05176811ea 100644 --- a/internal/store/horizontalpodautoscaler.go +++ b/internal/store/horizontalpodautoscaler.go @@ -25,6 +25,7 @@ import ( "k8s.io/apimachinery/pkg/watch" clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/cache" + basemetrics "k8s.io/component-base/metrics" "k8s.io/kube-state-metrics/v2/pkg/metric" generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator" @@ -77,10 +78,11 @@ func hpaMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generat } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_horizontalpodautoscaler_metadata_generation", "The generation observed by the HorizontalPodAutoscaler controller.", metric.Gauge, + basemetrics.STABLE, "", wrapHPAFunc(func(a *autoscaling.HorizontalPodAutoscaler) *metric.Family { return &metric.Family{ @@ -92,10 +94,11 @@ func hpaMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generat } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_horizontalpodautoscaler_spec_max_replicas", "Upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.", metric.Gauge, + basemetrics.STABLE, "", wrapHPAFunc(func(a *autoscaling.HorizontalPodAutoscaler) *metric.Family { return &metric.Family{ @@ -107,10 +110,11 @@ func hpaMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generat } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_horizontalpodautoscaler_spec_min_replicas", "Lower limit for the number of pods that can be set by the autoscaler, default 1.", metric.Gauge, + basemetrics.STABLE, "", wrapHPAFunc(func(a *autoscaling.HorizontalPodAutoscaler) *metric.Family { return &metric.Family{ @@ -246,10 +250,11 @@ func hpaMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generat return &metric.Family{Metrics: ms} }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_horizontalpodautoscaler_status_current_replicas", "Current number of replicas of pods managed by this autoscaler.", metric.Gauge, + basemetrics.STABLE, "", wrapHPAFunc(func(a *autoscaling.HorizontalPodAutoscaler) *metric.Family { return &metric.Family{ @@ -261,10 +266,11 @@ func hpaMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generat } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_horizontalpodautoscaler_status_desired_replicas", "Desired number of replicas of pods managed by this autoscaler.", metric.Gauge, + basemetrics.STABLE, "", wrapHPAFunc(func(a *autoscaling.HorizontalPodAutoscaler) *metric.Family { return &metric.Family{ @@ -294,10 +300,11 @@ func hpaMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generat } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( descHorizontalPodAutoscalerLabelsName, descHorizontalPodAutoscalerLabelsHelp, metric.Gauge, + basemetrics.STABLE, "", wrapHPAFunc(func(a *autoscaling.HorizontalPodAutoscaler) *metric.Family { labelKeys, labelValues := createPrometheusLabelKeysValues("label", a.Labels, allowLabelsList) @@ -312,10 +319,11 @@ func hpaMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generat } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_horizontalpodautoscaler_status_condition", "The condition of this autoscaler.", metric.Gauge, + basemetrics.STABLE, "", wrapHPAFunc(func(a *autoscaling.HorizontalPodAutoscaler) *metric.Family { ms := make([]*metric.Metric, 0, len(a.Status.Conditions)*len(conditionStatuses)) diff --git a/internal/store/horizontalpodautoscaler_test.go b/internal/store/horizontalpodautoscaler_test.go index d573113a70..050b68fc9a 100644 --- a/internal/store/horizontalpodautoscaler_test.go +++ b/internal/store/horizontalpodautoscaler_test.go @@ -37,15 +37,15 @@ func TestHPAStore(t *testing.T) { const metadata = ` # HELP kube_horizontalpodautoscaler_info Information about this autoscaler. # HELP kube_horizontalpodautoscaler_annotations Kubernetes annotations converted to Prometheus labels. - # HELP kube_horizontalpodautoscaler_labels Kubernetes labels converted to Prometheus labels. - # HELP kube_horizontalpodautoscaler_metadata_generation The generation observed by the HorizontalPodAutoscaler controller. - # HELP kube_horizontalpodautoscaler_spec_max_replicas Upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas. - # HELP kube_horizontalpodautoscaler_spec_min_replicas Lower limit for the number of pods that can be set by the autoscaler, default 1. + # HELP kube_horizontalpodautoscaler_labels [STABLE] Kubernetes labels converted to Prometheus labels. + # HELP kube_horizontalpodautoscaler_metadata_generation [STABLE] The generation observed by the HorizontalPodAutoscaler controller. + # HELP kube_horizontalpodautoscaler_spec_max_replicas [STABLE] Upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas. + # HELP kube_horizontalpodautoscaler_spec_min_replicas [STABLE] Lower limit for the number of pods that can be set by the autoscaler, default 1. # HELP kube_horizontalpodautoscaler_spec_target_metric The metric specifications used by this autoscaler when calculating the desired replica count. # HELP kube_horizontalpodautoscaler_status_target_metric The current metric status used by this autoscaler when calculating the desired replica count. - # HELP kube_horizontalpodautoscaler_status_condition The condition of this autoscaler. - # HELP kube_horizontalpodautoscaler_status_current_replicas Current number of replicas of pods managed by this autoscaler. - # HELP kube_horizontalpodautoscaler_status_desired_replicas Desired number of replicas of pods managed by this autoscaler. + # HELP kube_horizontalpodautoscaler_status_condition [STABLE] The condition of this autoscaler. + # HELP kube_horizontalpodautoscaler_status_current_replicas [STABLE] Current number of replicas of pods managed by this autoscaler. + # HELP kube_horizontalpodautoscaler_status_desired_replicas [STABLE] Desired number of replicas of pods managed by this autoscaler. # TYPE kube_horizontalpodautoscaler_info gauge # TYPE kube_horizontalpodautoscaler_annotations gauge # TYPE kube_horizontalpodautoscaler_labels gauge diff --git a/internal/store/ingress.go b/internal/store/ingress.go index c42750cfe1..9136fecf6c 100644 --- a/internal/store/ingress.go +++ b/internal/store/ingress.go @@ -20,6 +20,8 @@ import ( "context" "strconv" + basemetrics "k8s.io/component-base/metrics" + "k8s.io/kube-state-metrics/v2/pkg/metric" generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator" @@ -41,10 +43,11 @@ var ( func ingressMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generator.FamilyGenerator { return []generator.FamilyGenerator{ - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_ingress_info", "Information about ingress.", metric.Gauge, + basemetrics.STABLE, "", wrapIngressFunc(func(i *networkingv1.Ingress) *metric.Family { ingressClassName := "_default" @@ -83,10 +86,11 @@ func ingressMetricFamilies(allowAnnotationsList, allowLabelsList []string) []gen }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( descIngressLabelsName, descIngressLabelsHelp, metric.Gauge, + basemetrics.STABLE, "", wrapIngressFunc(func(i *networkingv1.Ingress) *metric.Family { labelKeys, labelValues := createPrometheusLabelKeysValues("label", i.Labels, allowLabelsList) @@ -101,10 +105,11 @@ func ingressMetricFamilies(allowAnnotationsList, allowLabelsList []string) []gen }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_ingress_created", "Unix creation timestamp", metric.Gauge, + basemetrics.STABLE, "", wrapIngressFunc(func(i *networkingv1.Ingress) *metric.Family { ms := []*metric.Metric{} @@ -131,21 +136,30 @@ func ingressMetricFamilies(allowAnnotationsList, allowLabelsList []string) []gen } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_ingress_path", "Ingress host, paths and backend service information.", metric.Gauge, + basemetrics.STABLE, "", wrapIngressFunc(func(i *networkingv1.Ingress) *metric.Family { ms := []*metric.Metric{} for _, rule := range i.Spec.Rules { if rule.HTTP != nil { for _, path := range rule.HTTP.Paths { - ms = append(ms, &metric.Metric{ - LabelKeys: []string{"host", "path", "service_name", "service_port"}, - LabelValues: []string{rule.Host, path.Path, path.Backend.Service.Name, strconv.Itoa(int(path.Backend.Service.Port.Number))}, - Value: 1, - }) + if path.Backend.Service != nil { + ms = append(ms, &metric.Metric{ + LabelKeys: []string{"host", "path", "service_name", "service_port"}, + LabelValues: []string{rule.Host, path.Path, path.Backend.Service.Name, strconv.Itoa(int(path.Backend.Service.Port.Number))}, + Value: 1, + }) + } else { + ms = append(ms, &metric.Metric{ + LabelKeys: []string{"host", "path", "service_name", "service_port"}, + LabelValues: []string{rule.Host, path.Path, "", ""}, + Value: 1, + }) + } } } } @@ -154,10 +168,11 @@ func ingressMetricFamilies(allowAnnotationsList, allowLabelsList []string) []gen } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_ingress_tls", "Ingress TLS host and secret information.", metric.Gauge, + basemetrics.STABLE, "", wrapIngressFunc(func(i *networkingv1.Ingress) *metric.Family { ms := []*metric.Metric{} diff --git a/internal/store/ingress_test.go b/internal/store/ingress_test.go index a9754bb65e..123a679cbd 100644 --- a/internal/store/ingress_test.go +++ b/internal/store/ingress_test.go @@ -19,6 +19,7 @@ package store import ( "testing" + v1 "k8s.io/api/core/v1" networkingv1 "k8s.io/api/networking/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -33,12 +34,12 @@ func TestIngressStore(t *testing.T) { // Fixed metadata on type and help text. We prepend this to every expected // output so we only have to modify a single place when doing adjustments. const metadata = ` - # HELP kube_ingress_created Unix creation timestamp - # HELP kube_ingress_info Information about ingress. - # HELP kube_ingress_labels Kubernetes labels converted to Prometheus labels. + # HELP kube_ingress_created [STABLE] Unix creation timestamp + # HELP kube_ingress_info [STABLE] Information about ingress. + # HELP kube_ingress_labels [STABLE] Kubernetes labels converted to Prometheus labels. # HELP kube_ingress_metadata_resource_version Resource version representing a specific version of ingress. - # HELP kube_ingress_path Ingress host, paths and backend service information. - # HELP kube_ingress_tls Ingress TLS host and secret information. + # HELP kube_ingress_path [STABLE] Ingress host, paths and backend service information. + # HELP kube_ingress_tls [STABLE] Ingress TLS host and secret information. # TYPE kube_ingress_created gauge # TYPE kube_ingress_info gauge # TYPE kube_ingress_labels gauge @@ -63,9 +64,9 @@ func TestIngressStore(t *testing.T) { }, }, Want: ` - # HELP kube_ingress_info Information about ingress. + # HELP kube_ingress_info [STABLE] Information about ingress. # HELP kube_ingress_annotations Kubernetes annotations converted to Prometheus labels. - # HELP kube_ingress_labels Kubernetes labels converted to Prometheus labels. + # HELP kube_ingress_labels [STABLE] Kubernetes labels converted to Prometheus labels. # HELP kube_ingress_metadata_resource_version Resource version representing a specific version of ingress. # TYPE kube_ingress_info gauge # TYPE kube_ingress_annotations gauge @@ -144,6 +145,15 @@ func TestIngressStore(t *testing.T) { }, }, }, + { + Path: "/somepath2", + Backend: networkingv1.IngressBackend{ + Resource: &v1.TypedLocalObjectReference{ + Kind: "somekind", + Name: "somename", + }, + }, + }, }, }, }, @@ -159,6 +169,7 @@ func TestIngressStore(t *testing.T) { kube_ingress_created{namespace="ns4",ingress="ingress4"} 1.501569018e+09 kube_ingress_labels{namespace="ns4",ingress="ingress4"} 1 kube_ingress_path{namespace="ns4",ingress="ingress4",host="somehost",path="/somepath",service_name="someservice",service_port="1234"} 1 + kube_ingress_path{namespace="ns4",ingress="ingress4",host="somehost",path="/somepath2",service_name="",service_port=""} 1 `, MetricNames: []string{"kube_ingress_info", "kube_ingress_metadata_resource_version", "kube_ingress_created", "kube_ingress_labels", "kube_ingress_path", "kube_ingress_tls"}, }, diff --git a/internal/store/job.go b/internal/store/job.go index e2664310e6..cd878c7e08 100644 --- a/internal/store/job.go +++ b/internal/store/job.go @@ -20,6 +20,8 @@ import ( "context" "strconv" + basemetrics "k8s.io/component-base/metrics" + "k8s.io/kube-state-metrics/v2/pkg/metric" generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator" @@ -60,10 +62,11 @@ func jobMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generat } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( descJobLabelsName, descJobLabelsHelp, metric.Gauge, + basemetrics.STABLE, "", wrapJobFunc(func(j *v1batch.Job) *metric.Family { labelKeys, labelValues := createPrometheusLabelKeysValues("label", j.Labels, allowLabelsList) @@ -78,10 +81,11 @@ func jobMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generat } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_job_info", "Information about job.", metric.Gauge, + basemetrics.STABLE, "", wrapJobFunc(func(j *v1batch.Job) *metric.Family { return &metric.Family{ @@ -93,10 +97,11 @@ func jobMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generat } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_job_created", "Unix creation timestamp", metric.Gauge, + basemetrics.STABLE, "", wrapJobFunc(func(j *v1batch.Job) *metric.Family { ms := []*metric.Metric{} @@ -112,10 +117,11 @@ func jobMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generat } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_job_spec_parallelism", "The maximum desired number of pods the job should run at any given time.", metric.Gauge, + basemetrics.STABLE, "", wrapJobFunc(func(j *v1batch.Job) *metric.Family { ms := []*metric.Metric{} @@ -131,10 +137,11 @@ func jobMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generat } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_job_spec_completions", "The desired number of successfully finished pods the job should be run with.", metric.Gauge, + basemetrics.STABLE, "", wrapJobFunc(func(j *v1batch.Job) *metric.Family { ms := []*metric.Metric{} @@ -150,10 +157,11 @@ func jobMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generat } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_job_spec_active_deadline_seconds", "The duration in seconds relative to the startTime that the job may be active before the system tries to terminate it.", metric.Gauge, + basemetrics.STABLE, "", wrapJobFunc(func(j *v1batch.Job) *metric.Family { ms := []*metric.Metric{} @@ -169,10 +177,11 @@ func jobMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generat } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_job_status_succeeded", "The number of pods which reached Phase Succeeded.", metric.Gauge, + basemetrics.STABLE, "", wrapJobFunc(func(j *v1batch.Job) *metric.Family { return &metric.Family{ @@ -184,10 +193,11 @@ func jobMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generat } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_job_status_failed", "The number of pods which reached Phase Failed and the reason for failure.", metric.Gauge, + basemetrics.STABLE, "", wrapJobFunc(func(j *v1batch.Job) *metric.Family { var ms []*metric.Metric @@ -231,10 +241,11 @@ func jobMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generat } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_job_status_active", "The number of actively running pods.", metric.Gauge, + basemetrics.STABLE, "", wrapJobFunc(func(j *v1batch.Job) *metric.Family { return &metric.Family{ @@ -246,10 +257,11 @@ func jobMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generat } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_job_complete", "The job has completed its execution.", metric.Gauge, + basemetrics.STABLE, "", wrapJobFunc(func(j *v1batch.Job) *metric.Family { ms := []*metric.Metric{} @@ -269,10 +281,11 @@ func jobMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generat } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_job_failed", "The job has failed its execution.", metric.Gauge, + basemetrics.STABLE, "", wrapJobFunc(func(j *v1batch.Job) *metric.Family { ms := []*metric.Metric{} @@ -293,10 +306,11 @@ func jobMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generat } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_job_status_start_time", "StartTime represents time when the job was acknowledged by the Job Manager.", metric.Gauge, + basemetrics.STABLE, "", wrapJobFunc(func(j *v1batch.Job) *metric.Family { ms := []*metric.Metric{} @@ -313,10 +327,11 @@ func jobMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generat } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_job_status_completion_time", "CompletionTime represents time when the job was completed.", metric.Gauge, + basemetrics.STABLE, "", wrapJobFunc(func(j *v1batch.Job) *metric.Family { ms := []*metric.Metric{} @@ -332,10 +347,11 @@ func jobMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generat } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_job_owner", "Information about the Job's owner.", metric.Gauge, + basemetrics.STABLE, "", wrapJobFunc(func(j *v1batch.Job) *metric.Family { labelKeys := []string{"owner_kind", "owner_name", "owner_is_controller"} diff --git a/internal/store/job_test.go b/internal/store/job_test.go index 3cfb68ef70..3cb2b13174 100644 --- a/internal/store/job_test.go +++ b/internal/store/job_test.go @@ -50,33 +50,33 @@ func TestJobStore(t *testing.T) { const metadata = ` # HELP kube_job_annotations Kubernetes annotations converted to Prometheus labels. # TYPE kube_job_annotations gauge - # HELP kube_job_created Unix creation timestamp + # HELP kube_job_created [STABLE] Unix creation timestamp # TYPE kube_job_created gauge - # HELP kube_job_owner Information about the Job's owner. + # HELP kube_job_owner [STABLE] Information about the Job's owner. # TYPE kube_job_owner gauge - # HELP kube_job_complete The job has completed its execution. + # HELP kube_job_complete [STABLE] The job has completed its execution. # TYPE kube_job_complete gauge - # HELP kube_job_failed The job has failed its execution. + # HELP kube_job_failed [STABLE] The job has failed its execution. # TYPE kube_job_failed gauge - # HELP kube_job_info Information about job. + # HELP kube_job_info [STABLE] Information about job. # TYPE kube_job_info gauge - # HELP kube_job_labels Kubernetes labels converted to Prometheus labels. + # HELP kube_job_labels [STABLE] Kubernetes labels converted to Prometheus labels. # TYPE kube_job_labels gauge - # HELP kube_job_spec_active_deadline_seconds The duration in seconds relative to the startTime that the job may be active before the system tries to terminate it. + # HELP kube_job_spec_active_deadline_seconds [STABLE] The duration in seconds relative to the startTime that the job may be active before the system tries to terminate it. # TYPE kube_job_spec_active_deadline_seconds gauge - # HELP kube_job_spec_completions The desired number of successfully finished pods the job should be run with. + # HELP kube_job_spec_completions [STABLE] The desired number of successfully finished pods the job should be run with. # TYPE kube_job_spec_completions gauge - # HELP kube_job_spec_parallelism The maximum desired number of pods the job should run at any given time. + # HELP kube_job_spec_parallelism [STABLE] The maximum desired number of pods the job should run at any given time. # TYPE kube_job_spec_parallelism gauge - # HELP kube_job_status_active The number of actively running pods. + # HELP kube_job_status_active [STABLE] The number of actively running pods. # TYPE kube_job_status_active gauge - # HELP kube_job_status_completion_time CompletionTime represents time when the job was completed. + # HELP kube_job_status_completion_time [STABLE] CompletionTime represents time when the job was completed. # TYPE kube_job_status_completion_time gauge - # HELP kube_job_status_failed The number of pods which reached Phase Failed and the reason for failure. + # HELP kube_job_status_failed [STABLE] The number of pods which reached Phase Failed and the reason for failure. # TYPE kube_job_status_failed gauge - # HELP kube_job_status_start_time StartTime represents time when the job was acknowledged by the Job Manager. + # HELP kube_job_status_start_time [STABLE] StartTime represents time when the job was acknowledged by the Job Manager. # TYPE kube_job_status_start_time gauge - # HELP kube_job_status_succeeded The number of pods which reached Phase Succeeded. + # HELP kube_job_status_succeeded [STABLE] The number of pods which reached Phase Succeeded. # TYPE kube_job_status_succeeded gauge` cases := []generateMetricsTestCase{ diff --git a/internal/store/lease.go b/internal/store/lease.go index f503bba797..af0cc3db09 100644 --- a/internal/store/lease.go +++ b/internal/store/lease.go @@ -40,7 +40,12 @@ var ( metric.Gauge, "", wrapLeaseFunc(func(l *coordinationv1.Lease) *metric.Family { - labelKeys := []string{"owner_kind", "owner_name"} + labelKeys := []string{"owner_kind", "owner_name", "namespace", "lease_holder"} + + var holder string + if l.Spec.HolderIdentity != nil { + holder = *l.Spec.HolderIdentity + } owners := l.GetOwnerReferences() if len(owners) == 0 { @@ -48,7 +53,7 @@ var ( Metrics: []*metric.Metric{ { LabelKeys: labelKeys, - LabelValues: []string{"", ""}, + LabelValues: []string{"", "", l.Namespace, holder}, Value: 1, }, }, @@ -59,7 +64,7 @@ var ( for i, owner := range owners { ms[i] = &metric.Metric{ LabelKeys: labelKeys, - LabelValues: []string{owner.Kind, owner.Name}, + LabelValues: []string{owner.Kind, owner.Name, l.Namespace, holder}, Value: 1, } } @@ -107,10 +112,10 @@ func wrapLeaseFunc(f func(*coordinationv1.Lease) *metric.Family) func(interface{ func createLeaseListWatch(kubeClient clientset.Interface, _ string, _ string) cache.ListerWatcher { return &cache.ListWatch{ ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - return kubeClient.CoordinationV1().Leases("kube-node-lease").List(context.TODO(), opts) + return kubeClient.CoordinationV1().Leases("").List(context.TODO(), opts) }, WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - return kubeClient.CoordinationV1().Leases("kube-node-lease").Watch(context.TODO(), opts) + return kubeClient.CoordinationV1().Leases("").Watch(context.TODO(), opts) }, } } diff --git a/internal/store/lease_test.go b/internal/store/lease_test.go index 30bfce51d7..23f26f2403 100644 --- a/internal/store/lease_test.go +++ b/internal/store/lease_test.go @@ -33,7 +33,7 @@ func TestLeaseStore(t *testing.T) { # HELP kube_lease_renew_time Kube lease renew time. # TYPE kube_lease_renew_time gauge ` - + leaseOwner := "kube-master" var ( cases = []generateMetricsTestCase{ { @@ -41,11 +41,40 @@ func TestLeaseStore(t *testing.T) { ObjectMeta: metav1.ObjectMeta{ Generation: 2, Name: "kube-master", + Namespace: "default", + CreationTimestamp: metav1.Time{Time: time.Unix(1500000000, 0)}, + OwnerReferences: []metav1.OwnerReference{ + { + Kind: "Node", + Name: leaseOwner, + }, + }, + }, + Spec: coordinationv1.LeaseSpec{ + RenewTime: &metav1.MicroTime{Time: time.Unix(1500000000, 0)}, + HolderIdentity: &leaseOwner, + }, + }, + Want: metadata + ` + kube_lease_owner{lease="kube-master",owner_kind="Node",owner_name="kube-master",namespace="default",lease_holder="kube-master"} 1 + kube_lease_renew_time{lease="kube-master"} 1.5e+09 + `, + MetricNames: []string{ + "kube_lease_owner", + "kube_lease_renew_time", + }, + }, + { + Obj: &coordinationv1.Lease{ + ObjectMeta: metav1.ObjectMeta{ + Generation: 2, + Name: "kube-master", + Namespace: "default", CreationTimestamp: metav1.Time{Time: time.Unix(1500000000, 0)}, OwnerReferences: []metav1.OwnerReference{ { Kind: "Node", - Name: "kube-master", + Name: leaseOwner, }, }, }, @@ -54,7 +83,7 @@ func TestLeaseStore(t *testing.T) { }, }, Want: metadata + ` - kube_lease_owner{lease="kube-master",owner_kind="Node",owner_name="kube-master"} 1 + kube_lease_owner{lease="kube-master",owner_kind="Node",owner_name="kube-master",namespace="default",lease_holder=""} 1 kube_lease_renew_time{lease="kube-master"} 1.5e+09 `, MetricNames: []string{ diff --git a/internal/store/limitrange.go b/internal/store/limitrange.go index 1163a2de1a..ef1bd8ffa4 100644 --- a/internal/store/limitrange.go +++ b/internal/store/limitrange.go @@ -25,6 +25,7 @@ import ( "k8s.io/apimachinery/pkg/watch" clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/cache" + basemetrics "k8s.io/component-base/metrics" "k8s.io/kube-state-metrics/v2/pkg/metric" generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator" @@ -34,10 +35,11 @@ var ( descLimitRangeLabelsDefaultLabels = []string{"namespace", "limitrange"} limitRangeMetricFamilies = []generator.FamilyGenerator{ - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_limitrange", "Information about limit range.", metric.Gauge, + basemetrics.STABLE, "", wrapLimitRangeFunc(func(r *v1.LimitRange) *metric.Family { ms := []*metric.Metric{} @@ -89,10 +91,11 @@ var ( } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_limitrange_created", "Unix creation timestamp", metric.Gauge, + basemetrics.STABLE, "", wrapLimitRangeFunc(func(r *v1.LimitRange) *metric.Family { ms := []*metric.Metric{} diff --git a/internal/store/limitrange_test.go b/internal/store/limitrange_test.go index 22f531bc26..76741e3e16 100644 --- a/internal/store/limitrange_test.go +++ b/internal/store/limitrange_test.go @@ -33,9 +33,9 @@ func TestLimitRangeStore(t *testing.T) { // Fixed metadata on type and help text. We prepend this to every expected // output so we only have to modify a single place when doing adjustments. const metadata = ` - # HELP kube_limitrange_created Unix creation timestamp + # HELP kube_limitrange_created [STABLE] Unix creation timestamp # TYPE kube_limitrange_created gauge - # HELP kube_limitrange Information about limit range. + # HELP kube_limitrange [STABLE] Information about limit range. # TYPE kube_limitrange gauge ` cases := []generateMetricsTestCase{ diff --git a/internal/store/namespace.go b/internal/store/namespace.go index 40a45b2461..81d0a53dfa 100644 --- a/internal/store/namespace.go +++ b/internal/store/namespace.go @@ -19,6 +19,8 @@ package store import ( "context" + basemetrics "k8s.io/component-base/metrics" + "k8s.io/kube-state-metrics/v2/pkg/metric" generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator" @@ -40,10 +42,11 @@ var ( func namespaceMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generator.FamilyGenerator { return []generator.FamilyGenerator{ - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_namespace_created", "Unix creation timestamp", metric.Gauge, + basemetrics.STABLE, "", wrapNamespaceFunc(func(n *v1.Namespace) *metric.Family { ms := []*metric.Metric{} @@ -76,10 +79,11 @@ func namespaceMetricFamilies(allowAnnotationsList, allowLabelsList []string) []g } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( descNamespaceLabelsName, descNamespaceLabelsHelp, metric.Gauge, + basemetrics.STABLE, "", wrapNamespaceFunc(func(n *v1.Namespace) *metric.Family { labelKeys, labelValues := createPrometheusLabelKeysValues("label", n.Labels, allowLabelsList) @@ -94,10 +98,11 @@ func namespaceMetricFamilies(allowAnnotationsList, allowLabelsList []string) []g } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_namespace_status_phase", "kubernetes namespace status phase.", metric.Gauge, + basemetrics.STABLE, "", wrapNamespaceFunc(func(n *v1.Namespace) *metric.Family { ms := []*metric.Metric{ diff --git a/internal/store/namespace_test.go b/internal/store/namespace_test.go index f550ed0e1e..2f8161f094 100644 --- a/internal/store/namespace_test.go +++ b/internal/store/namespace_test.go @@ -32,11 +32,11 @@ func TestNamespaceStore(t *testing.T) { const metadata = ` # HELP kube_namespace_annotations Kubernetes annotations converted to Prometheus labels. # TYPE kube_namespace_annotations gauge - # HELP kube_namespace_created Unix creation timestamp + # HELP kube_namespace_created [STABLE] Unix creation timestamp # TYPE kube_namespace_created gauge - # HELP kube_namespace_labels Kubernetes labels converted to Prometheus labels. + # HELP kube_namespace_labels [STABLE] Kubernetes labels converted to Prometheus labels. # TYPE kube_namespace_labels gauge - # HELP kube_namespace_status_phase kubernetes namespace status phase. + # HELP kube_namespace_status_phase [STABLE] kubernetes namespace status phase. # TYPE kube_namespace_status_phase gauge # HELP kube_namespace_status_condition The condition of a namespace. # TYPE kube_namespace_status_condition gauge diff --git a/internal/store/networkpolicy.go b/internal/store/networkpolicy.go index 2416882329..d0ec45d9b9 100644 --- a/internal/store/networkpolicy.go +++ b/internal/store/networkpolicy.go @@ -46,6 +46,7 @@ func networkPolicyMetricFamilies(allowAnnotationsList, allowLabelsList []string) metric.Gauge, "", wrapNetworkPolicyFunc(func(n *networkingv1.NetworkPolicy) *metric.Family { + return &metric.Family{ Metrics: []*metric.Metric{ { diff --git a/internal/store/node.go b/internal/store/node.go index ae464acb5b..09ec39140c 100644 --- a/internal/store/node.go +++ b/internal/store/node.go @@ -20,6 +20,8 @@ import ( "context" "strings" + basemetrics "k8s.io/component-base/metrics" + "k8s.io/kube-state-metrics/v2/pkg/constant" "k8s.io/kube-state-metrics/v2/pkg/metric" generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator" @@ -56,10 +58,11 @@ func nodeMetricFamilies(allowAnnotationsList, allowLabelsList []string) []genera } func createNodeCreatedFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_node_created", "Unix creation timestamp", metric.Gauge, + basemetrics.STABLE, "", wrapNodeFunc(func(n *v1.Node) *metric.Family { ms := []*metric.Metric{} @@ -79,10 +82,11 @@ func createNodeCreatedFamilyGenerator() generator.FamilyGenerator { } func createNodeInfoFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_node_info", "Information about a cluster node.", metric.Gauge, + basemetrics.STABLE, "", wrapNodeFunc(func(n *v1.Node) *metric.Family { labelKeys := []string{ @@ -150,10 +154,11 @@ func createNodeAnnotationsGenerator(allowAnnotationsList []string) generator.Fam } func createNodeLabelsGenerator(allowLabelsList []string) generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( descNodeLabelsName, descNodeLabelsHelp, metric.Gauge, + basemetrics.STABLE, "", wrapNodeFunc(func(n *v1.Node) *metric.Family { labelKeys, labelValues := createPrometheusLabelKeysValues("label", n.Labels, allowLabelsList) @@ -196,10 +201,11 @@ func createNodeRoleFamilyGenerator() generator.FamilyGenerator { } func createNodeSpecTaintFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_node_spec_taint", "The taint of a cluster node.", metric.Gauge, + basemetrics.STABLE, "", wrapNodeFunc(func(n *v1.Node) *metric.Family { ms := make([]*metric.Metric, len(n.Spec.Taints)) @@ -223,10 +229,11 @@ func createNodeSpecTaintFamilyGenerator() generator.FamilyGenerator { } func createNodeSpecUnschedulableFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_node_spec_unschedulable", "Whether a node can schedule new pods.", metric.Gauge, + basemetrics.STABLE, "", wrapNodeFunc(func(n *v1.Node) *metric.Family { return &metric.Family{ @@ -241,10 +248,11 @@ func createNodeSpecUnschedulableFamilyGenerator() generator.FamilyGenerator { } func createNodeStatusAllocatableFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_node_status_allocatable", "The allocatable for different resources of a node that are available for scheduling.", metric.Gauge, + basemetrics.STABLE, "", wrapNodeFunc(func(n *v1.Node) *metric.Family { ms := []*metric.Metric{} @@ -324,10 +332,11 @@ func createNodeStatusAllocatableFamilyGenerator() generator.FamilyGenerator { } func createNodeStatusCapacityFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_node_status_capacity", "The capacity for different resources of a node.", metric.Gauge, + basemetrics.STABLE, "", wrapNodeFunc(func(n *v1.Node) *metric.Family { ms := []*metric.Metric{} @@ -410,10 +419,11 @@ func createNodeStatusCapacityFamilyGenerator() generator.FamilyGenerator { // customized condition for cluster node (e.g. node-problem-detector), and // Kubernetes may add new core conditions in future. func createNodeStatusConditionFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_node_status_condition", "The condition of a cluster node.", metric.Gauge, + basemetrics.STABLE, "", wrapNodeFunc(func(n *v1.Node) *metric.Family { ms := make([]*metric.Metric, len(n.Status.Conditions)*len(conditionStatuses)) diff --git a/internal/store/node_test.go b/internal/store/node_test.go index 2490720d15..0e44431705 100644 --- a/internal/store/node_test.go +++ b/internal/store/node_test.go @@ -54,9 +54,9 @@ func TestNodeStore(t *testing.T) { }, }, Want: ` - # HELP kube_node_info Information about a cluster node. - # HELP kube_node_labels Kubernetes labels converted to Prometheus labels. - # HELP kube_node_spec_unschedulable Whether a node can schedule new pods. + # HELP kube_node_info [STABLE] Information about a cluster node. + # HELP kube_node_labels [STABLE] Kubernetes labels converted to Prometheus labels. + # HELP kube_node_spec_unschedulable [STABLE] Whether a node can schedule new pods. # TYPE kube_node_info gauge # TYPE kube_node_labels gauge # TYPE kube_node_spec_unschedulable gauge @@ -74,7 +74,7 @@ func TestNodeStore(t *testing.T) { Spec: v1.NodeSpec{}, }, Want: ` - # HELP kube_node_info Information about a cluster node. + # HELP kube_node_info [STABLE] Information about a cluster node. # TYPE kube_node_info gauge kube_node_info{container_runtime_version="",kernel_version="",kubelet_version="",kubeproxy_version="",node="",os_image="",pod_cidr="",provider_id="",internal_ip="",system_uuid=""} 1 `, @@ -126,13 +126,13 @@ func TestNodeStore(t *testing.T) { }, }, Want: ` - # HELP kube_node_created Unix creation timestamp - # HELP kube_node_info Information about a cluster node. - # HELP kube_node_labels Kubernetes labels converted to Prometheus labels. + # HELP kube_node_created [STABLE] Unix creation timestamp + # HELP kube_node_info [STABLE] Information about a cluster node. + # HELP kube_node_labels [STABLE] Kubernetes labels converted to Prometheus labels. # HELP kube_node_role The role of a cluster node. - # HELP kube_node_spec_unschedulable Whether a node can schedule new pods. - # HELP kube_node_status_allocatable The allocatable for different resources of a node that are available for scheduling. - # HELP kube_node_status_capacity The capacity for different resources of a node. + # HELP kube_node_spec_unschedulable [STABLE] Whether a node can schedule new pods. + # HELP kube_node_status_allocatable [STABLE] The allocatable for different resources of a node that are available for scheduling. + # HELP kube_node_status_capacity [STABLE] The capacity for different resources of a node. # TYPE kube_node_created gauge # TYPE kube_node_info gauge # TYPE kube_node_labels gauge @@ -183,7 +183,7 @@ func TestNodeStore(t *testing.T) { }, }, Want: ` - # HELP kube_node_status_condition The condition of a cluster node. + # HELP kube_node_status_condition [STABLE] The condition of a cluster node. # TYPE kube_node_status_condition gauge kube_node_status_condition{condition="CustomizedType",node="127.0.0.1",status="false"} 0 kube_node_status_condition{condition="CustomizedType",node="127.0.0.1",status="true"} 1 @@ -211,7 +211,7 @@ func TestNodeStore(t *testing.T) { }, }, Want: ` - # HELP kube_node_status_condition The condition of a cluster node. + # HELP kube_node_status_condition [STABLE] The condition of a cluster node. # TYPE kube_node_status_condition gauge kube_node_status_condition{condition="CustomizedType",node="127.0.0.2",status="false"} 0 kube_node_status_condition{condition="CustomizedType",node="127.0.0.2",status="true"} 0 @@ -239,7 +239,7 @@ func TestNodeStore(t *testing.T) { }, }, Want: ` - # HELP kube_node_status_condition The condition of a cluster node. + # HELP kube_node_status_condition [STABLE] The condition of a cluster node. # TYPE kube_node_status_condition gauge kube_node_status_condition{condition="CustomizedType",node="127.0.0.3",status="false"} 1 kube_node_status_condition{condition="CustomizedType",node="127.0.0.3",status="true"} 0 @@ -268,7 +268,7 @@ func TestNodeStore(t *testing.T) { }, }, Want: ` - # HELP kube_node_spec_taint The taint of a cluster node. + # HELP kube_node_spec_taint [STABLE] The taint of a cluster node. # TYPE kube_node_spec_taint gauge kube_node_spec_taint{effect="PreferNoSchedule",key="Dedicated",node="127.0.0.1",value=""} 1 kube_node_spec_taint{effect="PreferNoSchedule",key="Accelerated",node="127.0.0.1",value="gpu"} 1 diff --git a/internal/store/persistentvolume.go b/internal/store/persistentvolume.go index 8354d0972e..7955d913bb 100644 --- a/internal/store/persistentvolume.go +++ b/internal/store/persistentvolume.go @@ -20,6 +20,8 @@ import ( "context" "strconv" + basemetrics "k8s.io/component-base/metrics" + "k8s.io/kube-state-metrics/v2/pkg/metric" generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator" @@ -45,10 +47,11 @@ var ( func persistentVolumeMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generator.FamilyGenerator { return []generator.FamilyGenerator{ - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( descPersistentVolumeClaimRefName, descPersistentVolumeClaimRefHelp, metric.Gauge, + basemetrics.STABLE, "", wrapPersistentVolumeFunc(func(p *v1.PersistentVolume) *metric.Family { claimRef := p.Spec.ClaimRef @@ -93,10 +96,11 @@ func persistentVolumeMetricFamilies(allowAnnotationsList, allowLabelsList []stri } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( descPersistentVolumeLabelsName, descPersistentVolumeLabelsHelp, metric.Gauge, + basemetrics.STABLE, "", wrapPersistentVolumeFunc(func(p *v1.PersistentVolume) *metric.Family { labelKeys, labelValues := createPrometheusLabelKeysValues("label", p.Labels, allowLabelsList) @@ -111,10 +115,11 @@ func persistentVolumeMetricFamilies(allowAnnotationsList, allowLabelsList []stri } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_persistentvolume_status_phase", "The phase indicates if a volume is available, bound to a claim, or released by a claim.", metric.Gauge, + basemetrics.STABLE, "", wrapPersistentVolumeFunc(func(p *v1.PersistentVolume) *metric.Family { phase := p.Status.Phase @@ -158,10 +163,11 @@ func persistentVolumeMetricFamilies(allowAnnotationsList, allowLabelsList []stri } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_persistentvolume_info", "Information about persistentvolume.", metric.Gauge, + basemetrics.STABLE, "", wrapPersistentVolumeFunc(func(p *v1.PersistentVolume) *metric.Family { var ( @@ -275,10 +281,11 @@ func persistentVolumeMetricFamilies(allowAnnotationsList, allowLabelsList []stri } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_persistentvolume_capacity_bytes", "Persistentvolume capacity in bytes.", metric.Gauge, + basemetrics.STABLE, "", wrapPersistentVolumeFunc(func(p *v1.PersistentVolume) *metric.Family { storage := p.Spec.Capacity[v1.ResourceStorage] diff --git a/internal/store/persistentvolume_test.go b/internal/store/persistentvolume_test.go index 87ee21f665..a5686d1d3c 100644 --- a/internal/store/persistentvolume_test.go +++ b/internal/store/persistentvolume_test.go @@ -42,7 +42,7 @@ func TestPersistentVolumeStore(t *testing.T) { }, }, Want: ` - # HELP kube_persistentvolume_status_phase The phase indicates if a volume is available, bound to a claim, or released by a claim. + # HELP kube_persistentvolume_status_phase [STABLE] The phase indicates if a volume is available, bound to a claim, or released by a claim. # TYPE kube_persistentvolume_status_phase gauge kube_persistentvolume_status_phase{persistentvolume="test-pv-pending",phase="Available"} 0 kube_persistentvolume_status_phase{persistentvolume="test-pv-pending",phase="Bound"} 0 @@ -64,7 +64,7 @@ func TestPersistentVolumeStore(t *testing.T) { }, }, Want: ` - # HELP kube_persistentvolume_status_phase The phase indicates if a volume is available, bound to a claim, or released by a claim. + # HELP kube_persistentvolume_status_phase [STABLE] The phase indicates if a volume is available, bound to a claim, or released by a claim. # TYPE kube_persistentvolume_status_phase gauge kube_persistentvolume_status_phase{persistentvolume="test-pv-available",phase="Available"} 1 kube_persistentvolume_status_phase{persistentvolume="test-pv-available",phase="Bound"} 0 @@ -84,7 +84,7 @@ func TestPersistentVolumeStore(t *testing.T) { }, }, Want: ` - # HELP kube_persistentvolume_status_phase The phase indicates if a volume is available, bound to a claim, or released by a claim. + # HELP kube_persistentvolume_status_phase [STABLE] The phase indicates if a volume is available, bound to a claim, or released by a claim. # TYPE kube_persistentvolume_status_phase gauge kube_persistentvolume_status_phase{persistentvolume="test-pv-bound",phase="Available"} 0 kube_persistentvolume_status_phase{persistentvolume="test-pv-bound",phase="Bound"} 1 @@ -104,7 +104,7 @@ func TestPersistentVolumeStore(t *testing.T) { }, }, Want: ` - # HELP kube_persistentvolume_status_phase The phase indicates if a volume is available, bound to a claim, or released by a claim. + # HELP kube_persistentvolume_status_phase [STABLE] The phase indicates if a volume is available, bound to a claim, or released by a claim. # TYPE kube_persistentvolume_status_phase gauge kube_persistentvolume_status_phase{persistentvolume="test-pv-released",phase="Available"} 0 kube_persistentvolume_status_phase{persistentvolume="test-pv-released",phase="Bound"} 0 @@ -125,7 +125,7 @@ func TestPersistentVolumeStore(t *testing.T) { }, }, Want: ` - # HELP kube_persistentvolume_status_phase The phase indicates if a volume is available, bound to a claim, or released by a claim. + # HELP kube_persistentvolume_status_phase [STABLE] The phase indicates if a volume is available, bound to a claim, or released by a claim. # TYPE kube_persistentvolume_status_phase gauge kube_persistentvolume_status_phase{persistentvolume="test-pv-failed",phase="Available"} 0 kube_persistentvolume_status_phase{persistentvolume="test-pv-failed",phase="Bound"} 0 @@ -148,7 +148,7 @@ func TestPersistentVolumeStore(t *testing.T) { }, }, Want: ` - # HELP kube_persistentvolume_status_phase The phase indicates if a volume is available, bound to a claim, or released by a claim. + # HELP kube_persistentvolume_status_phase [STABLE] The phase indicates if a volume is available, bound to a claim, or released by a claim. # TYPE kube_persistentvolume_status_phase gauge kube_persistentvolume_status_phase{persistentvolume="test-pv-pending",phase="Available"} 0 kube_persistentvolume_status_phase{persistentvolume="test-pv-pending",phase="Bound"} 0 @@ -170,7 +170,7 @@ func TestPersistentVolumeStore(t *testing.T) { }, }, Want: ` - # HELP kube_persistentvolume_info Information about persistentvolume. + # HELP kube_persistentvolume_info [STABLE] Information about persistentvolume. # TYPE kube_persistentvolume_info gauge kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",storageclass=""} 1 `, @@ -189,7 +189,7 @@ func TestPersistentVolumeStore(t *testing.T) { }, }, Want: ` - # HELP kube_persistentvolume_info Information about persistentvolume. + # HELP kube_persistentvolume_info [STABLE] Information about persistentvolume. # TYPE kube_persistentvolume_info gauge kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",storageclass=""} 1 `, @@ -212,7 +212,7 @@ func TestPersistentVolumeStore(t *testing.T) { }, }, Want: ` - # HELP kube_persistentvolume_info Information about persistentvolume. + # HELP kube_persistentvolume_info [STABLE] Information about persistentvolume. # TYPE kube_persistentvolume_info gauge kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="name",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",storageclass=""} 1 `, @@ -235,7 +235,7 @@ func TestPersistentVolumeStore(t *testing.T) { }, }, Want: ` - # HELP kube_persistentvolume_info Information about persistentvolume. + # HELP kube_persistentvolume_info [STABLE] Information about persistentvolume. # TYPE kube_persistentvolume_info gauge kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="aws://eu-west-1c/vol-012d34d567890123b",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",storageclass=""} 1 `, @@ -258,7 +258,7 @@ func TestPersistentVolumeStore(t *testing.T) { }, }, Want: ` - # HELP kube_persistentvolume_info Information about persistentvolume. + # HELP kube_persistentvolume_info [STABLE] Information about persistentvolume. # TYPE kube_persistentvolume_info gauge kube_persistentvolume_info{azure_disk_name="azure_disk_1",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",storageclass=""} 1 `, @@ -282,7 +282,7 @@ func TestPersistentVolumeStore(t *testing.T) { }, }, Want: ` - # HELP kube_persistentvolume_info Information about persistentvolume. + # HELP kube_persistentvolume_info [STABLE] Information about persistentvolume. # TYPE kube_persistentvolume_info gauge kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="123",fc_target_wwns="0123456789abcdef,abcdef0123456789",fc_wwids="",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",storageclass=""} 1 `, @@ -305,7 +305,7 @@ func TestPersistentVolumeStore(t *testing.T) { }, }, Want: ` - # HELP kube_persistentvolume_info Information about persistentvolume. + # HELP kube_persistentvolume_info [STABLE] Information about persistentvolume. # TYPE kube_persistentvolume_info gauge kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="0123456789abcdef,abcdef0123456789",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",storageclass=""} 1 `, @@ -330,7 +330,7 @@ func TestPersistentVolumeStore(t *testing.T) { }, }, Want: ` - # HELP kube_persistentvolume_info Information about persistentvolume. + # HELP kube_persistentvolume_info [STABLE] Information about persistentvolume. # TYPE kube_persistentvolume_info gauge kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="iqn.my.test.server.target00",iscsi_lun="123",iscsi_target_portal="1.2.3.4:3260",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",storageclass=""} 1 `, @@ -356,7 +356,7 @@ func TestPersistentVolumeStore(t *testing.T) { }, }, Want: ` - # HELP kube_persistentvolume_info Information about persistentvolume. + # HELP kube_persistentvolume_info [STABLE] Information about persistentvolume. # TYPE kube_persistentvolume_info gauge kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="iqn.my.test.initiator:112233",iscsi_iqn="iqn.my.test.server.target00",iscsi_lun="123",iscsi_target_portal="1.2.3.4:3260",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",storageclass=""} 1 `, @@ -380,7 +380,7 @@ func TestPersistentVolumeStore(t *testing.T) { }, }, Want: ` - # HELP kube_persistentvolume_info Information about persistentvolume. + # HELP kube_persistentvolume_info [STABLE] Information about persistentvolume. # TYPE kube_persistentvolume_info gauge kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="",local_fs="",nfs_path="/myPath",nfs_server="1.2.3.4",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",storageclass=""} 1 `, @@ -404,7 +404,7 @@ func TestPersistentVolumeStore(t *testing.T) { }, }, Want: ` - # HELP kube_persistentvolume_info Information about persistentvolume. + # HELP kube_persistentvolume_info [STABLE] Information about persistentvolume. # TYPE kube_persistentvolume_info gauge kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="test-driver",csi_volume_handle="test-volume-handle",persistentvolume="test-pv-available",storageclass=""} 1 `, @@ -428,7 +428,7 @@ func TestPersistentVolumeStore(t *testing.T) { }, }, Want: ` - # HELP kube_persistentvolume_info Information about persistentvolume. + # HELP kube_persistentvolume_info [STABLE] Information about persistentvolume. # TYPE kube_persistentvolume_info gauge kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="/mnt/data",local_fs="ext4",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",storageclass=""} 1 `, @@ -451,7 +451,7 @@ func TestPersistentVolumeStore(t *testing.T) { }, }, Want: ` - # HELP kube_persistentvolume_info Information about persistentvolume. + # HELP kube_persistentvolume_info [STABLE] Information about persistentvolume. # TYPE kube_persistentvolume_info gauge kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="/mnt/data",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",storageclass=""} 1 `, @@ -475,7 +475,7 @@ func TestPersistentVolumeStore(t *testing.T) { }, }, Want: ` - # HELP kube_persistentvolume_info Information about persistentvolume. + # HELP kube_persistentvolume_info [STABLE] Information about persistentvolume. # TYPE kube_persistentvolume_info gauge kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="/mnt/data",host_path_type="Directory",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",storageclass=""} 1 `, @@ -498,7 +498,7 @@ func TestPersistentVolumeStore(t *testing.T) { }, }, Want: ` - # HELP kube_persistentvolume_info Information about persistentvolume. + # HELP kube_persistentvolume_info [STABLE] Information about persistentvolume. # TYPE kube_persistentvolume_info gauge kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="/mnt/data",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",storageclass=""} 1 `, @@ -520,7 +520,7 @@ func TestPersistentVolumeStore(t *testing.T) { }, }, Want: ` - # HELP kube_persistentvolume_labels Kubernetes labels converted to Prometheus labels. + # HELP kube_persistentvolume_labels [STABLE] Kubernetes labels converted to Prometheus labels. # TYPE kube_persistentvolume_labels gauge kube_persistentvolume_labels{persistentvolume="test-labeled-pv"} 1 `, @@ -536,7 +536,7 @@ func TestPersistentVolumeStore(t *testing.T) { }, }, Want: ` - # HELP kube_persistentvolume_labels Kubernetes labels converted to Prometheus labels. + # HELP kube_persistentvolume_labels [STABLE] Kubernetes labels converted to Prometheus labels. # TYPE kube_persistentvolume_labels gauge kube_persistentvolume_labels{persistentvolume="test-unlabeled-pv"} 1 `, @@ -561,7 +561,7 @@ func TestPersistentVolumeStore(t *testing.T) { }, }, Want: ` - # HELP kube_persistentvolume_claim_ref Information about the Persistent Volume Claim Reference. + # HELP kube_persistentvolume_claim_ref [STABLE] Information about the Persistent Volume Claim Reference. # TYPE kube_persistentvolume_claim_ref gauge kube_persistentvolume_claim_ref{claim_namespace="default",name="pv-claim",persistentvolume="test-claimed-pv"} 1 `, @@ -577,7 +577,7 @@ func TestPersistentVolumeStore(t *testing.T) { }, }, Want: ` - # HELP kube_persistentvolume_claim_ref Information about the Persistent Volume Claim Reference. + # HELP kube_persistentvolume_claim_ref [STABLE] Information about the Persistent Volume Claim Reference. # TYPE kube_persistentvolume_claim_ref gauge `, MetricNames: []string{"kube_persistentvolume_claim_ref"}, @@ -594,7 +594,7 @@ func TestPersistentVolumeStore(t *testing.T) { }, }, Want: ` - # HELP kube_persistentvolume_capacity_bytes Persistentvolume capacity in bytes. + # HELP kube_persistentvolume_capacity_bytes [STABLE] Persistentvolume capacity in bytes. # TYPE kube_persistentvolume_capacity_bytes gauge kube_persistentvolume_capacity_bytes{persistentvolume="test-pv"} 5.36870912e+09 `, @@ -625,7 +625,7 @@ func TestPersistentVolumeStore(t *testing.T) { }, Want: ` # HELP kube_persistentvolume_annotations Kubernetes annotations converted to Prometheus labels. - # HELP kube_persistentvolume_labels Kubernetes labels converted to Prometheus labels. + # HELP kube_persistentvolume_labels [STABLE] Kubernetes labels converted to Prometheus labels. # TYPE kube_persistentvolume_annotations gauge # TYPE kube_persistentvolume_labels gauge kube_persistentvolume_annotations{annotation_app_k8s_io_owner="mysql-server",persistentvolume="test-allowlisted-labels-annotations"} 1 @@ -655,7 +655,7 @@ func TestPersistentVolumeStore(t *testing.T) { }, Want: ` # HELP kube_persistentvolume_annotations Kubernetes annotations converted to Prometheus labels. - # HELP kube_persistentvolume_labels Kubernetes labels converted to Prometheus labels. + # HELP kube_persistentvolume_labels [STABLE] Kubernetes labels converted to Prometheus labels. # TYPE kube_persistentvolume_annotations gauge # TYPE kube_persistentvolume_labels gauge kube_persistentvolume_annotations{persistentvolume="test-defaul-labels-annotations"} 1 diff --git a/internal/store/persistentvolumeclaim.go b/internal/store/persistentvolumeclaim.go index 3d77901e39..b048faa674 100644 --- a/internal/store/persistentvolumeclaim.go +++ b/internal/store/persistentvolumeclaim.go @@ -19,6 +19,8 @@ package store import ( "context" + basemetrics "k8s.io/component-base/metrics" + "k8s.io/kube-state-metrics/v2/pkg/metric" generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator" @@ -40,10 +42,11 @@ var ( func persistentVolumeClaimMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generator.FamilyGenerator { return []generator.FamilyGenerator{ - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( descPersistentVolumeClaimLabelsName, descPersistentVolumeClaimLabelsHelp, metric.Gauge, + basemetrics.STABLE, "", wrapPersistentVolumeClaimFunc(func(p *v1.PersistentVolumeClaim) *metric.Family { labelKeys, labelValues := createPrometheusLabelKeysValues("label", p.Labels, allowLabelsList) @@ -76,10 +79,11 @@ func persistentVolumeClaimMetricFamilies(allowAnnotationsList, allowLabelsList [ } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_persistentvolumeclaim_info", "Information about persistent volume claim.", metric.Gauge, + basemetrics.STABLE, "", wrapPersistentVolumeClaimFunc(func(p *v1.PersistentVolumeClaim) *metric.Family { storageClassName := getPersistentVolumeClaimClass(p) @@ -95,10 +99,11 @@ func persistentVolumeClaimMetricFamilies(allowAnnotationsList, allowLabelsList [ } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_persistentvolumeclaim_status_phase", "The phase the persistent volume claim is currently in.", metric.Gauge, + basemetrics.STABLE, "", wrapPersistentVolumeClaimFunc(func(p *v1.PersistentVolumeClaim) *metric.Family { phase := p.Status.Phase @@ -134,10 +139,11 @@ func persistentVolumeClaimMetricFamilies(allowAnnotationsList, allowLabelsList [ } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_persistentvolumeclaim_resource_requests_storage_bytes", "The capacity of storage requested by the persistent volume claim.", metric.Gauge, + basemetrics.STABLE, "", wrapPersistentVolumeClaimFunc(func(p *v1.PersistentVolumeClaim) *metric.Family { ms := []*metric.Metric{} @@ -153,10 +159,11 @@ func persistentVolumeClaimMetricFamilies(allowAnnotationsList, allowLabelsList [ } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_persistentvolumeclaim_access_mode", "The access mode(s) specified by the persistent volume claim.", metric.Gauge, + basemetrics.STABLE, "", wrapPersistentVolumeClaimFunc(func(p *v1.PersistentVolumeClaim) *metric.Family { ms := make([]*metric.Metric, len(p.Spec.AccessModes)) diff --git a/internal/store/persistentvolumeclaim_test.go b/internal/store/persistentvolumeclaim_test.go index 53be9bd5a5..4902dfe217 100644 --- a/internal/store/persistentvolumeclaim_test.go +++ b/internal/store/persistentvolumeclaim_test.go @@ -68,12 +68,12 @@ func TestPersistentVolumeClaimStore(t *testing.T) { }, Want: ` # HELP kube_persistentvolumeclaim_created Unix creation timestamp - # HELP kube_persistentvolumeclaim_access_mode The access mode(s) specified by the persistent volume claim. + # HELP kube_persistentvolumeclaim_access_mode [STABLE] The access mode(s) specified by the persistent volume claim. # HELP kube_persistentvolumeclaim_annotations Kubernetes annotations converted to Prometheus labels. - # HELP kube_persistentvolumeclaim_info Information about persistent volume claim. - # HELP kube_persistentvolumeclaim_labels Kubernetes labels converted to Prometheus labels. - # HELP kube_persistentvolumeclaim_resource_requests_storage_bytes The capacity of storage requested by the persistent volume claim. - # HELP kube_persistentvolumeclaim_status_phase The phase the persistent volume claim is currently in. + # HELP kube_persistentvolumeclaim_info [STABLE] Information about persistent volume claim. + # HELP kube_persistentvolumeclaim_labels [STABLE] Kubernetes labels converted to Prometheus labels. + # HELP kube_persistentvolumeclaim_resource_requests_storage_bytes [STABLE] The capacity of storage requested by the persistent volume claim. + # HELP kube_persistentvolumeclaim_status_phase [STABLE] The phase the persistent volume claim is currently in. # HELP kube_persistentvolumeclaim_status_condition Information about status of different conditions of persistent volume claim. # TYPE kube_persistentvolumeclaim_created gauge # TYPE kube_persistentvolumeclaim_access_mode gauge @@ -140,12 +140,12 @@ func TestPersistentVolumeClaimStore(t *testing.T) { }, Want: ` # HELP kube_persistentvolumeclaim_created Unix creation timestamp - # HELP kube_persistentvolumeclaim_access_mode The access mode(s) specified by the persistent volume claim. + # HELP kube_persistentvolumeclaim_access_mode [STABLE] The access mode(s) specified by the persistent volume claim. # HELP kube_persistentvolumeclaim_annotations Kubernetes annotations converted to Prometheus labels. - # HELP kube_persistentvolumeclaim_info Information about persistent volume claim. - # HELP kube_persistentvolumeclaim_labels Kubernetes labels converted to Prometheus labels. - # HELP kube_persistentvolumeclaim_resource_requests_storage_bytes The capacity of storage requested by the persistent volume claim. - # HELP kube_persistentvolumeclaim_status_phase The phase the persistent volume claim is currently in. + # HELP kube_persistentvolumeclaim_info [STABLE] Information about persistent volume claim. + # HELP kube_persistentvolumeclaim_labels [STABLE] Kubernetes labels converted to Prometheus labels. + # HELP kube_persistentvolumeclaim_resource_requests_storage_bytes [STABLE] The capacity of storage requested by the persistent volume claim. + # HELP kube_persistentvolumeclaim_status_phase [STABLE] The phase the persistent volume claim is currently in. # HELP kube_persistentvolumeclaim_status_condition Information about status of different conditions of persistent volume claim. # TYPE kube_persistentvolumeclaim_created gauge # TYPE kube_persistentvolumeclaim_access_mode gauge @@ -196,11 +196,11 @@ func TestPersistentVolumeClaimStore(t *testing.T) { }, Want: ` # HELP kube_persistentvolumeclaim_created Unix creation timestamp - # HELP kube_persistentvolumeclaim_access_mode The access mode(s) specified by the persistent volume claim. - # HELP kube_persistentvolumeclaim_info Information about persistent volume claim. - # HELP kube_persistentvolumeclaim_labels Kubernetes labels converted to Prometheus labels. - # HELP kube_persistentvolumeclaim_resource_requests_storage_bytes The capacity of storage requested by the persistent volume claim. - # HELP kube_persistentvolumeclaim_status_phase The phase the persistent volume claim is currently in. + # HELP kube_persistentvolumeclaim_access_mode [STABLE] The access mode(s) specified by the persistent volume claim. + # HELP kube_persistentvolumeclaim_info [STABLE] Information about persistent volume claim. + # HELP kube_persistentvolumeclaim_labels [STABLE] Kubernetes labels converted to Prometheus labels. + # HELP kube_persistentvolumeclaim_resource_requests_storage_bytes [STABLE] The capacity of storage requested by the persistent volume claim. + # HELP kube_persistentvolumeclaim_status_phase [STABLE] The phase the persistent volume claim is currently in. # HELP kube_persistentvolumeclaim_status_condition Information about status of different conditions of persistent volume claim. # TYPE kube_persistentvolumeclaim_created gauge # TYPE kube_persistentvolumeclaim_access_mode gauge @@ -241,12 +241,12 @@ func TestPersistentVolumeClaimStore(t *testing.T) { }, Want: ` # HELP kube_persistentvolumeclaim_created Unix creation timestamp - # HELP kube_persistentvolumeclaim_access_mode The access mode(s) specified by the persistent volume claim. + # HELP kube_persistentvolumeclaim_access_mode [STABLE] The access mode(s) specified by the persistent volume claim. # HELP kube_persistentvolumeclaim_annotations Kubernetes annotations converted to Prometheus labels. - # HELP kube_persistentvolumeclaim_info Information about persistent volume claim. - # HELP kube_persistentvolumeclaim_labels Kubernetes labels converted to Prometheus labels. - # HELP kube_persistentvolumeclaim_resource_requests_storage_bytes The capacity of storage requested by the persistent volume claim. - # HELP kube_persistentvolumeclaim_status_phase The phase the persistent volume claim is currently in. + # HELP kube_persistentvolumeclaim_info [STABLE] Information about persistent volume claim. + # HELP kube_persistentvolumeclaim_labels [STABLE] Kubernetes labels converted to Prometheus labels. + # HELP kube_persistentvolumeclaim_resource_requests_storage_bytes [STABLE] The capacity of storage requested by the persistent volume claim. + # HELP kube_persistentvolumeclaim_status_phase [STABLE] The phase the persistent volume claim is currently in. # HELP kube_persistentvolumeclaim_status_condition Information about status of different conditions of persistent volume claim. # TYPE kube_persistentvolumeclaim_created gauge # TYPE kube_persistentvolumeclaim_access_mode gauge diff --git a/internal/store/pod.go b/internal/store/pod.go index 28443f10ae..ef9eb7ce28 100644 --- a/internal/store/pod.go +++ b/internal/store/pod.go @@ -20,6 +20,7 @@ import ( "context" "strconv" + basemetrics "k8s.io/component-base/metrics" "k8s.io/utils/net" "k8s.io/kube-state-metrics/v2/pkg/constant" @@ -94,10 +95,11 @@ func podMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generat } func createPodCompletionTimeFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_pod_completion_time", "Completion time in unix timestamp for a pod.", metric.Gauge, + basemetrics.STABLE, "", wrapPodFunc(func(p *v1.Pod) *metric.Family { ms := []*metric.Metric{} @@ -128,10 +130,11 @@ func createPodCompletionTimeFamilyGenerator() generator.FamilyGenerator { } func createPodContainerInfoFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_pod_container_info", "Information about a container in a pod.", metric.Gauge, + basemetrics.STABLE, "", wrapPodFunc(func(p *v1.Pod) *metric.Family { ms := []*metric.Metric{} @@ -282,10 +285,11 @@ func createPodContainerResourceRequestsFamilyGenerator() generator.FamilyGenerat } func createPodContainerStateStartedFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_pod_container_state_started", "Start time in unix timestamp for a pod container.", metric.Gauge, + basemetrics.STABLE, "", wrapPodFunc(func(p *v1.Pod) *metric.Family { ms := []*metric.Metric{} @@ -364,10 +368,11 @@ func createPodContainerStatusLastTerminatedExitCodeFamilyGenerator() generator.F } func createPodContainerStatusReadyFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_pod_container_status_ready", "Describes whether the containers readiness check succeeded.", metric.Gauge, + basemetrics.STABLE, "", wrapPodFunc(func(p *v1.Pod) *metric.Family { ms := make([]*metric.Metric, len(p.Status.ContainerStatuses)) @@ -387,10 +392,10 @@ func createPodContainerStatusReadyFamilyGenerator() generator.FamilyGenerator { } func createPodContainerStatusRestartsTotalFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_pod_container_status_restarts_total", "The number of container restarts per container.", - metric.Counter, + metric.Counter, basemetrics.STABLE, "", wrapPodFunc(func(p *v1.Pod) *metric.Family { ms := make([]*metric.Metric, len(p.Status.ContainerStatuses)) @@ -411,10 +416,11 @@ func createPodContainerStatusRestartsTotalFamilyGenerator() generator.FamilyGene } func createPodContainerStatusRunningFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_pod_container_status_running", "Describes whether the container is currently in running state.", metric.Gauge, + basemetrics.STABLE, "", wrapPodFunc(func(p *v1.Pod) *metric.Family { ms := make([]*metric.Metric, len(p.Status.ContainerStatuses)) @@ -435,10 +441,11 @@ func createPodContainerStatusRunningFamilyGenerator() generator.FamilyGenerator } func createPodContainerStatusTerminatedFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_pod_container_status_terminated", "Describes whether the container is currently in terminated state.", metric.Gauge, + basemetrics.STABLE, "", wrapPodFunc(func(p *v1.Pod) *metric.Family { ms := make([]*metric.Metric, len(p.Status.ContainerStatuses)) @@ -484,10 +491,11 @@ func createPodContainerStatusTerminatedReasonFamilyGenerator() generator.FamilyG } func createPodContainerStatusWaitingFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_pod_container_status_waiting", "Describes whether the container is currently in waiting state.", metric.Gauge, + basemetrics.STABLE, "", wrapPodFunc(func(p *v1.Pod) *metric.Family { ms := make([]*metric.Metric, len(p.Status.ContainerStatuses)) @@ -508,10 +516,11 @@ func createPodContainerStatusWaitingFamilyGenerator() generator.FamilyGenerator } func createPodContainerStatusWaitingReasonFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_pod_container_status_waiting_reason", "Describes the reason the container is currently in waiting state.", metric.Gauge, + basemetrics.STABLE, "", wrapPodFunc(func(p *v1.Pod) *metric.Family { ms := make([]*metric.Metric, 0, len(p.Status.ContainerStatuses)) @@ -533,10 +542,11 @@ func createPodContainerStatusWaitingReasonFamilyGenerator() generator.FamilyGene } func createPodCreatedFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_pod_created", "Unix creation timestamp", metric.Gauge, + basemetrics.STABLE, "", wrapPodFunc(func(p *v1.Pod) *metric.Family { ms := []*metric.Metric{} @@ -581,10 +591,11 @@ func createPodDeletionTimestampFamilyGenerator() generator.FamilyGenerator { } func createPodInfoFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_pod_info", "Information about pod.", metric.Gauge, + basemetrics.STABLE, "", wrapPodFunc(func(p *v1.Pod) *metric.Family { createdBy := metav1.GetControllerOf(p) @@ -647,10 +658,11 @@ func createPodIPFamilyGenerator() generator.FamilyGenerator { } func createPodInitContainerInfoFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_pod_init_container_info", "Information about an init container in a pod.", metric.Gauge, + basemetrics.STABLE, "", wrapPodFunc(func(p *v1.Pod) *metric.Family { ms := []*metric.Metric{} @@ -826,10 +838,11 @@ func createPodInitContainerStatusLastTerminatedReasonFamilyGenerator() generator } func createPodInitContainerStatusReadyFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_pod_init_container_status_ready", "Describes whether the init containers readiness check succeeded.", metric.Gauge, + basemetrics.STABLE, "", wrapPodFunc(func(p *v1.Pod) *metric.Family { ms := make([]*metric.Metric, len(p.Status.InitContainerStatuses)) @@ -850,10 +863,10 @@ func createPodInitContainerStatusReadyFamilyGenerator() generator.FamilyGenerato } func createPodInitContainerStatusRestartsTotalFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_pod_init_container_status_restarts_total", "The number of restarts for the init container.", - metric.Counter, + metric.Counter, basemetrics.STABLE, "", wrapPodFunc(func(p *v1.Pod) *metric.Family { ms := make([]*metric.Metric, len(p.Status.InitContainerStatuses)) @@ -874,10 +887,11 @@ func createPodInitContainerStatusRestartsTotalFamilyGenerator() generator.Family } func createPodInitContainerStatusRunningFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_pod_init_container_status_running", "Describes whether the init container is currently in running state.", metric.Gauge, + basemetrics.STABLE, "", wrapPodFunc(func(p *v1.Pod) *metric.Family { ms := make([]*metric.Metric, len(p.Status.InitContainerStatuses)) @@ -898,10 +912,11 @@ func createPodInitContainerStatusRunningFamilyGenerator() generator.FamilyGenera } func createPodInitContainerStatusTerminatedFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_pod_init_container_status_terminated", "Describes whether the init container is currently in terminated state.", metric.Gauge, + basemetrics.STABLE, "", wrapPodFunc(func(p *v1.Pod) *metric.Family { ms := make([]*metric.Metric, len(p.Status.InitContainerStatuses)) @@ -947,10 +962,11 @@ func createPodInitContainerStatusTerminatedReasonFamilyGenerator() generator.Fam } func createPodInitContainerStatusWaitingFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_pod_init_container_status_waiting", "Describes whether the init container is currently in waiting state.", metric.Gauge, + basemetrics.STABLE, "", wrapPodFunc(func(p *v1.Pod) *metric.Family { ms := make([]*metric.Metric, len(p.Status.InitContainerStatuses)) @@ -1017,10 +1033,11 @@ func createPodAnnotationsGenerator(allowAnnotations []string) generator.FamilyGe } func createPodLabelsGenerator(allowLabelsList []string) generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_pod_labels", "Kubernetes labels converted to Prometheus labels.", metric.Gauge, + basemetrics.STABLE, "", wrapPodFunc(func(p *v1.Pod) *metric.Family { labelKeys, labelValues := createPrometheusLabelKeysValues("label", p.Labels, allowLabelsList) @@ -1088,10 +1105,11 @@ func createPodOverheadMemoryBytesFamilyGenerator() generator.FamilyGenerator { } func createPodOwnerFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_pod_owner", "Information about the Pod's owner.", metric.Gauge, + basemetrics.STABLE, "", wrapPodFunc(func(p *v1.Pod) *metric.Family { labelKeys := []string{"owner_kind", "owner_name", "owner_is_controller"} @@ -1135,10 +1153,11 @@ func createPodOwnerFamilyGenerator() generator.FamilyGenerator { } func createPodRestartPolicyFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_pod_restart_policy", "Describes the restart policy in use by this pod.", metric.Gauge, + basemetrics.STABLE, "", wrapPodFunc(func(p *v1.Pod) *metric.Family { return &metric.Family{ @@ -1179,10 +1198,11 @@ func createPodRuntimeClassNameInfoFamilyGenerator() generator.FamilyGenerator { } func createPodSpecVolumesPersistentVolumeClaimsInfoFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_pod_spec_volumes_persistentvolumeclaims_info", "Information about persistentvolumeclaim volumes in a pod.", metric.Gauge, + basemetrics.STABLE, "", wrapPodFunc(func(p *v1.Pod) *metric.Family { ms := []*metric.Metric{} @@ -1205,10 +1225,11 @@ func createPodSpecVolumesPersistentVolumeClaimsInfoFamilyGenerator() generator.F } func createPodSpecVolumesPersistentVolumeClaimsReadonlyFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_pod_spec_volumes_persistentvolumeclaims_readonly", "Describes whether a persistentvolumeclaim is mounted read only.", metric.Gauge, + basemetrics.STABLE, "", wrapPodFunc(func(p *v1.Pod) *metric.Family { ms := []*metric.Metric{} @@ -1231,10 +1252,11 @@ func createPodSpecVolumesPersistentVolumeClaimsReadonlyFamilyGenerator() generat } func createPodStartTimeFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_pod_start_time", "Start time in unix timestamp for a pod.", metric.Gauge, + basemetrics.STABLE, "", wrapPodFunc(func(p *v1.Pod) *metric.Family { ms := []*metric.Metric{} @@ -1280,10 +1302,11 @@ func createPodStatusContainerReadyTimeFamilyGenerator() generator.FamilyGenerato } func createPodStatusPhaseFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_pod_status_phase", "The pods current phase.", metric.Gauge, + basemetrics.STABLE, "", wrapPodFunc(func(p *v1.Pod) *metric.Family { phase := p.Status.Phase @@ -1323,10 +1346,11 @@ func createPodStatusPhaseFamilyGenerator() generator.FamilyGenerator { } func createPodStatusReadyFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_pod_status_ready", "Describes whether the pod is ready to serve requests.", metric.Gauge, + basemetrics.STABLE, "", wrapPodFunc(func(p *v1.Pod) *metric.Family { ms := []*metric.Metric{} @@ -1405,10 +1429,11 @@ func createPodStatusReasonFamilyGenerator() generator.FamilyGenerator { } func createPodStatusScheduledFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_pod_status_scheduled", "Describes the status of the scheduling process for the pod.", metric.Gauge, + basemetrics.STABLE, "", wrapPodFunc(func(p *v1.Pod) *metric.Family { ms := []*metric.Metric{} @@ -1433,10 +1458,11 @@ func createPodStatusScheduledFamilyGenerator() generator.FamilyGenerator { } func createPodStatusScheduledTimeFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_pod_status_scheduled_time", "Unix timestamp when pod moved into scheduled status", metric.Gauge, + basemetrics.STABLE, "", wrapPodFunc(func(p *v1.Pod) *metric.Family { ms := []*metric.Metric{} @@ -1459,10 +1485,11 @@ func createPodStatusScheduledTimeFamilyGenerator() generator.FamilyGenerator { } func createPodStatusUnschedulableFamilyGenerator() generator.FamilyGenerator { - return *generator.NewFamilyGenerator( + return *generator.NewFamilyGeneratorWithStability( "kube_pod_status_unschedulable", "Describes the unschedulable status for the pod.", metric.Gauge, + basemetrics.STABLE, "", wrapPodFunc(func(p *v1.Pod) *metric.Family { ms := []*metric.Metric{} diff --git a/internal/store/pod_test.go b/internal/store/pod_test.go index 5e4ba6ef35..d8f6e9d48d 100644 --- a/internal/store/pod_test.go +++ b/internal/store/pod_test.go @@ -62,7 +62,7 @@ func TestPodStore(t *testing.T) { }, }, Want: ` - # HELP kube_pod_container_info Information about a container in a pod. + # HELP kube_pod_container_info [STABLE] Information about a container in a pod. # TYPE kube_pod_container_info gauge kube_pod_container_info{container="container1",container_id="docker://ab123",image="k8s.gcr.io/hyperkube1",image_spec="k8s.gcr.io/hyperkube1_spec",image_id="docker://sha256:aaa",namespace="ns1",pod="pod1",uid="uid1"} 1`, MetricNames: []string{"kube_pod_container_info"}, @@ -118,8 +118,8 @@ func TestPodStore(t *testing.T) { }, }, Want: ` - # HELP kube_pod_container_info Information about a container in a pod. - # HELP kube_pod_init_container_info Information about an init container in a pod. + # HELP kube_pod_container_info [STABLE] Information about a container in a pod. + # HELP kube_pod_init_container_info [STABLE] Information about an init container in a pod. # TYPE kube_pod_container_info gauge # TYPE kube_pod_init_container_info gauge kube_pod_container_info{container="container2",container_id="docker://cd456",image_spec="k8s.gcr.io/hyperkube2_spec",image="k8s.gcr.io/hyperkube2",image_id="docker://sha256:bbb",namespace="ns2",pod="pod2",uid="uid2"} 1 @@ -152,7 +152,7 @@ func TestPodStore(t *testing.T) { }, }, Want: ` - # HELP kube_pod_container_status_ready Describes whether the containers readiness check succeeded. + # HELP kube_pod_container_status_ready [STABLE] Describes whether the containers readiness check succeeded. # TYPE kube_pod_container_status_ready gauge kube_pod_container_status_ready{container="container1",namespace="ns1",pod="pod1",uid="uid1"} 1`, MetricNames: []string{"kube_pod_container_status_ready"}, @@ -190,7 +190,7 @@ func TestPodStore(t *testing.T) { }, }, Want: ` - # HELP kube_pod_container_status_ready Describes whether the containers readiness check succeeded. + # HELP kube_pod_container_status_ready [STABLE] Describes whether the containers readiness check succeeded. # TYPE kube_pod_container_status_ready gauge kube_pod_container_status_ready{container="container2",namespace="ns2",pod="pod2",uid="uid2"} 1 kube_pod_container_status_ready{container="container3",namespace="ns2",pod="pod2",uid="uid2"} 0 @@ -250,7 +250,7 @@ func TestPodStore(t *testing.T) { }, }, Want: ` - # HELP kube_pod_init_container_status_ready Describes whether the init containers readiness check succeeded. + # HELP kube_pod_init_container_status_ready [STABLE] Describes whether the init containers readiness check succeeded. # TYPE kube_pod_init_container_status_ready gauge kube_pod_init_container_status_ready{container="initcontainer1",namespace="ns3",pod="pod3",uid="uid3"} 1 kube_pod_init_container_status_ready{container="initcontainer2",namespace="ns3",pod="pod3",uid="uid3"} 0 @@ -282,7 +282,7 @@ func TestPodStore(t *testing.T) { }, }, Want: ` - # HELP kube_pod_container_status_restarts_total The number of container restarts per container. + # HELP kube_pod_container_status_restarts_total [STABLE] The number of container restarts per container. # TYPE kube_pod_container_status_restarts_total counter kube_pod_container_status_restarts_total{container="container1",namespace="ns1",pod="pod1",uid="uid1"} 0 `, @@ -313,7 +313,7 @@ func TestPodStore(t *testing.T) { }, }, Want: ` - # HELP kube_pod_init_container_status_restarts_total The number of restarts for the init container. + # HELP kube_pod_init_container_status_restarts_total [STABLE] The number of restarts for the init container. # TYPE kube_pod_init_container_status_restarts_total counter kube_pod_init_container_status_restarts_total{container="initcontainer1",namespace="ns2",pod="pod2",uid="uid2"} 1 `, @@ -352,7 +352,7 @@ func TestPodStore(t *testing.T) { }, }, Want: ` - # HELP kube_pod_container_status_restarts_total The number of container restarts per container. + # HELP kube_pod_container_status_restarts_total [STABLE] The number of container restarts per container. # TYPE kube_pod_container_status_restarts_total counter kube_pod_container_status_restarts_total{container="container2",namespace="ns2",pod="pod2",uid="uid2"} 0 kube_pod_container_status_restarts_total{container="container3",namespace="ns2",pod="pod2",uid="uid2"} 1 @@ -392,7 +392,7 @@ func TestPodStore(t *testing.T) { }, }, Want: ` - # HELP kube_pod_init_container_status_restarts_total The number of restarts for the init container. + # HELP kube_pod_init_container_status_restarts_total [STABLE] The number of restarts for the init container. # TYPE kube_pod_init_container_status_restarts_total counter kube_pod_init_container_status_restarts_total{container="initcontainer2",namespace="ns2",pod="pod2",uid="uid2"} 0 kube_pod_init_container_status_restarts_total{container="initcontainer3",namespace="ns2",pod="pod2",uid="uid2"} 1 @@ -444,16 +444,16 @@ func TestPodStore(t *testing.T) { }, }, Want: ` - # HELP kube_pod_container_status_running Describes whether the container is currently in running state. - # HELP kube_pod_container_state_started Start time in unix timestamp for a pod container. - # HELP kube_pod_container_status_terminated Describes whether the container is currently in terminated state. + # HELP kube_pod_container_status_running [STABLE] Describes whether the container is currently in running state. + # HELP kube_pod_container_state_started [STABLE] Start time in unix timestamp for a pod container. + # HELP kube_pod_container_status_terminated [STABLE] Describes whether the container is currently in terminated state. # HELP kube_pod_container_status_terminated_reason Describes the reason the container is currently in terminated state. - # HELP kube_pod_container_status_waiting Describes whether the container is currently in waiting state. - # HELP kube_pod_container_status_waiting_reason Describes the reason the container is currently in waiting state. - # HELP kube_pod_init_container_status_running Describes whether the init container is currently in running state. - # HELP kube_pod_init_container_status_terminated Describes whether the init container is currently in terminated state. + # HELP kube_pod_container_status_waiting [STABLE] Describes whether the container is currently in waiting state. + # HELP kube_pod_container_status_waiting_reason [STABLE] Describes the reason the container is currently in waiting state. + # HELP kube_pod_init_container_status_running [STABLE] Describes whether the init container is currently in running state. + # HELP kube_pod_init_container_status_terminated [STABLE] Describes whether the init container is currently in terminated state. # HELP kube_pod_init_container_status_terminated_reason Describes the reason the init container is currently in terminated state. - # HELP kube_pod_init_container_status_waiting Describes whether the init container is currently in waiting state. + # HELP kube_pod_init_container_status_waiting [STABLE] Describes whether the init container is currently in waiting state. # HELP kube_pod_init_container_status_waiting_reason Describes the reason the init container is currently in waiting state. # TYPE kube_pod_container_status_running gauge # TYPE kube_pod_container_state_started gauge @@ -519,12 +519,12 @@ func TestPodStore(t *testing.T) { }, }, Want: ` - # HELP kube_pod_container_status_running Describes whether the container is currently in running state. - # HELP kube_pod_container_state_started Start time in unix timestamp for a pod container. - # HELP kube_pod_container_status_terminated Describes whether the container is currently in terminated state. + # HELP kube_pod_container_status_running [STABLE] Describes whether the container is currently in running state. + # HELP kube_pod_container_state_started [STABLE] Start time in unix timestamp for a pod container. + # HELP kube_pod_container_status_terminated [STABLE] Describes whether the container is currently in terminated state. # HELP kube_pod_container_status_terminated_reason Describes the reason the container is currently in terminated state. - # HELP kube_pod_container_status_waiting Describes whether the container is currently in waiting state. - # HELP kube_pod_container_status_waiting_reason Describes the reason the container is currently in waiting state. + # HELP kube_pod_container_status_waiting [STABLE] Describes whether the container is currently in waiting state. + # HELP kube_pod_container_status_waiting_reason [STABLE] Describes the reason the container is currently in waiting state. # TYPE kube_pod_container_status_running gauge # TYPE kube_pod_container_state_started gauge # TYPE kube_pod_container_status_terminated gauge @@ -590,12 +590,12 @@ func TestPodStore(t *testing.T) { }, }, Want: ` - # HELP kube_pod_container_status_running Describes whether the container is currently in running state. - # HELP kube_pod_container_state_started Start time in unix timestamp for a pod container. - # HELP kube_pod_container_status_terminated Describes whether the container is currently in terminated state. + # HELP kube_pod_container_status_running [STABLE] Describes whether the container is currently in running state. + # HELP kube_pod_container_state_started [STABLE] Start time in unix timestamp for a pod container. + # HELP kube_pod_container_status_terminated [STABLE] Describes whether the container is currently in terminated state. # HELP kube_pod_container_status_terminated_reason Describes the reason the container is currently in terminated state. - # HELP kube_pod_container_status_waiting Describes whether the container is currently in waiting state. - # HELP kube_pod_container_status_waiting_reason Describes the reason the container is currently in waiting state. + # HELP kube_pod_container_status_waiting [STABLE] Describes whether the container is currently in waiting state. + # HELP kube_pod_container_status_waiting_reason [STABLE] Describes the reason the container is currently in waiting state. # TYPE kube_pod_container_status_running gauge # TYPE kube_pod_container_state_started gauge # TYPE kube_pod_container_status_terminated gauge @@ -651,11 +651,11 @@ func TestPodStore(t *testing.T) { Want: ` # HELP kube_pod_container_status_last_terminated_exitcode Describes the exit code for the last container in terminated state. # HELP kube_pod_container_status_last_terminated_reason Describes the last reason the container was in terminated state. - # HELP kube_pod_container_status_running Describes whether the container is currently in running state. - # HELP kube_pod_container_status_terminated Describes whether the container is currently in terminated state. + # HELP kube_pod_container_status_running [STABLE] Describes whether the container is currently in running state. + # HELP kube_pod_container_status_terminated [STABLE] Describes whether the container is currently in terminated state. # HELP kube_pod_container_status_terminated_reason Describes the reason the container is currently in terminated state. - # HELP kube_pod_container_status_waiting Describes whether the container is currently in waiting state. - # HELP kube_pod_container_status_waiting_reason Describes the reason the container is currently in waiting state. + # HELP kube_pod_container_status_waiting [STABLE] Describes whether the container is currently in waiting state. + # HELP kube_pod_container_status_waiting_reason [STABLE] Describes the reason the container is currently in waiting state. # TYPE kube_pod_container_status_last_terminated_exitcode gauge # TYPE kube_pod_container_status_last_terminated_reason gauge # TYPE kube_pod_container_status_running gauge @@ -727,12 +727,12 @@ func TestPodStore(t *testing.T) { Want: ` # HELP kube_pod_container_status_last_terminated_reason Describes the last reason the container was in terminated state. # HELP kube_pod_container_status_last_terminated_exitcode Describes the exit code for the last container in terminated state. - # HELP kube_pod_container_status_running Describes whether the container is currently in running state. - # HELP kube_pod_container_status_terminated Describes whether the container is currently in terminated state. + # HELP kube_pod_container_status_running [STABLE] Describes whether the container is currently in running state. + # HELP kube_pod_container_status_terminated [STABLE] Describes whether the container is currently in terminated state. # HELP kube_pod_container_status_terminated_reason Describes the reason the container is currently in terminated state. - # HELP kube_pod_container_status_waiting Describes whether the container is currently in waiting state. - # HELP kube_pod_container_status_waiting_reason Describes the reason the container is currently in waiting state. - # HELP kube_pod_container_state_started Start time in unix timestamp for a pod container. + # HELP kube_pod_container_status_waiting [STABLE] Describes whether the container is currently in waiting state. + # HELP kube_pod_container_status_waiting_reason [STABLE] Describes the reason the container is currently in waiting state. + # HELP kube_pod_container_state_started [STABLE] Start time in unix timestamp for a pod container. # TYPE kube_pod_container_status_last_terminated_reason gauge # TYPE kube_pod_container_status_last_terminated_exitcode gauge # TYPE kube_pod_container_status_running gauge @@ -797,12 +797,12 @@ func TestPodStore(t *testing.T) { Want: ` # HELP kube_pod_container_status_last_terminated_exitcode Describes the exit code for the last container in terminated state. # HELP kube_pod_container_status_last_terminated_reason Describes the last reason the container was in terminated state. - # HELP kube_pod_container_status_running Describes whether the container is currently in running state. - # HELP kube_pod_container_state_started Start time in unix timestamp for a pod container. - # HELP kube_pod_container_status_terminated Describes whether the container is currently in terminated state. + # HELP kube_pod_container_status_running [STABLE] Describes whether the container is currently in running state. + # HELP kube_pod_container_state_started [STABLE] Start time in unix timestamp for a pod container. + # HELP kube_pod_container_status_terminated [STABLE] Describes whether the container is currently in terminated state. # HELP kube_pod_container_status_terminated_reason Describes the reason the container is currently in terminated state. - # HELP kube_pod_container_status_waiting Describes whether the container is currently in waiting state. - # HELP kube_pod_container_status_waiting_reason Describes the reason the container is currently in waiting state. + # HELP kube_pod_container_status_waiting [STABLE] Describes whether the container is currently in waiting state. + # HELP kube_pod_container_status_waiting_reason [STABLE] Describes the reason the container is currently in waiting state. # TYPE kube_pod_container_status_last_terminated_exitcode gauge # TYPE kube_pod_container_status_last_terminated_reason gauge # TYPE kube_pod_container_status_running gauge @@ -857,11 +857,11 @@ func TestPodStore(t *testing.T) { }, }, Want: ` - # HELP kube_pod_container_status_running Describes whether the container is currently in running state. - # HELP kube_pod_container_status_terminated Describes whether the container is currently in terminated state. + # HELP kube_pod_container_status_running [STABLE] Describes whether the container is currently in running state. + # HELP kube_pod_container_status_terminated [STABLE] Describes whether the container is currently in terminated state. # HELP kube_pod_container_status_terminated_reason Describes the reason the container is currently in terminated state. - # HELP kube_pod_container_status_waiting Describes whether the container is currently in waiting state. - # HELP kube_pod_container_status_waiting_reason Describes the reason the container is currently in waiting state. + # HELP kube_pod_container_status_waiting [STABLE] Describes whether the container is currently in waiting state. + # HELP kube_pod_container_status_waiting_reason [STABLE] Describes the reason the container is currently in waiting state. # TYPE kube_pod_container_status_running gauge # TYPE kube_pod_container_status_terminated gauge # TYPE kube_pod_container_status_terminated_reason gauge @@ -909,11 +909,11 @@ func TestPodStore(t *testing.T) { }, }, Want: ` - # HELP kube_pod_container_status_running Describes whether the container is currently in running state. - # HELP kube_pod_container_status_terminated Describes whether the container is currently in terminated state. + # HELP kube_pod_container_status_running [STABLE] Describes whether the container is currently in running state. + # HELP kube_pod_container_status_terminated [STABLE] Describes whether the container is currently in terminated state. # HELP kube_pod_container_status_terminated_reason Describes the reason the container is currently in terminated state. - # HELP kube_pod_container_status_waiting Describes whether the container is currently in waiting state. - # HELP kube_pod_container_status_waiting_reason Describes the reason the container is currently in waiting state. + # HELP kube_pod_container_status_waiting [STABLE] Describes whether the container is currently in waiting state. + # HELP kube_pod_container_status_waiting_reason [STABLE] Describes the reason the container is currently in waiting state. # TYPE kube_pod_container_status_running gauge # TYPE kube_pod_container_status_terminated gauge # TYPE kube_pod_container_status_terminated_reason gauge @@ -961,11 +961,11 @@ func TestPodStore(t *testing.T) { }, }, Want: ` - # HELP kube_pod_container_status_running Describes whether the container is currently in running state. - # HELP kube_pod_container_status_terminated Describes whether the container is currently in terminated state. + # HELP kube_pod_container_status_running [STABLE] Describes whether the container is currently in running state. + # HELP kube_pod_container_status_terminated [STABLE] Describes whether the container is currently in terminated state. # HELP kube_pod_container_status_terminated_reason Describes the reason the container is currently in terminated state. - # HELP kube_pod_container_status_waiting Describes whether the container is currently in waiting state. - # HELP kube_pod_container_status_waiting_reason Describes the reason the container is currently in waiting state. + # HELP kube_pod_container_status_waiting [STABLE] Describes whether the container is currently in waiting state. + # HELP kube_pod_container_status_waiting_reason [STABLE] Describes the reason the container is currently in waiting state. # TYPE kube_pod_container_status_running gauge # TYPE kube_pod_container_status_terminated gauge # TYPE kube_pod_container_status_terminated_reason gauge @@ -1019,12 +1019,12 @@ func TestPodStore(t *testing.T) { }, // TODO: Should it be '1501569018' instead? Want: ` - # HELP kube_pod_completion_time Completion time in unix timestamp for a pod. - # HELP kube_pod_created Unix creation timestamp - # HELP kube_pod_info Information about pod. + # HELP kube_pod_completion_time [STABLE] Completion time in unix timestamp for a pod. + # HELP kube_pod_created [STABLE] Unix creation timestamp + # HELP kube_pod_info [STABLE] Information about pod. # HELP kube_pod_ips Pod IP addresses - # HELP kube_pod_owner Information about the Pod's owner. - # HELP kube_pod_start_time Start time in unix timestamp for a pod. + # HELP kube_pod_owner [STABLE] Information about the Pod's owner. + # HELP kube_pod_start_time [STABLE] Start time in unix timestamp for a pod. # TYPE kube_pod_completion_time gauge # TYPE kube_pod_created gauge # TYPE kube_pod_info gauge @@ -1078,7 +1078,7 @@ func TestPodStore(t *testing.T) { }, }, Want: ` - # HELP kube_pod_restart_policy Describes the restart policy in use by this pod. + # HELP kube_pod_restart_policy [STABLE] Describes the restart policy in use by this pod. # TYPE kube_pod_restart_policy gauge kube_pod_restart_policy{namespace="ns2",pod="pod2",type="Always",uid="uid2"} 1 `, @@ -1096,7 +1096,7 @@ func TestPodStore(t *testing.T) { }, }, Want: ` - # HELP kube_pod_restart_policy Describes the restart policy in use by this pod. + # HELP kube_pod_restart_policy [STABLE] Describes the restart policy in use by this pod. # TYPE kube_pod_restart_policy gauge kube_pod_restart_policy{namespace="ns2",pod="pod2",type="OnFailure",uid="uid2"} 1 `, @@ -1180,11 +1180,11 @@ func TestPodStore(t *testing.T) { }, }, Want: ` - # HELP kube_pod_completion_time Completion time in unix timestamp for a pod. - # HELP kube_pod_created Unix creation timestamp - # HELP kube_pod_info Information about pod. - # HELP kube_pod_owner Information about the Pod's owner. - # HELP kube_pod_start_time Start time in unix timestamp for a pod. + # HELP kube_pod_completion_time [STABLE] Completion time in unix timestamp for a pod. + # HELP kube_pod_created [STABLE] Unix creation timestamp + # HELP kube_pod_info [STABLE] Information about pod. + # HELP kube_pod_owner [STABLE] Information about the Pod's owner. + # HELP kube_pod_start_time [STABLE] Start time in unix timestamp for a pod. # TYPE kube_pod_completion_time gauge # TYPE kube_pod_created gauge # TYPE kube_pod_info gauge @@ -1208,7 +1208,7 @@ func TestPodStore(t *testing.T) { }, }, Want: ` - # HELP kube_pod_status_phase The pods current phase. + # HELP kube_pod_status_phase [STABLE] The pods current phase. # TYPE kube_pod_status_phase gauge kube_pod_status_phase{namespace="ns1",phase="Failed",pod="pod1",uid="uid1"} 0 kube_pod_status_phase{namespace="ns1",phase="Pending",pod="pod1",uid="uid1"} 0 @@ -1230,7 +1230,7 @@ func TestPodStore(t *testing.T) { }, }, Want: ` - # HELP kube_pod_status_phase The pods current phase. + # HELP kube_pod_status_phase [STABLE] The pods current phase. # TYPE kube_pod_status_phase gauge kube_pod_status_phase{namespace="ns2",phase="Failed",pod="pod2",uid="uid2"} 0 kube_pod_status_phase{namespace="ns2",phase="Pending",pod="pod2",uid="uid2"} 1 @@ -1253,7 +1253,7 @@ func TestPodStore(t *testing.T) { }, }, Want: ` - # HELP kube_pod_status_phase The pods current phase. + # HELP kube_pod_status_phase [STABLE] The pods current phase. # TYPE kube_pod_status_phase gauge kube_pod_status_phase{namespace="ns3",phase="Failed",pod="pod3",uid="uid3"} 0 kube_pod_status_phase{namespace="ns3",phase="Pending",pod="pod3",uid="uid3"} 0 @@ -1277,7 +1277,7 @@ func TestPodStore(t *testing.T) { }, }, Want: ` - # HELP kube_pod_status_phase The pods current phase. + # HELP kube_pod_status_phase [STABLE] The pods current phase. # HELP kube_pod_status_reason The pod status reasons # TYPE kube_pod_status_phase gauge # TYPE kube_pod_status_reason gauge @@ -1434,11 +1434,12 @@ func TestPodStore(t *testing.T) { }, }, Want: ` - # HELP kube_pod_status_ready Describes whether the pod is ready to serve requests. + # HELP kube_pod_status_ready [STABLE] Describes whether the pod is ready to serve requests. # HELP kube_pod_status_ready_time Readiness achieved time in unix timestamp for a pod. # TYPE kube_pod_status_ready gauge # TYPE kube_pod_status_ready_time gauge kube_pod_status_ready_time{namespace="ns1",pod="pod1",uid="uid1"} 1.501666018e+09 + kube_pod_status_ready{condition="false",namespace="ns1",pod="pod1",uid="uid1"} 0 kube_pod_status_ready{condition="true",namespace="ns1",pod="pod1",uid="uid1"} 1 kube_pod_status_ready{condition="unknown",namespace="ns1",pod="pod1",uid="uid1"} 0 @@ -1465,7 +1466,7 @@ func TestPodStore(t *testing.T) { }, }, Want: ` - # HELP kube_pod_status_ready Describes whether the pod is ready to serve requests. + # HELP kube_pod_status_ready [STABLE] Describes whether the pod is ready to serve requests. # HELP kube_pod_status_ready_time Readiness achieved time in unix timestamp for a pod. # TYPE kube_pod_status_ready gauge # TYPE kube_pod_status_ready_time gauge @@ -1496,8 +1497,8 @@ func TestPodStore(t *testing.T) { }, }, Want: ` - # HELP kube_pod_status_scheduled Describes the status of the scheduling process for the pod. - # HELP kube_pod_status_scheduled_time Unix timestamp when pod moved into scheduled status + # HELP kube_pod_status_scheduled [STABLE] Describes the status of the scheduling process for the pod. + # HELP kube_pod_status_scheduled_time [STABLE] Unix timestamp when pod moved into scheduled status # TYPE kube_pod_status_scheduled gauge # TYPE kube_pod_status_scheduled_time gauge kube_pod_status_scheduled_time{namespace="ns1",pod="pod1",uid="uid1"} 1.501666018e+09 @@ -1524,8 +1525,8 @@ func TestPodStore(t *testing.T) { }, }, Want: ` - # HELP kube_pod_status_scheduled Describes the status of the scheduling process for the pod. - # HELP kube_pod_status_scheduled_time Unix timestamp when pod moved into scheduled status + # HELP kube_pod_status_scheduled [STABLE] Describes the status of the scheduling process for the pod. + # HELP kube_pod_status_scheduled_time [STABLE] Unix timestamp when pod moved into scheduled status # TYPE kube_pod_status_scheduled gauge # TYPE kube_pod_status_scheduled_time gauge kube_pod_status_scheduled{condition="false",namespace="ns2",pod="pod2",uid="uid2"} 1 @@ -1553,7 +1554,7 @@ func TestPodStore(t *testing.T) { }, }, Want: ` - # HELP kube_pod_status_unschedulable Describes the unschedulable status for the pod. + # HELP kube_pod_status_unschedulable [STABLE] Describes the unschedulable status for the pod. # TYPE kube_pod_status_unschedulable gauge kube_pod_status_unschedulable{namespace="ns2",pod="pod2",uid="uid2"} 1 `, @@ -1754,7 +1755,7 @@ func TestPodStore(t *testing.T) { Spec: v1.PodSpec{}, }, Want: ` - # HELP kube_pod_labels Kubernetes labels converted to Prometheus labels. + # HELP kube_pod_labels [STABLE] Kubernetes labels converted to Prometheus labels. # TYPE kube_pod_labels gauge kube_pod_labels{namespace="ns1",pod="pod1",uid="uid1"} 1 `, @@ -1804,8 +1805,8 @@ func TestPodStore(t *testing.T) { }, }, Want: ` - # HELP kube_pod_spec_volumes_persistentvolumeclaims_info Information about persistentvolumeclaim volumes in a pod. - # HELP kube_pod_spec_volumes_persistentvolumeclaims_readonly Describes whether a persistentvolumeclaim is mounted read only. + # HELP kube_pod_spec_volumes_persistentvolumeclaims_info [STABLE] Information about persistentvolumeclaim volumes in a pod. + # HELP kube_pod_spec_volumes_persistentvolumeclaims_readonly [STABLE] Describes whether a persistentvolumeclaim is mounted read only. # TYPE kube_pod_spec_volumes_persistentvolumeclaims_info gauge # TYPE kube_pod_spec_volumes_persistentvolumeclaims_readonly gauge kube_pod_spec_volumes_persistentvolumeclaims_info{namespace="ns1",persistentvolumeclaim="claim1",pod="pod1",volume="myvol",uid="uid1"} 1 @@ -1856,7 +1857,7 @@ func TestPodStore(t *testing.T) { }, AllowLabelsList: []string{"wildcard-not-first", options.LabelWildcard}, Want: ` - # HELP kube_pod_labels Kubernetes labels converted to Prometheus labels. + # HELP kube_pod_labels [STABLE] Kubernetes labels converted to Prometheus labels. # TYPE kube_pod_labels gauge kube_pod_labels{namespace="ns1",pod="pod1",uid="uid1"} 1 `, @@ -1878,7 +1879,7 @@ func TestPodStore(t *testing.T) { }, AllowLabelsList: []string{options.LabelWildcard}, Want: ` - # HELP kube_pod_labels Kubernetes labels converted to Prometheus labels. + # HELP kube_pod_labels [STABLE] Kubernetes labels converted to Prometheus labels. # TYPE kube_pod_labels gauge kube_pod_labels{label_app="example",namespace="ns1",pod="pod1",uid="uid1"} 1 `, diff --git a/internal/store/poddisruptionbudget.go b/internal/store/poddisruptionbudget.go index 737358c19b..c97055a794 100644 --- a/internal/store/poddisruptionbudget.go +++ b/internal/store/poddisruptionbudget.go @@ -25,6 +25,7 @@ import ( "k8s.io/apimachinery/pkg/watch" clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/cache" + basemetrics "k8s.io/component-base/metrics" "k8s.io/kube-state-metrics/v2/pkg/metric" generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator" @@ -76,10 +77,11 @@ func podDisruptionBudgetMetricFamilies(allowAnnotationsList, allowLabelsList []s } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_poddisruptionbudget_created", "Unix creation timestamp", metric.Gauge, + basemetrics.STABLE, "", wrapPodDisruptionBudgetFunc(func(p *policyv1.PodDisruptionBudget) *metric.Family { ms := []*metric.Metric{} @@ -95,10 +97,11 @@ func podDisruptionBudgetMetricFamilies(allowAnnotationsList, allowLabelsList []s } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_poddisruptionbudget_status_current_healthy", "Current number of healthy pods", metric.Gauge, + basemetrics.STABLE, "", wrapPodDisruptionBudgetFunc(func(p *policyv1.PodDisruptionBudget) *metric.Family { return &metric.Family{ @@ -110,10 +113,11 @@ func podDisruptionBudgetMetricFamilies(allowAnnotationsList, allowLabelsList []s } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_poddisruptionbudget_status_desired_healthy", "Minimum desired number of healthy pods", metric.Gauge, + basemetrics.STABLE, "", wrapPodDisruptionBudgetFunc(func(p *policyv1.PodDisruptionBudget) *metric.Family { return &metric.Family{ @@ -125,10 +129,11 @@ func podDisruptionBudgetMetricFamilies(allowAnnotationsList, allowLabelsList []s } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_poddisruptionbudget_status_pod_disruptions_allowed", "Number of pod disruptions that are currently allowed", metric.Gauge, + basemetrics.STABLE, "", wrapPodDisruptionBudgetFunc(func(p *policyv1.PodDisruptionBudget) *metric.Family { return &metric.Family{ @@ -140,10 +145,11 @@ func podDisruptionBudgetMetricFamilies(allowAnnotationsList, allowLabelsList []s } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_poddisruptionbudget_status_expected_pods", "Total number of pods counted by this disruption budget", metric.Gauge, + basemetrics.STABLE, "", wrapPodDisruptionBudgetFunc(func(p *policyv1.PodDisruptionBudget) *metric.Family { return &metric.Family{ @@ -155,10 +161,11 @@ func podDisruptionBudgetMetricFamilies(allowAnnotationsList, allowLabelsList []s } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_poddisruptionbudget_status_observed_generation", "Most recent generation observed when updating this PDB status", metric.Gauge, + basemetrics.STABLE, "", wrapPodDisruptionBudgetFunc(func(p *policyv1.PodDisruptionBudget) *metric.Family { return &metric.Family{ diff --git a/internal/store/poddisruptionbudget_test.go b/internal/store/poddisruptionbudget_test.go index ba67bb1cf2..33586c1ca4 100644 --- a/internal/store/poddisruptionbudget_test.go +++ b/internal/store/poddisruptionbudget_test.go @@ -36,17 +36,17 @@ func TestPodDisruptionBudgetStore(t *testing.T) { # TYPE kube_poddisruptionbudget_labels gauge ` const metadata = labelsAndAnnotationsMetaData + ` - # HELP kube_poddisruptionbudget_created Unix creation timestamp + # HELP kube_poddisruptionbudget_created [STABLE] Unix creation timestamp # TYPE kube_poddisruptionbudget_created gauge - # HELP kube_poddisruptionbudget_status_current_healthy Current number of healthy pods + # HELP kube_poddisruptionbudget_status_current_healthy [STABLE] Current number of healthy pods # TYPE kube_poddisruptionbudget_status_current_healthy gauge - # HELP kube_poddisruptionbudget_status_desired_healthy Minimum desired number of healthy pods + # HELP kube_poddisruptionbudget_status_desired_healthy [STABLE] Minimum desired number of healthy pods # TYPE kube_poddisruptionbudget_status_desired_healthy gauge - # HELP kube_poddisruptionbudget_status_pod_disruptions_allowed Number of pod disruptions that are currently allowed + # HELP kube_poddisruptionbudget_status_pod_disruptions_allowed [STABLE] Number of pod disruptions that are currently allowed # TYPE kube_poddisruptionbudget_status_pod_disruptions_allowed gauge - # HELP kube_poddisruptionbudget_status_expected_pods Total number of pods counted by this disruption budget + # HELP kube_poddisruptionbudget_status_expected_pods [STABLE] Total number of pods counted by this disruption budget # TYPE kube_poddisruptionbudget_status_expected_pods gauge - # HELP kube_poddisruptionbudget_status_observed_generation Most recent generation observed when updating this PDB status + # HELP kube_poddisruptionbudget_status_observed_generation [STABLE] Most recent generation observed when updating this PDB status # TYPE kube_poddisruptionbudget_status_observed_generation gauge ` cases := []generateMetricsTestCase{ diff --git a/internal/store/replicaset.go b/internal/store/replicaset.go index 75bb1d8ddb..7ea4cff730 100644 --- a/internal/store/replicaset.go +++ b/internal/store/replicaset.go @@ -20,6 +20,8 @@ import ( "context" "strconv" + basemetrics "k8s.io/component-base/metrics" + "k8s.io/kube-state-metrics/v2/pkg/metric" generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator" @@ -41,10 +43,11 @@ var ( func replicaSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generator.FamilyGenerator { return []generator.FamilyGenerator{ - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_replicaset_created", "Unix creation timestamp", metric.Gauge, + basemetrics.STABLE, "", wrapReplicaSetFunc(func(r *v1.ReplicaSet) *metric.Family { ms := []*metric.Metric{} @@ -61,10 +64,11 @@ func replicaSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) [] } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_replicaset_status_replicas", "The number of replicas per ReplicaSet.", metric.Gauge, + basemetrics.STABLE, "", wrapReplicaSetFunc(func(r *v1.ReplicaSet) *metric.Family { return &metric.Family{ @@ -76,10 +80,11 @@ func replicaSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) [] } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_replicaset_status_fully_labeled_replicas", "The number of fully labeled replicas per ReplicaSet.", metric.Gauge, + basemetrics.STABLE, "", wrapReplicaSetFunc(func(r *v1.ReplicaSet) *metric.Family { return &metric.Family{ @@ -91,10 +96,11 @@ func replicaSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) [] } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_replicaset_status_ready_replicas", "The number of ready replicas per ReplicaSet.", metric.Gauge, + basemetrics.STABLE, "", wrapReplicaSetFunc(func(r *v1.ReplicaSet) *metric.Family { return &metric.Family{ @@ -106,10 +112,11 @@ func replicaSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) [] } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_replicaset_status_observed_generation", "The generation observed by the ReplicaSet controller.", metric.Gauge, + basemetrics.STABLE, "", wrapReplicaSetFunc(func(r *v1.ReplicaSet) *metric.Family { return &metric.Family{ @@ -121,10 +128,11 @@ func replicaSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) [] } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_replicaset_spec_replicas", "Number of desired pods for a ReplicaSet.", metric.Gauge, + basemetrics.STABLE, "", wrapReplicaSetFunc(func(r *v1.ReplicaSet) *metric.Family { ms := []*metric.Metric{} @@ -140,10 +148,11 @@ func replicaSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) [] } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_replicaset_metadata_generation", "Sequence number representing a specific generation of the desired state.", metric.Gauge, + basemetrics.STABLE, "", wrapReplicaSetFunc(func(r *v1.ReplicaSet) *metric.Family { return &metric.Family{ @@ -155,10 +164,11 @@ func replicaSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) [] } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_replicaset_owner", "Information about the ReplicaSet's owner.", metric.Gauge, + basemetrics.STABLE, "", wrapReplicaSetFunc(func(r *v1.ReplicaSet) *metric.Family { owners := r.GetOwnerReferences() @@ -217,10 +227,11 @@ func replicaSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) [] } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( descReplicaSetLabelsName, descReplicaSetLabelsHelp, metric.Gauge, + basemetrics.STABLE, "", wrapReplicaSetFunc(func(r *v1.ReplicaSet) *metric.Family { labelKeys, labelValues := createPrometheusLabelKeysValues("label", r.Labels, allowLabelsList) diff --git a/internal/store/replicaset_test.go b/internal/store/replicaset_test.go index 7735c95308..f25d51e275 100644 --- a/internal/store/replicaset_test.go +++ b/internal/store/replicaset_test.go @@ -38,23 +38,23 @@ func TestReplicaSetStore(t *testing.T) { const metadata = ` # HELP kube_replicaset_annotations Kubernetes annotations converted to Prometheus labels. # TYPE kube_replicaset_annotations gauge - # HELP kube_replicaset_created Unix creation timestamp + # HELP kube_replicaset_created [STABLE] Unix creation timestamp # TYPE kube_replicaset_created gauge - # HELP kube_replicaset_metadata_generation Sequence number representing a specific generation of the desired state. + # HELP kube_replicaset_metadata_generation [STABLE] Sequence number representing a specific generation of the desired state. # TYPE kube_replicaset_metadata_generation gauge - # HELP kube_replicaset_status_replicas The number of replicas per ReplicaSet. + # HELP kube_replicaset_status_replicas [STABLE] The number of replicas per ReplicaSet. # TYPE kube_replicaset_status_replicas gauge - # HELP kube_replicaset_status_fully_labeled_replicas The number of fully labeled replicas per ReplicaSet. + # HELP kube_replicaset_status_fully_labeled_replicas [STABLE] The number of fully labeled replicas per ReplicaSet. # TYPE kube_replicaset_status_fully_labeled_replicas gauge - # HELP kube_replicaset_status_ready_replicas The number of ready replicas per ReplicaSet. + # HELP kube_replicaset_status_ready_replicas [STABLE] The number of ready replicas per ReplicaSet. # TYPE kube_replicaset_status_ready_replicas gauge - # HELP kube_replicaset_status_observed_generation The generation observed by the ReplicaSet controller. + # HELP kube_replicaset_status_observed_generation [STABLE] The generation observed by the ReplicaSet controller. # TYPE kube_replicaset_status_observed_generation gauge - # HELP kube_replicaset_spec_replicas Number of desired pods for a ReplicaSet. + # HELP kube_replicaset_spec_replicas [STABLE] Number of desired pods for a ReplicaSet. # TYPE kube_replicaset_spec_replicas gauge - # HELP kube_replicaset_owner Information about the ReplicaSet's owner. + # HELP kube_replicaset_owner [STABLE] Information about the ReplicaSet's owner. # TYPE kube_replicaset_owner gauge - # HELP kube_replicaset_labels Kubernetes labels converted to Prometheus labels. + # HELP kube_replicaset_labels [STABLE] Kubernetes labels converted to Prometheus labels. # TYPE kube_replicaset_labels gauge ` cases := []generateMetricsTestCase{ diff --git a/internal/store/replicationcontroller.go b/internal/store/replicationcontroller.go index 0abcc5b107..f5da7f5bdb 100644 --- a/internal/store/replicationcontroller.go +++ b/internal/store/replicationcontroller.go @@ -26,6 +26,7 @@ import ( "k8s.io/apimachinery/pkg/watch" clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/cache" + basemetrics "k8s.io/component-base/metrics" "k8s.io/kube-state-metrics/v2/pkg/metric" generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator" @@ -35,10 +36,11 @@ var ( descReplicationControllerLabelsDefaultLabels = []string{"namespace", "replicationcontroller"} replicationControllerMetricFamilies = []generator.FamilyGenerator{ - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_replicationcontroller_created", "Unix creation timestamp", metric.Gauge, + basemetrics.STABLE, "", wrapReplicationControllerFunc(func(r *v1.ReplicationController) *metric.Family { ms := []*metric.Metric{} @@ -54,10 +56,11 @@ var ( } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_replicationcontroller_status_replicas", "The number of replicas per ReplicationController.", metric.Gauge, + basemetrics.STABLE, "", wrapReplicationControllerFunc(func(r *v1.ReplicationController) *metric.Family { return &metric.Family{ @@ -69,10 +72,11 @@ var ( } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_replicationcontroller_status_fully_labeled_replicas", "The number of fully labeled replicas per ReplicationController.", metric.Gauge, + basemetrics.STABLE, "", wrapReplicationControllerFunc(func(r *v1.ReplicationController) *metric.Family { return &metric.Family{ @@ -84,10 +88,11 @@ var ( } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_replicationcontroller_status_ready_replicas", "The number of ready replicas per ReplicationController.", metric.Gauge, + basemetrics.STABLE, "", wrapReplicationControllerFunc(func(r *v1.ReplicationController) *metric.Family { return &metric.Family{ @@ -99,10 +104,11 @@ var ( } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_replicationcontroller_status_available_replicas", "The number of available replicas per ReplicationController.", metric.Gauge, + basemetrics.STABLE, "", wrapReplicationControllerFunc(func(r *v1.ReplicationController) *metric.Family { return &metric.Family{ @@ -114,10 +120,11 @@ var ( } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_replicationcontroller_status_observed_generation", "The generation observed by the ReplicationController controller.", metric.Gauge, + basemetrics.STABLE, "", wrapReplicationControllerFunc(func(r *v1.ReplicationController) *metric.Family { return &metric.Family{ @@ -129,10 +136,11 @@ var ( } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_replicationcontroller_spec_replicas", "Number of desired pods for a ReplicationController.", metric.Gauge, + basemetrics.STABLE, "", wrapReplicationControllerFunc(func(r *v1.ReplicationController) *metric.Family { ms := []*metric.Metric{} @@ -148,10 +156,11 @@ var ( } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_replicationcontroller_metadata_generation", "Sequence number representing a specific generation of the desired state.", metric.Gauge, + basemetrics.STABLE, "", wrapReplicationControllerFunc(func(r *v1.ReplicationController) *metric.Family { return &metric.Family{ diff --git a/internal/store/replicationcontroller_test.go b/internal/store/replicationcontroller_test.go index f5111d21a4..f125d294c3 100644 --- a/internal/store/replicationcontroller_test.go +++ b/internal/store/replicationcontroller_test.go @@ -38,23 +38,23 @@ func TestReplicationControllerStore(t *testing.T) { // Fixed metadata on type and help text. We prepend this to every expected // output so we only have to modify a single place when doing adjustments. const metadata = ` - # HELP kube_replicationcontroller_created Unix creation timestamp + # HELP kube_replicationcontroller_created [STABLE] Unix creation timestamp # TYPE kube_replicationcontroller_created gauge - # HELP kube_replicationcontroller_metadata_generation Sequence number representing a specific generation of the desired state. + # HELP kube_replicationcontroller_metadata_generation [STABLE] Sequence number representing a specific generation of the desired state. # TYPE kube_replicationcontroller_metadata_generation gauge # HELP kube_replicationcontroller_owner Information about the ReplicationController's owner. # TYPE kube_replicationcontroller_owner gauge - # HELP kube_replicationcontroller_status_replicas The number of replicas per ReplicationController. + # HELP kube_replicationcontroller_status_replicas [STABLE] The number of replicas per ReplicationController. # TYPE kube_replicationcontroller_status_replicas gauge - # HELP kube_replicationcontroller_status_fully_labeled_replicas The number of fully labeled replicas per ReplicationController. + # HELP kube_replicationcontroller_status_fully_labeled_replicas [STABLE] The number of fully labeled replicas per ReplicationController. # TYPE kube_replicationcontroller_status_fully_labeled_replicas gauge - # HELP kube_replicationcontroller_status_available_replicas The number of available replicas per ReplicationController. + # HELP kube_replicationcontroller_status_available_replicas [STABLE] The number of available replicas per ReplicationController. # TYPE kube_replicationcontroller_status_available_replicas gauge - # HELP kube_replicationcontroller_status_ready_replicas The number of ready replicas per ReplicationController. + # HELP kube_replicationcontroller_status_ready_replicas [STABLE] The number of ready replicas per ReplicationController. # TYPE kube_replicationcontroller_status_ready_replicas gauge - # HELP kube_replicationcontroller_status_observed_generation The generation observed by the ReplicationController controller. + # HELP kube_replicationcontroller_status_observed_generation [STABLE] The generation observed by the ReplicationController controller. # TYPE kube_replicationcontroller_status_observed_generation gauge - # HELP kube_replicationcontroller_spec_replicas Number of desired pods for a ReplicationController. + # HELP kube_replicationcontroller_spec_replicas [STABLE] Number of desired pods for a ReplicationController. # TYPE kube_replicationcontroller_spec_replicas gauge ` cases := []generateMetricsTestCase{ diff --git a/internal/store/resourcequota.go b/internal/store/resourcequota.go index 9cef38ae9b..fe55f98f0b 100644 --- a/internal/store/resourcequota.go +++ b/internal/store/resourcequota.go @@ -25,6 +25,7 @@ import ( "k8s.io/apimachinery/pkg/watch" clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/cache" + basemetrics "k8s.io/component-base/metrics" "k8s.io/kube-state-metrics/v2/pkg/metric" generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator" @@ -34,10 +35,11 @@ var ( descResourceQuotaLabelsDefaultLabels = []string{"namespace", "resourcequota"} resourceQuotaMetricFamilies = []generator.FamilyGenerator{ - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_resourcequota_created", "Unix creation timestamp", metric.Gauge, + basemetrics.STABLE, "", wrapResourceQuotaFunc(func(r *v1.ResourceQuota) *metric.Family { ms := []*metric.Metric{} @@ -54,10 +56,11 @@ var ( } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_resourcequota", "Information about resource quota.", metric.Gauge, + basemetrics.STABLE, "", wrapResourceQuotaFunc(func(r *v1.ResourceQuota) *metric.Family { ms := []*metric.Metric{} diff --git a/internal/store/resourcequota_test.go b/internal/store/resourcequota_test.go index 405f9935ed..f342065cc3 100644 --- a/internal/store/resourcequota_test.go +++ b/internal/store/resourcequota_test.go @@ -31,9 +31,9 @@ func TestResourceQuotaStore(t *testing.T) { // Fixed metadata on type and help text. We prepend this to every expected // output so we only have to modify a single place when doing adjustments. const metadata = ` - # HELP kube_resourcequota Information about resource quota. + # HELP kube_resourcequota [STABLE] Information about resource quota. # TYPE kube_resourcequota gauge - # HELP kube_resourcequota_created Unix creation timestamp + # HELP kube_resourcequota_created [STABLE] Unix creation timestamp # TYPE kube_resourcequota_created gauge ` cases := []generateMetricsTestCase{ diff --git a/internal/store/secret.go b/internal/store/secret.go index c11feb3928..fee2a2c8a3 100644 --- a/internal/store/secret.go +++ b/internal/store/secret.go @@ -25,6 +25,7 @@ import ( "k8s.io/apimachinery/pkg/watch" clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/cache" + basemetrics "k8s.io/component-base/metrics" "k8s.io/kube-state-metrics/v2/pkg/metric" generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator" @@ -40,10 +41,11 @@ var ( func secretMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generator.FamilyGenerator { return []generator.FamilyGenerator{ - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_secret_info", "Information about secret.", metric.Gauge, + basemetrics.STABLE, "", wrapSecretFunc(func(s *v1.Secret) *metric.Family { return &metric.Family{ @@ -55,10 +57,11 @@ func secretMetricFamilies(allowAnnotationsList, allowLabelsList []string) []gene } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_secret_type", "Type about secret.", metric.Gauge, + basemetrics.STABLE, "", wrapSecretFunc(func(s *v1.Secret) *metric.Family { return &metric.Family{ @@ -91,10 +94,11 @@ func secretMetricFamilies(allowAnnotationsList, allowLabelsList []string) []gene }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( descSecretLabelsName, descSecretLabelsHelp, metric.Gauge, + basemetrics.STABLE, "", wrapSecretFunc(func(s *v1.Secret) *metric.Family { labelKeys, labelValues := createPrometheusLabelKeysValues("label", s.Labels, allowLabelsList) @@ -110,10 +114,11 @@ func secretMetricFamilies(allowAnnotationsList, allowLabelsList []string) []gene }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_secret_created", "Unix creation timestamp", metric.Gauge, + basemetrics.STABLE, "", wrapSecretFunc(func(s *v1.Secret) *metric.Family { ms := []*metric.Metric{} diff --git a/internal/store/secret_test.go b/internal/store/secret_test.go index 96f88e1753..bb10cc6107 100644 --- a/internal/store/secret_test.go +++ b/internal/store/secret_test.go @@ -39,11 +39,11 @@ func TestSecretStore(t *testing.T) { Type: v1.SecretTypeOpaque, }, Want: ` - # HELP kube_secret_created Unix creation timestamp - # HELP kube_secret_info Information about secret. - # HELP kube_secret_labels Kubernetes labels converted to Prometheus labels. + # HELP kube_secret_created [STABLE] Unix creation timestamp + # HELP kube_secret_info [STABLE] Information about secret. + # HELP kube_secret_labels [STABLE] Kubernetes labels converted to Prometheus labels. # HELP kube_secret_metadata_resource_version Resource version representing a specific version of secret. - # HELP kube_secret_type Type about secret. + # HELP kube_secret_type [STABLE] Type about secret. # TYPE kube_secret_created gauge # TYPE kube_secret_info gauge # TYPE kube_secret_labels gauge @@ -67,11 +67,11 @@ func TestSecretStore(t *testing.T) { Type: v1.SecretTypeServiceAccountToken, }, Want: ` - # HELP kube_secret_created Unix creation timestamp - # HELP kube_secret_info Information about secret. - # HELP kube_secret_labels Kubernetes labels converted to Prometheus labels. + # HELP kube_secret_created [STABLE] Unix creation timestamp + # HELP kube_secret_info [STABLE] Information about secret. + # HELP kube_secret_labels [STABLE] Kubernetes labels converted to Prometheus labels. # HELP kube_secret_metadata_resource_version Resource version representing a specific version of secret. - # HELP kube_secret_type Type about secret. + # HELP kube_secret_type [STABLE] Type about secret. # TYPE kube_secret_created gauge # TYPE kube_secret_info gauge # TYPE kube_secret_labels gauge @@ -96,11 +96,11 @@ func TestSecretStore(t *testing.T) { Type: v1.SecretTypeDockercfg, }, Want: ` - # HELP kube_secret_created Unix creation timestamp - # HELP kube_secret_info Information about secret. - # HELP kube_secret_labels Kubernetes labels converted to Prometheus labels. + # HELP kube_secret_created [STABLE] Unix creation timestamp + # HELP kube_secret_info [STABLE] Information about secret. + # HELP kube_secret_labels [STABLE] Kubernetes labels converted to Prometheus labels. # HELP kube_secret_metadata_resource_version Resource version representing a specific version of secret. - # HELP kube_secret_type Type about secret. + # HELP kube_secret_type [STABLE] Type about secret. # TYPE kube_secret_created gauge # TYPE kube_secret_info gauge # TYPE kube_secret_labels gauge diff --git a/internal/store/service.go b/internal/store/service.go index 549badeaaf..70bd011929 100644 --- a/internal/store/service.go +++ b/internal/store/service.go @@ -25,6 +25,7 @@ import ( "k8s.io/apimachinery/pkg/watch" clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/cache" + basemetrics "k8s.io/component-base/metrics" "k8s.io/kube-state-metrics/v2/pkg/metric" generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator" @@ -40,10 +41,11 @@ var ( func serviceMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generator.FamilyGenerator { return []generator.FamilyGenerator{ - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_service_info", "Information about service.", metric.Gauge, + basemetrics.STABLE, "", wrapSvcFunc(func(s *v1.Service) *metric.Family { m := metric.Metric{ @@ -54,10 +56,11 @@ func serviceMetricFamilies(allowAnnotationsList, allowLabelsList []string) []gen return &metric.Family{Metrics: []*metric.Metric{&m}} }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_service_created", "Unix creation timestamp", metric.Gauge, + basemetrics.STABLE, "", wrapSvcFunc(func(s *v1.Service) *metric.Family { if !s.CreationTimestamp.IsZero() { @@ -71,10 +74,11 @@ func serviceMetricFamilies(allowAnnotationsList, allowLabelsList []string) []gen return &metric.Family{Metrics: []*metric.Metric{}} }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_service_spec_type", "Type about service.", metric.Gauge, + basemetrics.STABLE, "", wrapSvcFunc(func(s *v1.Service) *metric.Family { m := metric.Metric{ @@ -101,10 +105,11 @@ func serviceMetricFamilies(allowAnnotationsList, allowLabelsList []string) []gen return &metric.Family{Metrics: []*metric.Metric{&m}} }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( descServiceLabelsName, descServiceLabelsHelp, metric.Gauge, + basemetrics.STABLE, "", wrapSvcFunc(func(s *v1.Service) *metric.Family { labelKeys, labelValues := createPrometheusLabelKeysValues("label", s.Labels, allowLabelsList) @@ -116,10 +121,11 @@ func serviceMetricFamilies(allowAnnotationsList, allowLabelsList []string) []gen return &metric.Family{Metrics: []*metric.Metric{&m}} }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_service_spec_external_ip", "Service external ips. One series for each ip", metric.Gauge, + basemetrics.STABLE, "", wrapSvcFunc(func(s *v1.Service) *metric.Family { if len(s.Spec.ExternalIPs) == 0 { @@ -143,10 +149,11 @@ func serviceMetricFamilies(allowAnnotationsList, allowLabelsList []string) []gen } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_service_status_load_balancer_ingress", "Service load balancer ingress status", metric.Gauge, + basemetrics.STABLE, "", wrapSvcFunc(func(s *v1.Service) *metric.Family { if len(s.Status.LoadBalancer.Ingress) == 0 { diff --git a/internal/store/service_test.go b/internal/store/service_test.go index aa3ff17201..c291a48a08 100644 --- a/internal/store/service_test.go +++ b/internal/store/service_test.go @@ -32,17 +32,17 @@ func TestServiceStore(t *testing.T) { const metadata = ` # HELP kube_service_annotations Kubernetes annotations converted to Prometheus labels. # TYPE kube_service_annotations gauge - # HELP kube_service_info Information about service. + # HELP kube_service_info [STABLE] Information about service. # TYPE kube_service_info gauge - # HELP kube_service_created Unix creation timestamp + # HELP kube_service_created [STABLE] Unix creation timestamp # TYPE kube_service_created gauge - # HELP kube_service_labels Kubernetes labels converted to Prometheus labels. + # HELP kube_service_labels [STABLE] Kubernetes labels converted to Prometheus labels. # TYPE kube_service_labels gauge - # HELP kube_service_spec_type Type about service. + # HELP kube_service_spec_type [STABLE] Type about service. # TYPE kube_service_spec_type gauge - # HELP kube_service_spec_external_ip Service external ips. One series for each ip + # HELP kube_service_spec_external_ip [STABLE] Service external ips. One series for each ip # TYPE kube_service_spec_external_ip gauge - # HELP kube_service_status_load_balancer_ingress Service load balancer ingress status + # HELP kube_service_status_load_balancer_ingress [STABLE] Service load balancer ingress status # TYPE kube_service_status_load_balancer_ingress gauge ` cases := []generateMetricsTestCase{ @@ -64,10 +64,10 @@ func TestServiceStore(t *testing.T) { }, Want: ` # HELP kube_service_annotations Kubernetes annotations converted to Prometheus labels. - # HELP kube_service_created Unix creation timestamp - # HELP kube_service_info Information about service. - # HELP kube_service_labels Kubernetes labels converted to Prometheus labels. - # HELP kube_service_spec_type Type about service. + # HELP kube_service_created [STABLE] Unix creation timestamp + # HELP kube_service_info [STABLE] Information about service. + # HELP kube_service_labels [STABLE] Kubernetes labels converted to Prometheus labels. + # HELP kube_service_spec_type [STABLE] Type about service. # TYPE kube_service_annotations gauge # TYPE kube_service_created gauge # TYPE kube_service_info gauge diff --git a/internal/store/statefulset.go b/internal/store/statefulset.go index 8d65aaae0d..af6020772e 100644 --- a/internal/store/statefulset.go +++ b/internal/store/statefulset.go @@ -19,6 +19,8 @@ package store import ( "context" + basemetrics "k8s.io/component-base/metrics" + "k8s.io/kube-state-metrics/v2/pkg/metric" generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator" @@ -40,10 +42,11 @@ var ( func statefulSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generator.FamilyGenerator { return []generator.FamilyGenerator{ - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_statefulset_created", "Unix creation timestamp", metric.Gauge, + basemetrics.STABLE, "", wrapStatefulSetFunc(func(s *v1.StatefulSet) *metric.Family { ms := []*metric.Metric{} @@ -59,10 +62,11 @@ func statefulSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) [ } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_statefulset_status_replicas", "The number of replicas per StatefulSet.", metric.Gauge, + basemetrics.STABLE, "", wrapStatefulSetFunc(func(s *v1.StatefulSet) *metric.Family { return &metric.Family{ @@ -89,10 +93,11 @@ func statefulSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) [ } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_statefulset_status_replicas_current", "The number of current replicas per StatefulSet.", metric.Gauge, + basemetrics.STABLE, "", wrapStatefulSetFunc(func(s *v1.StatefulSet) *metric.Family { return &metric.Family{ @@ -104,10 +109,11 @@ func statefulSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) [ } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_statefulset_status_replicas_ready", "The number of ready replicas per StatefulSet.", metric.Gauge, + basemetrics.STABLE, "", wrapStatefulSetFunc(func(s *v1.StatefulSet) *metric.Family { return &metric.Family{ @@ -119,10 +125,11 @@ func statefulSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) [ } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_statefulset_status_replicas_updated", "The number of updated replicas per StatefulSet.", metric.Gauge, + basemetrics.STABLE, "", wrapStatefulSetFunc(func(s *v1.StatefulSet) *metric.Family { return &metric.Family{ @@ -134,10 +141,11 @@ func statefulSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) [ } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_statefulset_status_observed_generation", "The generation observed by the StatefulSet controller.", metric.Gauge, + basemetrics.STABLE, "", wrapStatefulSetFunc(func(s *v1.StatefulSet) *metric.Family { return &metric.Family{ @@ -149,10 +157,11 @@ func statefulSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) [ } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_statefulset_replicas", "Number of desired pods for a StatefulSet.", metric.Gauge, + basemetrics.STABLE, "", wrapStatefulSetFunc(func(s *v1.StatefulSet) *metric.Family { ms := []*metric.Metric{} @@ -168,10 +177,11 @@ func statefulSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) [ } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_statefulset_metadata_generation", "Sequence number representing a specific generation of the desired state for the StatefulSet.", metric.Gauge, + basemetrics.STABLE, "", wrapStatefulSetFunc(func(s *v1.StatefulSet) *metric.Family { return &metric.Family{ @@ -201,10 +211,11 @@ func statefulSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) [ } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( descStatefulSetLabelsName, descStatefulSetLabelsHelp, metric.Gauge, + basemetrics.STABLE, "", wrapStatefulSetFunc(func(s *v1.StatefulSet) *metric.Family { labelKeys, labelValues := createPrometheusLabelKeysValues("label", s.Labels, allowLabelsList) @@ -219,10 +230,11 @@ func statefulSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) [ } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_statefulset_status_current_revision", "Indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas).", metric.Gauge, + basemetrics.STABLE, "", wrapStatefulSetFunc(func(s *v1.StatefulSet) *metric.Family { return &metric.Family{ @@ -236,10 +248,11 @@ func statefulSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) [ } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_statefulset_status_update_revision", "Indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)", metric.Gauge, + basemetrics.STABLE, "", wrapStatefulSetFunc(func(s *v1.StatefulSet) *metric.Family { return &metric.Family{ diff --git a/internal/store/statefulset_test.go b/internal/store/statefulset_test.go index d5b65488eb..a6c63ee519 100644 --- a/internal/store/statefulset_test.go +++ b/internal/store/statefulset_test.go @@ -60,18 +60,18 @@ func TestStatefulSetStore(t *testing.T) { }, }, Want: ` - # HELP kube_statefulset_created Unix creation timestamp - # HELP kube_statefulset_labels Kubernetes labels converted to Prometheus labels. - # HELP kube_statefulset_metadata_generation Sequence number representing a specific generation of the desired state for the StatefulSet. - # HELP kube_statefulset_replicas Number of desired pods for a StatefulSet. - # HELP kube_statefulset_status_current_revision Indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas). - # HELP kube_statefulset_status_observed_generation The generation observed by the StatefulSet controller. - # HELP kube_statefulset_status_replicas The number of replicas per StatefulSet. + # HELP kube_statefulset_created [STABLE] Unix creation timestamp + # HELP kube_statefulset_labels [STABLE] Kubernetes labels converted to Prometheus labels. + # HELP kube_statefulset_metadata_generation [STABLE] Sequence number representing a specific generation of the desired state for the StatefulSet. + # HELP kube_statefulset_replicas [STABLE] Number of desired pods for a StatefulSet. + # HELP kube_statefulset_status_current_revision [STABLE] Indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas). + # HELP kube_statefulset_status_observed_generation [STABLE] The generation observed by the StatefulSet controller. + # HELP kube_statefulset_status_replicas [STABLE] The number of replicas per StatefulSet. # HELP kube_statefulset_status_replicas_available The number of available replicas per StatefulSet. - # HELP kube_statefulset_status_replicas_current The number of current replicas per StatefulSet. - # HELP kube_statefulset_status_replicas_ready The number of ready replicas per StatefulSet. - # HELP kube_statefulset_status_replicas_updated The number of updated replicas per StatefulSet. - # HELP kube_statefulset_status_update_revision Indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas) + # HELP kube_statefulset_status_replicas_current [STABLE] The number of current replicas per StatefulSet. + # HELP kube_statefulset_status_replicas_ready [STABLE] The number of ready replicas per StatefulSet. + # HELP kube_statefulset_status_replicas_updated [STABLE] The number of updated replicas per StatefulSet. + # HELP kube_statefulset_status_update_revision [STABLE] Indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas) # TYPE kube_statefulset_created gauge # TYPE kube_statefulset_labels gauge # TYPE kube_statefulset_metadata_generation gauge @@ -138,17 +138,17 @@ func TestStatefulSetStore(t *testing.T) { }, }, Want: ` - # HELP kube_statefulset_labels Kubernetes labels converted to Prometheus labels. - # HELP kube_statefulset_metadata_generation Sequence number representing a specific generation of the desired state for the StatefulSet. - # HELP kube_statefulset_replicas Number of desired pods for a StatefulSet. - # HELP kube_statefulset_status_current_revision Indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas). - # HELP kube_statefulset_status_observed_generation The generation observed by the StatefulSet controller. - # HELP kube_statefulset_status_replicas The number of replicas per StatefulSet. + # HELP kube_statefulset_labels [STABLE] Kubernetes labels converted to Prometheus labels. + # HELP kube_statefulset_metadata_generation [STABLE] Sequence number representing a specific generation of the desired state for the StatefulSet. + # HELP kube_statefulset_replicas [STABLE] Number of desired pods for a StatefulSet. + # HELP kube_statefulset_status_current_revision [STABLE] Indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas). + # HELP kube_statefulset_status_observed_generation [STABLE] The generation observed by the StatefulSet controller. + # HELP kube_statefulset_status_replicas [STABLE] The number of replicas per StatefulSet. # HELP kube_statefulset_status_replicas_available The number of available replicas per StatefulSet. - # HELP kube_statefulset_status_replicas_current The number of current replicas per StatefulSet. - # HELP kube_statefulset_status_replicas_ready The number of ready replicas per StatefulSet. - # HELP kube_statefulset_status_replicas_updated The number of updated replicas per StatefulSet. - # HELP kube_statefulset_status_update_revision Indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas) + # HELP kube_statefulset_status_replicas_current [STABLE] The number of current replicas per StatefulSet. + # HELP kube_statefulset_status_replicas_ready [STABLE] The number of ready replicas per StatefulSet. + # HELP kube_statefulset_status_replicas_updated [STABLE] The number of updated replicas per StatefulSet. + # HELP kube_statefulset_status_update_revision [STABLE] Indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas) # TYPE kube_statefulset_labels gauge # TYPE kube_statefulset_metadata_generation gauge # TYPE kube_statefulset_replicas gauge @@ -208,16 +208,16 @@ func TestStatefulSetStore(t *testing.T) { }, }, Want: ` - # HELP kube_statefulset_labels Kubernetes labels converted to Prometheus labels. - # HELP kube_statefulset_metadata_generation Sequence number representing a specific generation of the desired state for the StatefulSet. - # HELP kube_statefulset_replicas Number of desired pods for a StatefulSet. - # HELP kube_statefulset_status_current_revision Indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas). - # HELP kube_statefulset_status_replicas The number of replicas per StatefulSet. + # HELP kube_statefulset_labels [STABLE] Kubernetes labels converted to Prometheus labels. + # HELP kube_statefulset_metadata_generation [STABLE] Sequence number representing a specific generation of the desired state for the StatefulSet. + # HELP kube_statefulset_replicas [STABLE] Number of desired pods for a StatefulSet. + # HELP kube_statefulset_status_current_revision [STABLE] Indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas). + # HELP kube_statefulset_status_replicas [STABLE] The number of replicas per StatefulSet. # HELP kube_statefulset_status_replicas_available The number of available replicas per StatefulSet. - # HELP kube_statefulset_status_replicas_current The number of current replicas per StatefulSet. - # HELP kube_statefulset_status_replicas_ready The number of ready replicas per StatefulSet. - # HELP kube_statefulset_status_replicas_updated The number of updated replicas per StatefulSet. - # HELP kube_statefulset_status_update_revision Indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas) + # HELP kube_statefulset_status_replicas_current [STABLE] The number of current replicas per StatefulSet. + # HELP kube_statefulset_status_replicas_ready [STABLE] The number of ready replicas per StatefulSet. + # HELP kube_statefulset_status_replicas_updated [STABLE] The number of updated replicas per StatefulSet. + # HELP kube_statefulset_status_update_revision [STABLE] Indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas) # TYPE kube_statefulset_labels gauge # TYPE kube_statefulset_metadata_generation gauge # TYPE kube_statefulset_replicas gauge diff --git a/internal/store/storageclass.go b/internal/store/storageclass.go index a6650d8560..f7a4e2e072 100644 --- a/internal/store/storageclass.go +++ b/internal/store/storageclass.go @@ -16,6 +16,8 @@ package store import ( "context" + basemetrics "k8s.io/component-base/metrics" + "k8s.io/kube-state-metrics/v2/pkg/metric" generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator" @@ -40,10 +42,11 @@ var ( func storageClassMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generator.FamilyGenerator { return []generator.FamilyGenerator{ - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_storageclass_info", "Information about storageclass.", metric.Gauge, + basemetrics.STABLE, "", wrapStorageClassFunc(func(s *storagev1.StorageClass) *metric.Family { @@ -64,10 +67,11 @@ func storageClassMetricFamilies(allowAnnotationsList, allowLabelsList []string) return &metric.Family{Metrics: []*metric.Metric{&m}} }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( "kube_storageclass_created", "Unix creation timestamp", metric.Gauge, + basemetrics.STABLE, "", wrapStorageClassFunc(func(s *storagev1.StorageClass) *metric.Family { ms := []*metric.Metric{} @@ -99,10 +103,11 @@ func storageClassMetricFamilies(allowAnnotationsList, allowLabelsList []string) } }), ), - *generator.NewFamilyGenerator( + *generator.NewFamilyGeneratorWithStability( descStorageClassLabelsName, descStorageClassLabelsHelp, metric.Gauge, + basemetrics.STABLE, "", wrapStorageClassFunc(func(s *storagev1.StorageClass) *metric.Family { labelKeys, labelValues := createPrometheusLabelKeysValues("label", s.Labels, allowLabelsList) diff --git a/internal/store/storageclass_test.go b/internal/store/storageclass_test.go index c1f6866241..4f086f4826 100644 --- a/internal/store/storageclass_test.go +++ b/internal/store/storageclass_test.go @@ -40,7 +40,7 @@ func TestStorageClassStore(t *testing.T) { VolumeBindingMode: &volumeBindingMode, }, Want: ` - # HELP kube_storageclass_info Information about storageclass. + # HELP kube_storageclass_info [STABLE] Information about storageclass. # TYPE kube_storageclass_info gauge kube_storageclass_info{storageclass="test_storageclass-info",provisioner="kubernetes.io/rbd",reclaim_policy="Delete",volume_binding_mode="Immediate"} 1 `, @@ -58,7 +58,7 @@ func TestStorageClassStore(t *testing.T) { VolumeBindingMode: nil, }, Want: ` - # HELP kube_storageclass_info Information about storageclass. + # HELP kube_storageclass_info [STABLE] Information about storageclass. # TYPE kube_storageclass_info gauge kube_storageclass_info{storageclass="test_storageclass-default-info",provisioner="kubernetes.io/rbd",reclaim_policy="Delete",volume_binding_mode="Immediate"} 1 `, @@ -77,7 +77,7 @@ func TestStorageClassStore(t *testing.T) { VolumeBindingMode: &volumeBindingMode, }, Want: ` - # HELP kube_storageclass_created Unix creation timestamp + # HELP kube_storageclass_created [STABLE] Unix creation timestamp # TYPE kube_storageclass_created gauge kube_storageclass_created{storageclass="test_kube_storageclass-created"} 1.501569018e+09 `, @@ -98,7 +98,7 @@ func TestStorageClassStore(t *testing.T) { VolumeBindingMode: &volumeBindingMode, }, Want: ` - # HELP kube_storageclass_labels Kubernetes labels converted to Prometheus labels. + # HELP kube_storageclass_labels [STABLE] Kubernetes labels converted to Prometheus labels. # TYPE kube_storageclass_labels gauge kube_storageclass_labels{storageclass="test_storageclass-labels"} 1 `, diff --git a/pkg/app/server_test.go b/pkg/app/server_test.go index 301fe796a9..3d484a3000 100644 --- a/pkg/app/server_test.go +++ b/pkg/app/server_test.go @@ -191,52 +191,53 @@ func TestFullScrapeCycle(t *testing.T) { body, _ := io.ReadAll(resp.Body) expected := `# HELP kube_pod_annotations Kubernetes annotations converted to Prometheus labels. -# HELP kube_pod_completion_time Completion time in unix timestamp for a pod. -# HELP kube_pod_container_info Information about a container in a pod. +# HELP kube_pod_completion_time [STABLE] Completion time in unix timestamp for a pod. +# HELP kube_pod_container_info [STABLE] Information about a container in a pod. # HELP kube_pod_container_resource_limits The number of requested limit resource by a container. # HELP kube_pod_container_resource_requests The number of requested request resource by a container. -# HELP kube_pod_container_state_started Start time in unix timestamp for a pod container. +# HELP kube_pod_container_state_started [STABLE] Start time in unix timestamp for a pod container. # HELP kube_pod_container_status_last_terminated_exitcode Describes the exit code for the last container in terminated state. # HELP kube_pod_container_status_last_terminated_reason Describes the last reason the container was in terminated state. -# HELP kube_pod_container_status_ready Describes whether the containers readiness check succeeded. -# HELP kube_pod_container_status_restarts_total The number of container restarts per container. -# HELP kube_pod_container_status_running Describes whether the container is currently in running state. -# HELP kube_pod_container_status_terminated Describes whether the container is currently in terminated state. +# HELP kube_pod_container_status_ready [STABLE] Describes whether the containers readiness check succeeded. +# HELP kube_pod_container_status_restarts_total [STABLE] The number of container restarts per container. +# HELP kube_pod_container_status_running [STABLE] Describes whether the container is currently in running state. +# HELP kube_pod_container_status_terminated [STABLE] Describes whether the container is currently in terminated state. # HELP kube_pod_container_status_terminated_reason Describes the reason the container is currently in terminated state. -# HELP kube_pod_container_status_waiting Describes whether the container is currently in waiting state. -# HELP kube_pod_container_status_waiting_reason Describes the reason the container is currently in waiting state. -# HELP kube_pod_created Unix creation timestamp +# HELP kube_pod_container_status_waiting [STABLE] Describes whether the container is currently in waiting state. +# HELP kube_pod_container_status_waiting_reason [STABLE] Describes the reason the container is currently in waiting state. +# HELP kube_pod_created [STABLE] Unix creation timestamp # HELP kube_pod_deletion_timestamp Unix deletion timestamp -# HELP kube_pod_info Information about pod. -# HELP kube_pod_init_container_info Information about an init container in a pod. +# HELP kube_pod_info [STABLE] Information about pod. +# HELP kube_pod_init_container_info [STABLE] Information about an init container in a pod. # HELP kube_pod_init_container_resource_limits The number of requested limit resource by an init container. # HELP kube_pod_init_container_resource_requests The number of requested request resource by an init container. # HELP kube_pod_init_container_status_last_terminated_reason Describes the last reason the init container was in terminated state. -# HELP kube_pod_init_container_status_ready Describes whether the init containers readiness check succeeded. -# HELP kube_pod_init_container_status_restarts_total The number of restarts for the init container. -# HELP kube_pod_init_container_status_running Describes whether the init container is currently in running state. -# HELP kube_pod_init_container_status_terminated Describes whether the init container is currently in terminated state. +# HELP kube_pod_init_container_status_ready [STABLE] Describes whether the init containers readiness check succeeded. +# HELP kube_pod_init_container_status_restarts_total [STABLE] The number of restarts for the init container. +# HELP kube_pod_init_container_status_running [STABLE] Describes whether the init container is currently in running state. +# HELP kube_pod_init_container_status_terminated [STABLE] Describes whether the init container is currently in terminated state. # HELP kube_pod_init_container_status_terminated_reason Describes the reason the init container is currently in terminated state. -# HELP kube_pod_init_container_status_waiting Describes whether the init container is currently in waiting state. +# HELP kube_pod_init_container_status_waiting [STABLE] Describes whether the init container is currently in waiting state. # HELP kube_pod_init_container_status_waiting_reason Describes the reason the init container is currently in waiting state. # HELP kube_pod_ips Pod IP addresses -# HELP kube_pod_labels Kubernetes labels converted to Prometheus labels. +# HELP kube_pod_labels [STABLE] Kubernetes labels converted to Prometheus labels. # HELP kube_pod_overhead_cpu_cores The pod overhead in regards to cpu cores associated with running a pod. # HELP kube_pod_overhead_memory_bytes The pod overhead in regards to memory associated with running a pod. -# HELP kube_pod_owner Information about the Pod's owner. -# HELP kube_pod_restart_policy Describes the restart policy in use by this pod. + # HELP kube_pod_runtimeclass_name_info The runtimeclass associated with the pod. -# HELP kube_pod_spec_volumes_persistentvolumeclaims_info Information about persistentvolumeclaim volumes in a pod. -# HELP kube_pod_spec_volumes_persistentvolumeclaims_readonly Describes whether a persistentvolumeclaim is mounted read only. -# HELP kube_pod_start_time Start time in unix timestamp for a pod. -# HELP kube_pod_status_container_ready_time Readiness achieved time in unix timestamp for a pod containers. -# HELP kube_pod_status_phase The pods current phase. -# HELP kube_pod_status_ready Describes whether the pod is ready to serve requests. +# HELP kube_pod_owner [STABLE] Information about the Pod's owner. +# HELP kube_pod_restart_policy [STABLE] Describes the restart policy in use by this pod. +# HELP kube_pod_spec_volumes_persistentvolumeclaims_info [STABLE] Information about persistentvolumeclaim volumes in a pod. +# HELP kube_pod_spec_volumes_persistentvolumeclaims_readonly [STABLE] Describes whether a persistentvolumeclaim is mounted read only. +# HELP kube_pod_start_time [STABLE] Start time in unix timestamp for a pod. +# HELP kube_pod_status_phase [STABLE] The pods current phase. +# HELP kube_pod_status_ready [STABLE] Describes whether the pod is ready to serve requests. # HELP kube_pod_status_ready_time Readiness achieved time in unix timestamp for a pod. + # HELP kube_pod_status_reason The pod status reasons -# HELP kube_pod_status_scheduled Describes the status of the scheduling process for the pod. -# HELP kube_pod_status_scheduled_time Unix timestamp when pod moved into scheduled status -# HELP kube_pod_status_unschedulable Describes the unschedulable status for the pod. +# HELP kube_pod_status_scheduled [STABLE] Describes the status of the scheduling process for the pod. +# HELP kube_pod_status_scheduled_time [STABLE] Unix timestamp when pod moved into scheduled status +# HELP kube_pod_status_unschedulable [STABLE] Describes the unschedulable status for the pod. # HELP kube_pod_tolerations Information about the pod tolerations # TYPE kube_pod_annotations gauge # TYPE kube_pod_completion_time gauge diff --git a/pkg/metric_generator/generator.go b/pkg/metric_generator/generator.go index dfde430d21..9481a26ddd 100644 --- a/pkg/metric_generator/generator.go +++ b/pkg/metric_generator/generator.go @@ -20,6 +20,8 @@ import ( "fmt" "strings" + basemetrics "k8s.io/component-base/metrics" + "k8s.io/kube-state-metrics/v2/pkg/metric" ) @@ -33,16 +35,19 @@ type FamilyGenerator struct { Type metric.Type OptIn bool DeprecatedVersion string + StabilityLevel basemetrics.StabilityLevel GenerateFunc func(obj interface{}) *metric.Family } -// NewFamilyGenerator creates new FamilyGenerator instances. -func NewFamilyGenerator(name string, help string, metricType metric.Type, deprecatedVersion string, generateFunc func(obj interface{}) *metric.Family) *FamilyGenerator { +// NewFamilyGeneratorWithStability creates new FamilyGenerator instances with metric +// stabilityLevel. +func NewFamilyGeneratorWithStability(name string, help string, metricType metric.Type, stabilityLevel basemetrics.StabilityLevel, deprecatedVersion string, generateFunc func(obj interface{}) *metric.Family) *FamilyGenerator { f := &FamilyGenerator{ Name: name, Type: metricType, Help: help, OptIn: false, + StabilityLevel: stabilityLevel, DeprecatedVersion: deprecatedVersion, GenerateFunc: generateFunc, } @@ -52,6 +57,11 @@ func NewFamilyGenerator(name string, help string, metricType metric.Type, deprec return f } +// NewFamilyGenerator creates new FamilyGenerator instances. +func NewFamilyGenerator(name string, help string, metricType metric.Type, deprecatedVersion string, generateFunc func(obj interface{}) *metric.Family) *FamilyGenerator { + return NewFamilyGeneratorWithStability(name, help, metricType, basemetrics.ALPHA, deprecatedVersion, generateFunc) +} + // NewOptInFamilyGenerator creates new FamilyGenerator instances for opt-in metric families. func NewOptInFamilyGenerator(name string, help string, metricType metric.Type, deprecatedVersion string, generateFunc func(obj interface{}) *metric.Family) *FamilyGenerator { f := NewFamilyGenerator(name, help, metricType, deprecatedVersion, generateFunc) @@ -75,7 +85,13 @@ func (g *FamilyGenerator) generateHeader() string { header.WriteString("# HELP ") header.WriteString(g.Name) header.WriteByte(' ') - header.WriteString(g.Help) + // TODO(#1833): remove if-else after all metrics are attached with right + // StabilityLevel. + if g.StabilityLevel == basemetrics.STABLE { + header.WriteString(fmt.Sprintf("[%v] %v", g.StabilityLevel, g.Help)) + } else { + header.WriteString(g.Help) + } header.WriteByte('\n') header.WriteString("# TYPE ") header.WriteString(g.Name) diff --git a/pkg/util/proc/reaper_unsupported.go b/pkg/util/proc/reaper_unsupported.go index e404bb6bdf..8b76c8fa8c 100644 --- a/pkg/util/proc/reaper_unsupported.go +++ b/pkg/util/proc/reaper_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux // +build !linux /* diff --git a/tools/tools.go b/tools/tools.go index 142f2fb65e..36ac07700c 100644 --- a/tools/tools.go +++ b/tools/tools.go @@ -1,3 +1,4 @@ +//go:build tools // +build tools /*