Skip to content

Commit d4c778d

Browse files
authored
Merge branch 'master' into fix/scalar-quotas
2 parents 04702d8 + 50150c5 commit d4c778d

Some content is hidden

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

58 files changed

+10575
-8267
lines changed

.github/ISSUE_TEMPLATE/bugs.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Bug Report
2+
description: Report a bug in the existing codebase.
3+
title: '[Bug]: '
4+
labels: ['kind/bug', 'pending-triage']
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Please use this template while reporting a bug and provide as much information as possible. If the matter is security related, please disclose it privately, see the project [security policy](https://github.com/kubernetes-monitoring/kubernetes-mixin/blob/main/SECURITY.md).
10+
- type: textarea
11+
id: cause
12+
attributes:
13+
label: What happened?
14+
description: A clear and concise description of what the bug is. Screenshots and screencasts are highly encouraged and helpful during triage, so please provide them if you can.
15+
placeholder: Describe the bug you encountered. Please do not paste any snippets here, use the next field instead.
16+
validations:
17+
required: true
18+
- type: textarea
19+
id: snippet
20+
attributes:
21+
label: Please provide any helpful snippets.
22+
description: If applicable, add code snippet(s) to help explain or reproduce the problem. This will be automatically formatted into code, so no need for backticks. Separate snippets using comments.
23+
render: jsonnet
24+
- type: dropdown
25+
id: contamination
26+
attributes:
27+
label: What parts of the codebase are affected?
28+
description: Select all that apply.
29+
multiple: true
30+
options:
31+
- Alerts
32+
- Dashboards
33+
- Rules
34+
- Other
35+
validations:
36+
required: true
37+
- type: checkboxes
38+
id: terms
39+
attributes:
40+
label: "I agree to the following terms:"
41+
options:
42+
- label: I agree to follow this project's [Code of Conduct](../../CODE_OF_CONDUCT.md).
43+
required: true
44+
- label: I have filled out all the required information above to the best of my ability.
45+
required: true
46+
- label: I have searched the issues of this repository and believe that this is not a duplicate.
47+
required: true
48+
- label: I have confirmed this bug exists in the default branch of the repository, as of the latest commit at the time of submission.
49+
required: true
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Enhancement Proposal
2+
description: Propose an enhancement for the existing codebase.
3+
title: '[Enhancement]: '
4+
labels: ['kind/enhancement', 'pending-triage']
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Please use this template while proposing an enhancement and provide as much information as possible. If this is a feature request, please ensure that [a consensus has been reached](https://github.com/kubernetes-monitoring/kubernetes-mixin/blob/master/CONTRIBUTING.md?plain=1#L24) before submitting.
10+
- type: textarea
11+
id: idea
12+
attributes:
13+
label: What's the general idea for the enhancement?
14+
description: A clear and concise description of the enhancement's targeted problem and its proposed solution. Screenshots and screencasts are highly encouraged and helpful during triage, so please provide them if you can.
15+
placeholder: Describe the need for this enhancement. Please do not paste any snippets here, use the next field instead.
16+
validations:
17+
required: true
18+
- type: textarea
19+
id: snippet
20+
attributes:
21+
label: Please provide any helpful snippets.
22+
description: If applicable, add code snippet(s) to help explain or reproduce the problem. This will be automatically formatted into code, so no need for backticks. Separate snippets using comments.
23+
render: jsonnet
24+
- type: dropdown
25+
id: contamination
26+
attributes:
27+
label: What parts of the codebase does the enhancement target?
28+
description: Select all that apply.
29+
multiple: true
30+
options:
31+
- Alerts
32+
- Dashboards
33+
- Rules
34+
- Other
35+
validations:
36+
required: true
37+
- type: textarea
38+
id: extra
39+
attributes:
40+
label: Anything else relevant to the enhancement that would help with the triage process?
41+
description: Any additional context or information that would be helpful to the maintainers. For example, if you have considered any alternatives or workarounds, please share them here.
42+
placeholder: Add any additional information here.
43+
- type: checkboxes
44+
id: terms
45+
attributes:
46+
label: "I agree to the following terms:"
47+
options:
48+
- label: I agree to follow this project's [Code of Conduct](../../CODE_OF_CONDUCT.md).
49+
required: true
50+
- label: I have filled out all the required information above to the best of my ability.
51+
required: true
52+
- label: I have searched the issues of this repository and believe that this is not a duplicate.
53+
required: true
54+
- label: I have confirmed this proposal applies to the default branch of the repository, as of the latest commit at the time of submission.
55+
required: true

.github/PULL_REQUEST_TEMPLATE/prs.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!-- Thank you for sending a pull request! We highly appreciate contributions. Here are some tips for you:
2+
1. If this is your first time, read our contributor guidelines: https://github.com/kubernetes-monitoring/kubernetes-mixin/blob/master/CONTRIBUTING.md
3+
2. If you want *faster* PR reviews, read how: https://git.k8s.io/community/contributors/guide/pull-requests.md#best-practices-for-faster-reviews
4+
3. If the PR is unfinished, please mark it as a draft, to prevent false pings and noisy review cycles.
5+
-->
6+
7+
#### What does this PR fix? Please be as descriptive as possible.**
8+
9+
#### Any helpful code snippets or visual aids (before and after this patch, if applicable)?**
10+
<details>
11+
<summary>Details</summary>
12+
13+
<!-- Please provide code snippets or (dashboard) screenshots to help explain the changes you're making. These are highly helpful and help accelerate reviews. -->
14+
15+
</details>
16+
17+
<!-- Please append the issue(s) this PR targets below this line. -->
18+
19+
Fixes #

.github/dependabot.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: github-actions
9+
directory: /
10+
schedule:
11+
interval: monthly

.github/workflows/check-with-upstream.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
name: Check if KSM selectors are present on applicable metrics.
1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v4
1212
with:
1313
persist-credentials: false
1414
- run: make --always-make check-selectors-ksm

.github/workflows/ci.yaml

Lines changed: 33 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -3,51 +3,38 @@ on:
33
- push
44
- pull_request
55
jobs:
6-
generate:
6+
matrix:
77
runs-on: ubuntu-latest
8-
name: Generate yaml
8+
name: ${{ matrix.name }}
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
include:
13+
- name: Lint Alerts
14+
run: make --always-make alerts-lint
15+
- name: Generate YAML
16+
run: make --always-make generate && git diff --exit-code
17+
- name: Lint Grafana Dashboards
18+
run: make --always-make dashboards-lint
19+
- name: Format JSONNET
20+
run: make --always-make jsonnet-fmt && git diff --exit-code
21+
- name: Lint JSONNET
22+
run: make --always-make jsonnet-lint
23+
- name: Format MD
24+
run: make --always-make markdownfmt && git diff --exit-code
25+
- name: Lint MD
26+
run: make --always-make vale && git diff --exit-code
27+
- name: Lint YAML
28+
run: make --always-make pint-lint
29+
- name: Run unit tests
30+
run: make --always-make test
31+
932
steps:
10-
- uses: actions/checkout@v2
11-
with:
12-
persist-credentials: false
13-
- run: make --always-make generate && git diff --exit-code
14-
jsonnet-lint:
15-
runs-on: ubuntu-latest
16-
name: Jsonnet linter
17-
steps:
18-
- uses: actions/checkout@v2
19-
with:
20-
persist-credentials: false
21-
- run: make --always-make jsonnet-lint
22-
dashboards-lint:
23-
runs-on: ubuntu-latest
24-
name: Grafana dashboard linter
25-
steps:
26-
- uses: actions/checkout@v2
27-
with:
28-
persist-credentials: false
29-
- run: make --always-make dashboards-lint
30-
alerts-lint:
31-
runs-on: ubuntu-latest
32-
name: Alerts linter
33-
steps:
34-
- uses: actions/checkout@v2
35-
with:
36-
persist-credentials: false
37-
- run: make --always-make alerts-lint
38-
fmt:
39-
runs-on: ubuntu-latest
40-
name: Jsonnet formatter
41-
steps:
42-
- uses: actions/checkout@v2
43-
with:
44-
persist-credentials: false
45-
- run: make --always-make fmt && git diff --exit-code
46-
unit-tests:
47-
runs-on: ubuntu-latest
48-
name: Unit tests
49-
steps:
50-
- uses: actions/checkout@v2
51-
with:
52-
persist-credentials: false
53-
- run: make --always-make test
33+
- uses: actions/checkout@v4
34+
with:
35+
persist-credentials: false
36+
- uses: actions/setup-go@v5
37+
with:
38+
go-version-file: scripts/go.mod
39+
cache-dependency-path: scripts/go.sum
40+
- run: ${{ matrix.run }}

.github/workflows/stale.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Check whether issues or PRs need attention
2+
on:
3+
workflow_dispatch: {}
4+
schedule:
5+
- cron: "0 0 * * *"
6+
permissions:
7+
issues: write
8+
pull-requests: write
9+
jobs:
10+
stale:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/stale@v9
14+
with:
15+
days-before-stale: 30
16+
days-before-close: 7
17+
stale-issue-message: |
18+
This issue has not had any activity in the past 30 days, so the
19+
`stale` label has been added to it.
20+
21+
* The `stale` label will be removed if there is new activity
22+
* The issue will be closed in 7 days if there is no new activity
23+
* Add the `keepalive` label to exempt this issue from the stale check action
24+
25+
Thank you for your contributions!
26+
stale-pr-message: |
27+
This PR has been automatically marked as stale because it has not
28+
had any activity in the past 30 days.
29+
30+
The next time this stale check runs, the stale label will be
31+
removed if there is new activity. The issue will be closed in 7
32+
days if there is no new activity.
33+
34+
Thank you for your contributions!
35+
stale-issue-label: stale
36+
stale-pr-label: stale
37+
exempt-issue-labels: keepalive
38+
exempt-pr-labels: keepalive

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ dashboards_out
44
vendor
55
jsonnetfile.lock.json
66
tmp
7+
.vale

.lint

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
exclusions:
22
template-job-rule:
3-
panel-job-instance-rule:
3+
template-instance-rule:
4+
target-job-rule:
5+
target-instance-rule:
6+
panel-title-description-rule:
7+
panel-units-rule:
8+
panel-datasource-rule:
9+
reason: The new Grafonnet promotes the use of datasources at the query level. This should probably end up in the linter as a valid option.

.vale.ini

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
StylesPath = .vale/styles
2+
3+
MinAlertLevel = error
4+
5+
Packages = Readability, write-good, alex
6+
7+
[*]
8+
BasedOnStyles = Readability, write-good, alex

0 commit comments

Comments
 (0)