Skip to content

Commit 02aa76b

Browse files
pkoutsovasilismergify[bot]
authored andcommitted
[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 (cherry picked from commit 7259e54) # Conflicts: # NOTICE-fips.txt # NOTICE.txt # go.mod # testing/integration/k8s/journald_test.go
1 parent 8f871e0 commit 02aa76b

File tree

241 files changed

+150918
-234
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

+150918
-234
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: 87453 additions & 0 deletions
Large diffs are not rendered by default.

NOTICE.txt

Lines changed: 62 additions & 0 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
@@ -32741,6 +32771,7 @@ SOFTWARE.
3274132771

3274232772

3274332773
--------------------------------------------------------------------------------
32774+
<<<<<<< HEAD
3274432775
Dependency : github.com/cenkalti/backoff/v5
3274532776
Version: v5.0.2
3274632777
Licence type (autodetected): MIT
@@ -32768,6 +32799,37 @@ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
3276832799
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
3276932800
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
3277032801
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32802+
=======
32803+
Dependency : github.com/cespare/xxhash
32804+
Version: v1.1.0
32805+
Licence type (autodetected): MIT
32806+
--------------------------------------------------------------------------------
32807+
32808+
Contents of probable licence file $GOMODCACHE/github.com/cespare/[email protected]/LICENSE.txt:
32809+
32810+
Copyright (c) 2016 Caleb Spare
32811+
32812+
MIT License
32813+
32814+
Permission is hereby granted, free of charge, to any person obtaining
32815+
a copy of this software and associated documentation files (the
32816+
"Software"), to deal in the Software without restriction, including
32817+
without limitation the rights to use, copy, modify, merge, publish,
32818+
distribute, sublicense, and/or sell copies of the Software, and to
32819+
permit persons to whom the Software is furnished to do so, subject to
32820+
the following conditions:
32821+
32822+
The above copyright notice and this permission notice shall be
32823+
included in all copies or substantial portions of the Software.
32824+
32825+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
32826+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
32827+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
32828+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
32829+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
32830+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
32831+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32832+
>>>>>>> 7259e54d9 ([ci] fix k8s integration tests flakiness (#8575))
3277132833

3277232834

3277332835
--------------------------------------------------------------------------------
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)