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

Diff for: .github/ISSUE_TEMPLATE/bugs.yaml

+49
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

Diff for: .github/ISSUE_TEMPLATE/enhancements.yaml

+55
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

Diff for: .github/PULL_REQUEST_TEMPLATE/prs.md

+19
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 #

Diff for: .github/dependabot.yaml

+11
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

Diff for: .github/workflows/check-with-upstream.yaml

+1-1
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

Diff for: .github/workflows/ci.yaml

+33-46
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 }}

Diff for: .github/workflows/stale.yml

+38
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

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ dashboards_out
44
vendor
55
jsonnetfile.lock.json
66
tmp
7+
.vale

Diff for: .lint

+7-1
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.

Diff for: .vale.ini

+8
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

Diff for: CODEOWNERS

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# https://help.github.com/articles/about-codeowners/
2+
3+
# These owners will be the default owners for everything in the repo. Unless a
4+
# later match takes precedence, they will be requested for review when someone
5+
# opens a pull request.
6+
* @povilasv

Diff for: CODE_OF_CONDUCT.md

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8+
9+
## Our Standards
10+
11+
Examples of behavior that contributes to a positive environment for our community include:
12+
13+
* Demonstrating empathy and kindness toward other people
14+
* Being respectful of differing opinions, viewpoints, and experiences
15+
* Giving and gracefully accepting constructive feedback
16+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17+
* Focusing on what is best not just for us as individuals, but for the overall community
18+
19+
Examples of unacceptable behavior include:
20+
21+
* The use of sexualized language or imagery, and sexual attention or advances of any kind
22+
* Trolling, insulting or derogatory comments, and personal or political attacks
23+
* Public or private harassment
24+
* Publishing others' private information, such as a physical or email address, without their explicit permission
25+
* Other conduct which could reasonably be considered inappropriate in a professional setting
26+
27+
## Enforcement Responsibilities
28+
29+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
32+
33+
## Scope
34+
35+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
36+
37+
## Enforcement
38+
39+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [email protected]. All complaints will be reviewed and investigated promptly and fairly.
40+
41+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
42+
43+
## Enforcement Guidelines
44+
45+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
46+
47+
### 1. Correction
48+
49+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
50+
51+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
52+
53+
### 2. Warning
54+
55+
**Community Impact**: A violation through a single incident or series of actions.
56+
57+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
58+
59+
### 3. Temporary Ban
60+
61+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
62+
63+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
64+
65+
### 4. Permanent Ban
66+
67+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
68+
69+
**Consequence**: A permanent ban from any sort of public interaction within the community.
70+
71+
## Attribution
72+
73+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.0, available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
74+
75+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
76+
77+
For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.

0 commit comments

Comments
 (0)