Skip to content

Commit 7259e54

Browse files
[ci] fix k8s integration tests flakiness (#8575)
* feat: vendor all necessary test artifacts for kubernetes integration to minimise flakiness due to transient errors * fix: correct decode api key * fix: clear CA_TRUSTED env var for kustomize * fix: bump memory limits for kustomize * fix: fabricate paths leveraging filepath * fix: remove redundant file moving when downloading kube stack helm chart * feat: vendor expanded archives * fix: use filepath.Join * doc: update BuildDependencies godoc
1 parent e0d2d29 commit 7259e54

File tree

241 files changed

+63229
-298
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

241 files changed

+63229
-298
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ check-ci:
4141
@mage -v helm:lint
4242
@mage -v helm:updateAgentVersion
4343
@mage -v helm:renderExamples
44+
@mage -v integration:buildKubernetesTestData
4445
@$(MAKE) check-no-changes
4546

4647
## check: run all the checks including linting using golangci-lint.

NOTICE-fips.txt

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,36 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
109109
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
110110

111111

112+
--------------------------------------------------------------------------------
113+
Dependency : github.com/cenkalti/backoff/v5
114+
Version: v5.0.2
115+
Licence type (autodetected): MIT
116+
--------------------------------------------------------------------------------
117+
118+
Contents of probable licence file $GOMODCACHE/github.com/cenkalti/backoff/[email protected]/LICENSE:
119+
120+
The MIT License (MIT)
121+
122+
Copyright (c) 2014 Cenk Altı
123+
124+
Permission is hereby granted, free of charge, to any person obtaining a copy of
125+
this software and associated documentation files (the "Software"), to deal in
126+
the Software without restriction, including without limitation the rights to
127+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
128+
the Software, and to permit persons to whom the Software is furnished to do so,
129+
subject to the following conditions:
130+
131+
The above copyright notice and this permission notice shall be included in all
132+
copies or substantial portions of the Software.
133+
134+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
135+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
136+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
137+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
138+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
139+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
140+
141+
112142
--------------------------------------------------------------------------------
113143
Dependency : github.com/cespare/xxhash/v2
114144
Version: v2.3.0
@@ -36772,36 +36802,6 @@ SOFTWARE.
3677236802

3677336803

3677436804

36775-
--------------------------------------------------------------------------------
36776-
Dependency : github.com/cenkalti/backoff/v5
36777-
Version: v5.0.2
36778-
Licence type (autodetected): MIT
36779-
--------------------------------------------------------------------------------
36780-
36781-
Contents of probable licence file $GOMODCACHE/github.com/cenkalti/backoff/[email protected]/LICENSE:
36782-
36783-
The MIT License (MIT)
36784-
36785-
Copyright (c) 2014 Cenk Altı
36786-
36787-
Permission is hereby granted, free of charge, to any person obtaining a copy of
36788-
this software and associated documentation files (the "Software"), to deal in
36789-
the Software without restriction, including without limitation the rights to
36790-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
36791-
the Software, and to permit persons to whom the Software is furnished to do so,
36792-
subject to the following conditions:
36793-
36794-
The above copyright notice and this permission notice shall be included in all
36795-
copies or substantial portions of the Software.
36796-
36797-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
36798-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
36799-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
36800-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
36801-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
36802-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
36803-
36804-
3680536805
--------------------------------------------------------------------------------
3680636806
Dependency : github.com/cespare/xxhash
3680736807
Version: v1.1.0

NOTICE.txt

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,36 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
109109
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
110110

111111

112+
--------------------------------------------------------------------------------
113+
Dependency : github.com/cenkalti/backoff/v5
114+
Version: v5.0.2
115+
Licence type (autodetected): MIT
116+
--------------------------------------------------------------------------------
117+
118+
Contents of probable licence file $GOMODCACHE/github.com/cenkalti/backoff/[email protected]/LICENSE:
119+
120+
The MIT License (MIT)
121+
122+
Copyright (c) 2014 Cenk Altı
123+
124+
Permission is hereby granted, free of charge, to any person obtaining a copy of
125+
this software and associated documentation files (the "Software"), to deal in
126+
the Software without restriction, including without limitation the rights to
127+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
128+
the Software, and to permit persons to whom the Software is furnished to do so,
129+
subject to the following conditions:
130+
131+
The above copyright notice and this permission notice shall be included in all
132+
copies or substantial portions of the Software.
133+
134+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
135+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
136+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
137+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
138+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
139+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
140+
141+
112142
--------------------------------------------------------------------------------
113143
Dependency : github.com/cespare/xxhash/v2
114144
Version: v2.3.0
@@ -38589,36 +38619,6 @@ SOFTWARE.
3858938619

3859038620

3859138621

38592-
--------------------------------------------------------------------------------
38593-
Dependency : github.com/cenkalti/backoff/v5
38594-
Version: v5.0.2
38595-
Licence type (autodetected): MIT
38596-
--------------------------------------------------------------------------------
38597-
38598-
Contents of probable licence file $GOMODCACHE/github.com/cenkalti/backoff/[email protected]/LICENSE:
38599-
38600-
The MIT License (MIT)
38601-
38602-
Copyright (c) 2014 Cenk Altı
38603-
38604-
Permission is hereby granted, free of charge, to any person obtaining a copy of
38605-
this software and associated documentation files (the "Software"), to deal in
38606-
the Software without restriction, including without limitation the rights to
38607-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
38608-
the Software, and to permit persons to whom the Software is furnished to do so,
38609-
subject to the following conditions:
38610-
38611-
The above copyright notice and this permission notice shall be included in all
38612-
copies or substantial portions of the Software.
38613-
38614-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
38615-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
38616-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
38617-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
38618-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38619-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
38620-
38621-
3862238622
--------------------------------------------------------------------------------
3862338623
Dependency : github.com/cespare/xxhash
3862438624
Version: v1.1.0
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*~
18+
# Various IDEs
19+
.project
20+
.idea/
21+
*.tmproj
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
annotations:
2+
artifacthub.io/license: Apache-2.0
3+
artifacthub.io/links: |
4+
- name: Chart Source
5+
url: https://github.com/prometheus-community/helm-charts
6+
apiVersion: v2
7+
appVersion: 2.15.0
8+
description: Install kube-state-metrics to generate and expose cluster-level metrics
9+
home: https://github.com/kubernetes/kube-state-metrics/
10+
keywords:
11+
- metric
12+
- monitoring
13+
- prometheus
14+
- kubernetes
15+
maintainers:
16+
17+
name: tariq1890
18+
url: https://github.com/tariq1890
19+
20+
name: mrueg
21+
url: https://github.com/mrueg
22+
23+
name: dotdc
24+
url: https://github.com/dotdc
25+
name: kube-state-metrics
26+
sources:
27+
- https://github.com/kubernetes/kube-state-metrics/
28+
type: application
29+
version: 5.30.1
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# kube-state-metrics Helm Chart
2+
3+
Installs the [kube-state-metrics agent](https://github.com/kubernetes/kube-state-metrics).
4+
5+
## Get Repository Info
6+
<!-- textlint-disable -->
7+
```console
8+
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
9+
helm repo update
10+
```
11+
12+
_See [helm repo](https://helm.sh/docs/helm/helm_repo/) for command documentation._
13+
<!-- textlint-enable -->
14+
15+
## Install Chart
16+
17+
```console
18+
helm install [RELEASE_NAME] prometheus-community/kube-state-metrics [flags]
19+
```
20+
21+
_See [configuration](#configuration) below._
22+
23+
_See [helm install](https://helm.sh/docs/helm/helm_install/) for command documentation._
24+
25+
## Uninstall Chart
26+
27+
```console
28+
helm uninstall [RELEASE_NAME]
29+
```
30+
31+
This removes all the Kubernetes components associated with the chart and deletes the release.
32+
33+
_See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall/) for command documentation._
34+
35+
## Upgrading Chart
36+
37+
```console
38+
helm upgrade [RELEASE_NAME] prometheus-community/kube-state-metrics [flags]
39+
```
40+
41+
_See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command documentation._
42+
43+
### Migrating from stable/kube-state-metrics and kubernetes/kube-state-metrics
44+
45+
You can upgrade in-place:
46+
47+
1. [get repository info](#get-repository-info)
48+
1. [upgrade](#upgrading-chart) your existing release name using the new chart repository
49+
50+
## Upgrading to v3.0.0
51+
52+
v3.0.0 includes kube-state-metrics v2.0, see the [changelog](https://github.com/kubernetes/kube-state-metrics/blob/release-2.0/CHANGELOG.md) for major changes on the application-side.
53+
54+
The upgraded chart now the following changes:
55+
56+
* Dropped support for helm v2 (helm v3 or later is required)
57+
* collectors key was renamed to resources
58+
* namespace key was renamed to namespaces
59+
60+
## Configuration
61+
62+
See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing). To see all configurable options with detailed comments:
63+
64+
```console
65+
helm show values prometheus-community/kube-state-metrics
66+
```
67+
68+
### kube-rbac-proxy
69+
70+
You can enable `kube-state-metrics` endpoint protection using `kube-rbac-proxy`. By setting `kubeRBACProxy.enabled: true`, this chart will deploy one RBAC proxy container per endpoint (metrics & telemetry).
71+
To authorize access, authenticate your requests (via a `ServiceAccount` for example) with a `ClusterRole` attached such as:
72+
73+
```yaml
74+
apiVersion: rbac.authorization.k8s.io/v1
75+
kind: ClusterRole
76+
metadata:
77+
name: kube-state-metrics-read
78+
rules:
79+
- apiGroups: [ "" ]
80+
resources: ["services/kube-state-metrics"]
81+
verbs:
82+
- get
83+
```
84+
85+
See [kube-rbac-proxy examples](https://github.com/brancz/kube-rbac-proxy/tree/master/examples/resource-attributes) for more details.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
kube-state-metrics is a simple service that listens to the Kubernetes API server and generates metrics about the state of the objects.
2+
The exposed metrics can be found here:
3+
https://github.com/kubernetes/kube-state-metrics/blob/master/docs/README.md#exposed-metrics
4+
5+
The metrics are exported on the HTTP endpoint /metrics on the listening port.
6+
In your case, {{ template "kube-state-metrics.fullname" . }}.{{ template "kube-state-metrics.namespace" . }}.svc.cluster.local:{{ .Values.service.port }}/metrics
7+
8+
They are served either as plaintext or protobuf depending on the Accept header.
9+
They are designed to be consumed either by Prometheus itself or by a scraper that is compatible with scraping a Prometheus client endpoint.
10+
11+
{{- if .Values.kubeRBACProxy.enabled}}
12+
13+
kube-rbac-proxy endpoint protections is enabled:
14+
- Metrics endpoints are now HTTPS
15+
- Ensure that the client authenticates the requests (e.g. via service account) with the following role permissions:
16+
```
17+
rules:
18+
- apiGroups: [ "" ]
19+
resources: ["services/{{ template "kube-state-metrics.fullname" . }}"]
20+
verbs:
21+
- get
22+
```
23+
{{- end }}

0 commit comments

Comments
 (0)