Skip to content

Commit

Permalink
Merge branch 'master' into KubeClientCertificateExpiration
Browse files Browse the repository at this point in the history
  • Loading branch information
7840vz authored Nov 1, 2024
2 parents e4c9def + 0348e09 commit d456383
Show file tree
Hide file tree
Showing 39 changed files with 1,621 additions and 814 deletions.
49 changes: 49 additions & 0 deletions .github/ISSUE_TEMPLATE/bugs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Bug Report
description: Report a bug in the existing codebase.
title: '[Bug]: '
labels: ['kind/bug', 'pending-triage']
body:
- type: markdown
attributes:
value: |
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).
- type: textarea
id: cause
attributes:
label: What happened?
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.
placeholder: Describe the bug you encountered. Please do not paste any snippets here, use the next field instead.
validations:
required: true
- type: textarea
id: snippet
attributes:
label: Please provide any helpful snippets.
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.
render: jsonnet
- type: dropdown
id: contamination
attributes:
label: What parts of the codebase are affected?
description: Select all that apply.
multiple: true
options:
- Alerts
- Dashboards
- Rules
- Other
validations:
required: true
- type: checkboxes
id: terms
attributes:
label: "I agree to the following terms:"
options:
- label: I agree to follow this project's [Code of Conduct](../../CODE_OF_CONDUCT.md).
required: true
- label: I have filled out all the required information above to the best of my ability.
required: true
- label: I have searched the issues of this repository and believe that this is not a duplicate.
required: true
- label: I have confirmed this bug exists in the default branch of the repository, as of the latest commit at the time of submission.
required: true
55 changes: 55 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancements.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Enhancement Proposal
description: Propose an enhancement for the existing codebase.
title: '[Enhancement]: '
labels: ['kind/enhancement', 'pending-triage']
body:
- type: markdown
attributes:
value: |
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.
- type: textarea
id: idea
attributes:
label: What's the general idea for the enhancement?
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.
placeholder: Describe the need for this enhancement. Please do not paste any snippets here, use the next field instead.
validations:
required: true
- type: textarea
id: snippet
attributes:
label: Please provide any helpful snippets.
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.
render: jsonnet
- type: dropdown
id: contamination
attributes:
label: What parts of the codebase does the enhancement target?
description: Select all that apply.
multiple: true
options:
- Alerts
- Dashboards
- Rules
- Other
validations:
required: true
- type: textarea
id: extra
attributes:
label: Anything else relevant to the enhancement that would help with the triage process?
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.
placeholder: Add any additional information here.
- type: checkboxes
id: terms
attributes:
label: "I agree to the following terms:"
options:
- label: I agree to follow this project's [Code of Conduct](../../CODE_OF_CONDUCT.md).
required: true
- label: I have filled out all the required information above to the best of my ability.
required: true
- label: I have searched the issues of this repository and believe that this is not a duplicate.
required: true
- label: I have confirmed this proposal applies to the default branch of the repository, as of the latest commit at the time of submission.
required: true
19 changes: 19 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/prs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!-- Thank you for sending a pull request! We highly appreciate contributions. Here are some tips for you:
1. If this is your first time, read our contributor guidelines: https://github.com/kubernetes-monitoring/kubernetes-mixin/blob/master/CONTRIBUTING.md
2. If you want *faster* PR reviews, read how: https://git.k8s.io/community/contributors/guide/pull-requests.md#best-practices-for-faster-reviews
3. If the PR is unfinished, please mark it as a draft, to prevent false pings and noisy review cycles.
-->

#### What does this PR fix? Please be as descriptive as possible.**

#### Any helpful code snippets or visual aids (before and after this patch, if applicable)?**
<details>
<summary>Details</summary>

<!-- Please provide code snippets or (dashboard) screenshots to help explain the changes you're making. These are highly helpful and help accelerate reviews. -->

</details>

<!-- Please append the issue(s) this PR targets below this line. -->

Fixes #
20 changes: 13 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,23 @@ jobs:
fail-fast: false
matrix:
include:
- name: Alerts linter
- name: Lint Alerts
run: make --always-make alerts-lint
- name: Generate yaml
- name: Generate YAML
run: make --always-make generate && git diff --exit-code
- name: Grafana dashboard linter
- name: Lint Grafana Dashboards
run: make --always-make dashboards-lint
- name: Jsonnet formatter
run: make --always-make fmt && git diff --exit-code
- name: Jsonnet linter
- name: Format JSONNET
run: make --always-make jsonnet-fmt && git diff --exit-code
- name: Lint JSONNET
run: make --always-make jsonnet-lint
- name: Unit tests
- name: Format MD
run: make --always-make markdownfmt && git diff --exit-code
- name: Lint MD
run: make --always-make vale && git diff --exit-code
- name: Lint YAML
run: make --always-make pint-lint
- name: Run unit tests
run: make --always-make test

steps:
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Check whether issues or PRs need attention
on:
workflow_dispatch: {}
schedule:
- cron: "0 0 * * *"
permissions:
issues: write
pull-requests: write
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
days-before-stale: 30
days-before-close: 7
stale-issue-message: |
This issue has not had any activity in the past 30 days, so the
`stale` label has been added to it.
* The `stale` label will be removed if there is new activity
* The issue will be closed in 7 days if there is no new activity
* Add the `keepalive` label to exempt this issue from the stale check action
Thank you for your contributions!
stale-pr-message: |
This PR has been automatically marked as stale because it has not
had any activity in the past 30 days.
The next time this stale check runs, the stale label will be
removed if there is new activity. The issue will be closed in 7
days if there is no new activity.
Thank you for your contributions!
stale-issue-label: stale
stale-pr-label: stale
exempt-issue-labels: keepalive
exempt-pr-labels: keepalive
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ dashboards_out
vendor
jsonnetfile.lock.json
tmp
.vale
8 changes: 8 additions & 0 deletions .vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
StylesPath = .vale/styles

MinAlertLevel = error

Packages = Readability, write-good, alex

[*]
BasedOnStyles = Readability, write-good, alex
6 changes: 6 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# https://help.github.com/articles/about-codeowners/

# These owners will be the default owners for everything in the repo. Unless a
# later match takes precedence, they will be requested for review when someone
# opens a pull request.
* @povilasv
77 changes: 77 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Contributor Covenant Code of Conduct

## Our Pledge

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.

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Enforcement Responsibilities

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.

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.

## Scope

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.

## Enforcement

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.

All community leaders are obligated to respect the privacy and security of the reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

**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.

### 2. Warning

**Community Impact**: A violation through a single incident or series of actions.

**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.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.

**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.

### 4. Permanent Ban

**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.

**Consequence**: A permanent ban from any sort of public interaction within the community.

## Attribution

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.

Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).

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.
38 changes: 38 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Contributing

Thank you for taking an interest in the project! We welcome all manner of contributions that are within the bounds of the project's [code of conduct](CODE_OF_CONDUCT.md).

#### **Did you find a bug?**

* **Do not open up a GitHub issue if the bug is a security vulnerability**, and instead to refer to our [security policy](SECURITY.md).

* **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/kubernetes-monitoring/kubernetes-mixin/issues).

* If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/kubernetes-monitoring/kubernetes-mixin/issues/new). Be sure to include a **title and clear description**, as much relevant information as possible, and a **`jsonnet` snippet**, if applicable, as well as an optional **visual sample** demonstrating the expected behavior that is not occurring.

* Whenever possible, use the relevant bug report templates to create the issue.

#### **Did you write a patch that fixes a bug?**

* Open a new GitHub pull request with the patch.

* Ensure the PR description describes the problem **and** solution. Include the relevant issue number if applicable.

* Before submitting, please make sure the pull request template is filled out correctly.

#### **Do you intend to add a new feature or change an existing one?**

* Suggest your change in [#monitoring-mixins](https://kubernetes.slack.com/archives/CAX9GU941) and start writing code. While doing so, please reflect on:
* Is your feature request related to a problem? Please describe the necessity for the change.
* Describe the solution you're proposing. Please provide any relevant context.
* Add any other context (for example, any workarounds, code snippets, visual aids, etc.), if applicable.

* Do not open an issue on GitHub until you have collected positive feedback about the change. GitHub issues are primarily intended for bug reports and fixes.

#### **Do you have questions about the source code?**

* Ask any question about how to use the `kubernetes-mixin` project in the [#monitoring-mixins](https://kubernetes.slack.com/archives/CAX9GU941).

---

`kubernetes-mixin` is a volunteer effort. We encourage you to pitch in and join [the team](https://github.com/kubernetes-monitoring/kubernetes-mixin/graphs/contributors)!
Loading

0 comments on commit d456383

Please sign in to comment.