mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
ci: Introduce yamllint for actions workflow files
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
This commit is contained in:
parent
bf903e5007
commit
b0b922cd71
1
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
1
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
name: Bug Report
|
name: Bug Report
|
||||||
description: Report a bug encountered while operating Etcd
|
description: Report a bug encountered while operating Etcd
|
||||||
labels:
|
labels:
|
||||||
|
1
.github/ISSUE_TEMPLATE/config.yml
vendored
1
.github/ISSUE_TEMPLATE/config.yml
vendored
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
blank_issues_enabled: false
|
blank_issues_enabled: false
|
||||||
contact_links:
|
contact_links:
|
||||||
- name: Question
|
- name: Question
|
||||||
|
1
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
1
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
name: Feature request
|
name: Feature request
|
||||||
description: Provide idea for a new feature
|
description: Provide idea for a new feature
|
||||||
labels:
|
labels:
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
name: Membership nomination
|
name: Membership nomination
|
||||||
description: Nominate new etcd members
|
description: Nominate new etcd members
|
||||||
labels:
|
labels:
|
||||||
|
1
.github/ISSUE_TEMPLATE/test-flake.yml
vendored
1
.github/ISSUE_TEMPLATE/test-flake.yml
vendored
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
name: Flaking Test
|
name: Flaking Test
|
||||||
description: Report flaky tests
|
description: Report flaky tests
|
||||||
labels:
|
labels:
|
||||||
|
1
.github/dependabot.yml
vendored
1
.github/dependabot.yml
vendored
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
version: 2
|
version: 2
|
||||||
updates:
|
updates:
|
||||||
- package-ecosystem: github-actions
|
- package-ecosystem: github-actions
|
||||||
|
1
.github/stale.yml
vendored
1
.github/stale.yml
vendored
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
# Configuration for probot-stale - https://github.com/probot/stale
|
# Configuration for probot-stale - https://github.com/probot/stale
|
||||||
|
|
||||||
# Number of days of inactivity before an Issue or Pull Request becomes stale
|
# Number of days of inactivity before an Issue or Pull Request becomes stale
|
||||||
|
1
.github/workflows/build.yaml
vendored
1
.github/workflows/build.yaml
vendored
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
name: Build
|
name: Build
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
permissions: read-all
|
permissions: read-all
|
||||||
|
1
.github/workflows/codeql-analysis.yml
vendored
1
.github/workflows/codeql-analysis.yml
vendored
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
# For most projects, this workflow file will not need changing; you simply need
|
# For most projects, this workflow file will not need changing; you simply need
|
||||||
# to commit it to your repository.
|
# to commit it to your repository.
|
||||||
#
|
#
|
||||||
|
1
.github/workflows/contrib.yaml
vendored
1
.github/workflows/contrib.yaml
vendored
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
name: Test contrib/mixin
|
name: Test contrib/mixin
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
permissions: read-all
|
permissions: read-all
|
||||||
|
1
.github/workflows/coverage.yaml
vendored
1
.github/workflows/coverage.yaml
vendored
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
name: Coverage
|
name: Coverage
|
||||||
on: [push]
|
on: [push]
|
||||||
permissions: read-all
|
permissions: read-all
|
||||||
|
1
.github/workflows/e2e-arm64.yaml
vendored
1
.github/workflows/e2e-arm64.yaml
vendored
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
name: E2E-arm64
|
name: E2E-arm64
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
|
1
.github/workflows/e2e.yaml
vendored
1
.github/workflows/e2e.yaml
vendored
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
name: E2E
|
name: E2E
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
permissions: read-all
|
permissions: read-all
|
||||||
|
1
.github/workflows/fuzzing.yaml
vendored
1
.github/workflows/fuzzing.yaml
vendored
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
name: Fuzzing v3rpc
|
name: Fuzzing v3rpc
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
permissions: read-all
|
permissions: read-all
|
||||||
|
1
.github/workflows/go-version.yaml
vendored
1
.github/workflows/go-version.yaml
vendored
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
name: Go version setup
|
name: Go version setup
|
||||||
permissions: read-all
|
permissions: read-all
|
||||||
|
|
||||||
|
1
.github/workflows/govuln.yaml
vendored
1
.github/workflows/govuln.yaml
vendored
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
name: Go Vulnerability Checker
|
name: Go Vulnerability Checker
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
permissions: read-all
|
permissions: read-all
|
||||||
|
1
.github/workflows/grpcproxy.yaml
vendored
1
.github/workflows/grpcproxy.yaml
vendored
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
name: grpcProxy-tests
|
name: grpcProxy-tests
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
permissions: read-all
|
permissions: read-all
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
name: Measure Test Flakiness
|
name: Measure Test Flakiness
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
1
.github/workflows/release.yaml
vendored
1
.github/workflows/release.yaml
vendored
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
name: Release
|
name: Release
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
permissions: read-all
|
permissions: read-all
|
||||||
|
1
.github/workflows/robustness-nightly.yaml
vendored
1
.github/workflows/robustness-nightly.yaml
vendored
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
name: Robustness Nightly
|
name: Robustness Nightly
|
||||||
permissions: read-all
|
permissions: read-all
|
||||||
on:
|
on:
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
name: Reusable Robustness Workflow
|
name: Reusable Robustness Workflow
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
@ -69,4 +70,3 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: ${{ inputs.artifactName }}
|
name: ${{ inputs.artifactName }}
|
||||||
path: /tmp/results/*
|
path: /tmp/results/*
|
||||||
|
|
||||||
|
1
.github/workflows/robustness-template.yaml
vendored
1
.github/workflows/robustness-template.yaml
vendored
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
name: Reusable Robustness Workflow
|
name: Reusable Robustness Workflow
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
1
.github/workflows/robustness.yaml
vendored
1
.github/workflows/robustness.yaml
vendored
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
name: Robustness
|
name: Robustness
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
permissions: read-all
|
permissions: read-all
|
||||||
|
1
.github/workflows/scorecards.yml
vendored
1
.github/workflows/scorecards.yml
vendored
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
name: Scorecards supply-chain security
|
name: Scorecards supply-chain security
|
||||||
on:
|
on:
|
||||||
# Only the default branch is supported.
|
# Only the default branch is supported.
|
||||||
|
1
.github/workflows/static-analysis.yaml
vendored
1
.github/workflows/static-analysis.yaml
vendored
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
name: Static Analysis
|
name: Static Analysis
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
permissions: read-all
|
permissions: read-all
|
||||||
|
1
.github/workflows/tests-arm64.yaml
vendored
1
.github/workflows/tests-arm64.yaml
vendored
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
name: Tests-arm64
|
name: Tests-arm64
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
|
1
.github/workflows/tests.yaml
vendored
1
.github/workflows/tests.yaml
vendored
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
name: Tests
|
name: Tests
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
permissions: read-all
|
permissions: read-all
|
||||||
|
@ -1,17 +1,14 @@
|
|||||||
|
---
|
||||||
run:
|
run:
|
||||||
timeout: 30m
|
timeout: 30m
|
||||||
skip-files:
|
skip-files: [^zz_generated.*]
|
||||||
- "^zz_generated.*"
|
|
||||||
|
|
||||||
issues:
|
issues:
|
||||||
max-same-issues: 0
|
max-same-issues: 0
|
||||||
# Excluding configuration per-path, per-linter, per-text and per-source
|
# Excluding configuration per-path, per-linter, per-text and per-source
|
||||||
exclude-rules:
|
exclude-rules:
|
||||||
# exclude ineffassing linter for generated files for conversion
|
# exclude ineffassing linter for generated files for conversion
|
||||||
- path: conversion\.go
|
- path: conversion\.go
|
||||||
linters:
|
linters: [ineffassign]
|
||||||
- ineffassign
|
|
||||||
|
|
||||||
linters:
|
linters:
|
||||||
disable-all: true
|
disable-all: true
|
||||||
enable: # please keep this alphabetized
|
enable: # please keep this alphabetized
|
||||||
@ -27,15 +24,14 @@ linters:
|
|||||||
- stylecheck
|
- stylecheck
|
||||||
- unused
|
- unused
|
||||||
- unconvert # Remove unnecessary type conversions
|
- unconvert # Remove unnecessary type conversions
|
||||||
|
|
||||||
linters-settings: # please keep this alphabetized
|
linters-settings: # please keep this alphabetized
|
||||||
goimports:
|
goimports:
|
||||||
local-prefixes: go.etcd.io # Put imports beginning with prefix after 3rd-party packages.
|
local-prefixes: go.etcd.io # Put imports beginning with prefix after 3rd-party packages.
|
||||||
staticcheck:
|
staticcheck:
|
||||||
checks:
|
checks:
|
||||||
- "all"
|
- all
|
||||||
- "-SA1019" # TODO(fix) Using a deprecated function, variable, constant or field
|
- -SA1019 # TODO(fix) Using a deprecated function, variable, constant or field
|
||||||
- "-SA2002" # TODO(fix) Called testing.T.FailNow or SkipNow in a goroutine, which isn’t allowed
|
- -SA2002 # TODO(fix) Called testing.T.FailNow or SkipNow in a goroutine, which isn’t allowed
|
||||||
stylecheck:
|
stylecheck:
|
||||||
checks:
|
checks:
|
||||||
- "ST1019" # Importing the same package multiple times.
|
- ST1019 # Importing the same package multiple times.
|
||||||
|
7
.yamllint
Normal file
7
.yamllint
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
extends: default
|
||||||
|
rules:
|
||||||
|
line-length: disable
|
||||||
|
truthy: disable
|
||||||
|
comments: disable
|
6
Makefile
6
Makefile
@ -64,7 +64,7 @@ fuzz:
|
|||||||
|
|
||||||
verify: verify-gofmt verify-bom verify-lint verify-dep verify-shellcheck verify-goword \
|
verify: verify-gofmt verify-bom verify-lint verify-dep verify-shellcheck verify-goword \
|
||||||
verify-govet verify-license-header verify-receiver-name verify-mod-tidy verify-shellcheck \
|
verify-govet verify-license-header verify-receiver-name verify-mod-tidy verify-shellcheck \
|
||||||
verify-shellws verify-proto-annotations verify-genproto verify-goimport
|
verify-shellws verify-proto-annotations verify-genproto verify-goimport verify-yamllint
|
||||||
fix: fix-bom fix-lint
|
fix: fix-bom fix-lint
|
||||||
./scripts/fix.sh
|
./scripts/fix.sh
|
||||||
|
|
||||||
@ -132,6 +132,10 @@ verify-genproto:
|
|||||||
verify-goimport:
|
verify-goimport:
|
||||||
PASSES="goimport" ./scripts/test.sh
|
PASSES="goimport" ./scripts/test.sh
|
||||||
|
|
||||||
|
.PHONY: verify-yamllint
|
||||||
|
verify-yamllint:
|
||||||
|
yamllint .
|
||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
25
codecov.yml
25
codecov.yml
@ -1,17 +1,16 @@
|
|||||||
|
---
|
||||||
codecov:
|
codecov:
|
||||||
token: "6040de41-c073-4d6f-bbf8-d89256ef31e1"
|
token: 6040de41-c073-4d6f-bbf8-d89256ef31e1
|
||||||
disable_default_path_fixes: true
|
disable_default_path_fixes: true
|
||||||
|
|
||||||
fixes:
|
fixes:
|
||||||
- "go.etcd.io/etcd/api/v3/::api/"
|
- go.etcd.io/etcd/api/v3/::api/
|
||||||
- "go.etcd.io/etcd/client/v3/::client/v3/"
|
- go.etcd.io/etcd/client/v3/::client/v3/
|
||||||
- "go.etcd.io/etcd/client/v2/::client/v2/"
|
- go.etcd.io/etcd/client/v2/::client/v2/
|
||||||
- "go.etcd.io/etcd/etcdctl/v3/::etcdctl/"
|
- go.etcd.io/etcd/etcdctl/v3/::etcdctl/
|
||||||
- "go.etcd.io/etcd/pkg/v3/::pkg/"
|
- go.etcd.io/etcd/pkg/v3/::pkg/
|
||||||
- "go.etcd.io/etcd/server/v3/::server/"
|
- go.etcd.io/etcd/server/v3/::server/
|
||||||
|
|
||||||
ignore:
|
ignore:
|
||||||
- "**/*.pb.go"
|
- '**/*.pb.go'
|
||||||
- "**/*.pb.gw.go"
|
- '**/*.pb.gw.go'
|
||||||
- "tests/**/*"
|
- tests/**/*
|
||||||
- "go.etcd.io/etcd/tests/**/*"
|
- go.etcd.io/etcd/tests/**/*
|
||||||
|
@ -1,17 +1,15 @@
|
|||||||
rule_files:
|
---
|
||||||
- manifests/etcd-prometheusRules.yaml
|
rule_files: [manifests/etcd-prometheusRules.yaml]
|
||||||
|
|
||||||
evaluation_interval: 1m
|
evaluation_interval: 1m
|
||||||
|
|
||||||
tests:
|
tests:
|
||||||
- interval: 1m
|
- interval: 1m
|
||||||
input_series:
|
input_series:
|
||||||
- series: 'up{job="etcd",instance="10.10.10.0"}'
|
- series: up{job="etcd",instance="10.10.10.0"}
|
||||||
values: '1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0'
|
values: 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0
|
||||||
- series: 'up{job="etcd",instance="10.10.10.1"}'
|
- series: up{job="etcd",instance="10.10.10.1"}
|
||||||
values: '1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0'
|
values: 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
|
||||||
- series: 'up{job="etcd",instance="10.10.10.2"}'
|
- series: up{job="etcd",instance="10.10.10.2"}
|
||||||
values: '1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0'
|
values: 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
alert_rule_test:
|
alert_rule_test:
|
||||||
- eval_time: 3m
|
- eval_time: 3m
|
||||||
alertname: etcdInsufficientMembers
|
alertname: etcdInsufficientMembers
|
||||||
@ -27,7 +25,7 @@ tests:
|
|||||||
severity: critical
|
severity: critical
|
||||||
exp_annotations:
|
exp_annotations:
|
||||||
description: 'etcd cluster "etcd": members are down (3).'
|
description: 'etcd cluster "etcd": members are down (3).'
|
||||||
summary: 'etcd cluster members are down.'
|
summary: etcd cluster members are down.
|
||||||
- eval_time: 7m
|
- eval_time: 7m
|
||||||
alertname: etcdInsufficientMembers
|
alertname: etcdInsufficientMembers
|
||||||
- eval_time: 11m
|
- eval_time: 11m
|
||||||
@ -38,7 +36,7 @@ tests:
|
|||||||
severity: critical
|
severity: critical
|
||||||
exp_annotations:
|
exp_annotations:
|
||||||
description: 'etcd cluster "etcd": insufficient members (1).'
|
description: 'etcd cluster "etcd": insufficient members (1).'
|
||||||
summary: 'etcd cluster has insufficient number of members.'
|
summary: etcd cluster has insufficient number of members.
|
||||||
- eval_time: 15m
|
- eval_time: 15m
|
||||||
alertname: etcdInsufficientMembers
|
alertname: etcdInsufficientMembers
|
||||||
exp_alerts:
|
exp_alerts:
|
||||||
@ -47,16 +45,15 @@ tests:
|
|||||||
severity: critical
|
severity: critical
|
||||||
exp_annotations:
|
exp_annotations:
|
||||||
description: 'etcd cluster "etcd": insufficient members (0).'
|
description: 'etcd cluster "etcd": insufficient members (0).'
|
||||||
summary: 'etcd cluster has insufficient number of members.'
|
summary: etcd cluster has insufficient number of members.
|
||||||
|
|
||||||
- interval: 1m
|
- interval: 1m
|
||||||
input_series:
|
input_series:
|
||||||
- series: 'up{job="etcd",instance="10.10.10.0"}'
|
- series: up{job="etcd",instance="10.10.10.0"}
|
||||||
values: '1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0'
|
values: 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
|
||||||
- series: 'up{job="etcd",instance="10.10.10.1"}'
|
- series: up{job="etcd",instance="10.10.10.1"}
|
||||||
values: '1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0'
|
values: 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
- series: 'up{job="etcd",instance="10.10.10.2"}'
|
- series: up{job="etcd",instance="10.10.10.2"}
|
||||||
values: '1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'
|
values: 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
alert_rule_test:
|
alert_rule_test:
|
||||||
- eval_time: 14m
|
- eval_time: 14m
|
||||||
alertname: etcdMembersDown
|
alertname: etcdMembersDown
|
||||||
@ -66,16 +63,15 @@ tests:
|
|||||||
severity: critical
|
severity: critical
|
||||||
exp_annotations:
|
exp_annotations:
|
||||||
description: 'etcd cluster "etcd": members are down (3).'
|
description: 'etcd cluster "etcd": members are down (3).'
|
||||||
summary: 'etcd cluster members are down.'
|
summary: etcd cluster members are down.
|
||||||
|
|
||||||
- interval: 1m
|
- interval: 1m
|
||||||
input_series:
|
input_series:
|
||||||
- series: 'up{job="etcd",instance="10.10.10.0"}'
|
- series: up{job="etcd",instance="10.10.10.0"}
|
||||||
values: '1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0'
|
values: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0
|
||||||
- series: 'up{job="etcd",instance="10.10.10.1"}'
|
- series: up{job="etcd",instance="10.10.10.1"}
|
||||||
values: '1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0'
|
values: 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
|
||||||
- series: 'etcd_network_peer_sent_failures_total{To="member-1",job="etcd",endpoint="test"}'
|
- series: etcd_network_peer_sent_failures_total{To="member-1",job="etcd",endpoint="test"}
|
||||||
values: '0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18'
|
values: 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
||||||
alert_rule_test:
|
alert_rule_test:
|
||||||
- eval_time: 13m
|
- eval_time: 13m
|
||||||
alertname: etcdMembersDown
|
alertname: etcdMembersDown
|
||||||
@ -85,16 +81,15 @@ tests:
|
|||||||
severity: critical
|
severity: critical
|
||||||
exp_annotations:
|
exp_annotations:
|
||||||
description: 'etcd cluster "etcd": members are down (1).'
|
description: 'etcd cluster "etcd": members are down (1).'
|
||||||
summary: 'etcd cluster members are down.'
|
summary: etcd cluster members are down.
|
||||||
|
|
||||||
- interval: 1m
|
- interval: 1m
|
||||||
input_series:
|
input_series:
|
||||||
- series: 'etcd_server_leader_changes_seen_total{job="etcd",instance="10.10.10.0"}'
|
- series: etcd_server_leader_changes_seen_total{job="etcd",instance="10.10.10.0"}
|
||||||
values: '0 0 2 0 0 1 0 0 0 0 0 0 0 0 0 0'
|
values: 0 0 2 0 0 1 0 0 0 0 0 0 0 0 0 0
|
||||||
- series: 'etcd_server_leader_changes_seen_total{job="etcd",instance="10.10.10.1"}'
|
- series: etcd_server_leader_changes_seen_total{job="etcd",instance="10.10.10.1"}
|
||||||
values: '0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0'
|
values: 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
- series: 'etcd_server_leader_changes_seen_total{job="etcd",instance="10.10.10.2"}'
|
- series: etcd_server_leader_changes_seen_total{job="etcd",instance="10.10.10.2"}
|
||||||
values: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'
|
values: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
alert_rule_test:
|
alert_rule_test:
|
||||||
- eval_time: 10m
|
- eval_time: 10m
|
||||||
alertname: etcdHighNumberOfLeaderChanges
|
alertname: etcdHighNumberOfLeaderChanges
|
||||||
@ -103,62 +98,69 @@ tests:
|
|||||||
job: etcd
|
job: etcd
|
||||||
severity: warning
|
severity: warning
|
||||||
exp_annotations:
|
exp_annotations:
|
||||||
description: 'etcd cluster "etcd": 4 leader changes within the last 15 minutes. Frequent elections may be a sign of insufficient resources, high network latency, or disruptions by other components and should be investigated.'
|
description: 'etcd cluster "etcd": 4 leader changes within the last
|
||||||
summary: 'etcd cluster has high number of leader changes.'
|
15 minutes. Frequent elections may be a sign of insufficient resources,
|
||||||
|
high network latency, or disruptions by other components and should
|
||||||
|
be investigated.'
|
||||||
|
summary: etcd cluster has high number of leader changes.
|
||||||
- interval: 1m
|
- interval: 1m
|
||||||
input_series:
|
input_series:
|
||||||
- series: 'etcd_server_leader_changes_seen_total{job="etcd",instance="10.10.10.0"}'
|
- series: etcd_server_leader_changes_seen_total{job="etcd",instance="10.10.10.0"}
|
||||||
values: '0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0'
|
values: 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
- series: 'etcd_server_leader_changes_seen_total{job="etcd",instance="10.10.10.1"}'
|
- series: etcd_server_leader_changes_seen_total{job="etcd",instance="10.10.10.1"}
|
||||||
values: '0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0'
|
values: 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
- series: 'etcd_server_leader_changes_seen_total{job="etcd",instance="10.10.10.2"}'
|
- series: etcd_server_leader_changes_seen_total{job="etcd",instance="10.10.10.2"}
|
||||||
values: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'
|
values: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
alert_rule_test:
|
alert_rule_test:
|
||||||
- eval_time: 10m
|
- eval_time: 10m
|
||||||
alertname: etcdHighNumberOfLeaderChanges
|
alertname: etcdHighNumberOfLeaderChanges
|
||||||
exp_alerts:
|
exp_alerts:
|
||||||
|
|
||||||
- interval: 1m
|
- interval: 1m
|
||||||
input_series:
|
input_series:
|
||||||
- series: 'etcd_mvcc_db_total_size_in_bytes{job="etcd",instance="10.10.10.0"}'
|
- series: etcd_mvcc_db_total_size_in_bytes{job="etcd",instance="10.10.10.0"}
|
||||||
values: '0+8192x240'
|
values: 0+8192x240
|
||||||
- series: 'etcd_server_quota_backend_bytes{job="etcd",instance="10.10.10.0"}'
|
- series: etcd_server_quota_backend_bytes{job="etcd",instance="10.10.10.0"}
|
||||||
values: '524288+0x240'
|
values: 524288+0x240
|
||||||
- series: 'etcd_mvcc_db_total_size_in_bytes{job="etcd",instance="10.10.10.1"}'
|
- series: etcd_mvcc_db_total_size_in_bytes{job="etcd",instance="10.10.10.1"}
|
||||||
values: '0+1024x240'
|
values: 0+1024x240
|
||||||
- series: 'etcd_server_quota_backend_bytes{job="etcd",instance="10.10.10.1"}'
|
- series: etcd_server_quota_backend_bytes{job="etcd",instance="10.10.10.1"}
|
||||||
values: '524288+0x240'
|
values: 524288+0x240
|
||||||
alert_rule_test:
|
alert_rule_test:
|
||||||
- eval_time: 11m
|
- eval_time: 11m
|
||||||
alertname: etcdExcessiveDatabaseGrowth
|
alertname: etcdExcessiveDatabaseGrowth
|
||||||
exp_alerts:
|
exp_alerts:
|
||||||
- exp_labels:
|
- exp_labels:
|
||||||
instance: '10.10.10.0'
|
instance: 10.10.10.0
|
||||||
job: etcd
|
job: etcd
|
||||||
severity: warning
|
severity: warning
|
||||||
exp_annotations:
|
exp_annotations:
|
||||||
description: 'etcd cluster "etcd": Predicting running out of disk space in the next four hours, based on write observations within the past four hours on etcd instance 10.10.10.0, please check as it might be disruptive.'
|
description: 'etcd cluster "etcd": Predicting running out of disk space
|
||||||
summary: 'etcd cluster database growing very fast.'
|
in the next four hours, based on write observations within the past
|
||||||
|
four hours on etcd instance 10.10.10.0, please check as it might be
|
||||||
|
disruptive.'
|
||||||
|
summary: etcd cluster database growing very fast.
|
||||||
- interval: 1m
|
- interval: 1m
|
||||||
input_series:
|
input_series:
|
||||||
- series: 'etcd_mvcc_db_total_size_in_use_in_bytes{job="etcd",instance="10.10.10.0"}'
|
- series: etcd_mvcc_db_total_size_in_use_in_bytes{job="etcd",instance="10.10.10.0"}
|
||||||
values: '300000000+0x10'
|
values: 300000000+0x10
|
||||||
- series: 'etcd_mvcc_db_total_size_in_bytes{job="etcd",instance="10.10.10.0"}'
|
- series: etcd_mvcc_db_total_size_in_bytes{job="etcd",instance="10.10.10.0"}
|
||||||
values: '1000000000+0x10'
|
values: 1000000000+0x10
|
||||||
- series: 'etcd_mvcc_db_total_size_in_use_in_bytes{job="etcd",instance="10.10.10.1"}'
|
- series: etcd_mvcc_db_total_size_in_use_in_bytes{job="etcd",instance="10.10.10.1"}
|
||||||
values: '700000000+0x10'
|
values: 700000000+0x10
|
||||||
- series: 'etcd_mvcc_db_total_size_in_bytes{job="etcd",instance="10.10.10.1"}'
|
- series: etcd_mvcc_db_total_size_in_bytes{job="etcd",instance="10.10.10.1"}
|
||||||
values: '1000000000+0x10'
|
values: 1000000000+0x10
|
||||||
alert_rule_test:
|
alert_rule_test:
|
||||||
- eval_time: 11m
|
- eval_time: 11m
|
||||||
alertname: etcdDatabaseHighFragmentationRatio
|
alertname: etcdDatabaseHighFragmentationRatio
|
||||||
exp_alerts:
|
exp_alerts:
|
||||||
- exp_labels:
|
- exp_labels:
|
||||||
instance: '10.10.10.0'
|
instance: 10.10.10.0
|
||||||
job: etcd
|
job: etcd
|
||||||
severity: warning
|
severity: warning
|
||||||
exp_annotations:
|
exp_annotations:
|
||||||
description: 'etcd cluster "etcd": database size in use on instance 10.10.10.0 is 30% of the actual allocated disk space, please run defragmentation (e.g. etcdctl defrag) to retrieve the unused fragmented disk space.'
|
description: 'etcd cluster "etcd": database size in use on instance
|
||||||
|
10.10.10.0 is 30% of the actual allocated disk space, please run defragmentation
|
||||||
|
(e.g. etcdctl defrag) to retrieve the unused fragmented disk space.'
|
||||||
runbook_url: https://etcd.io/docs/v3.5/op-guide/maintenance/#defragmentation
|
runbook_url: https://etcd.io/docs/v3.5/op-guide/maintenance/#defragmentation
|
||||||
summary: 'etcd database size in use is less than 50% of the actual allocated storage.'
|
summary: etcd database size in use is less than 50% of the actual allocated
|
||||||
|
storage.
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
@ -10,9 +11,7 @@ spec:
|
|||||||
targetPort: 2379
|
targetPort: 2379
|
||||||
selector:
|
selector:
|
||||||
app: etcd
|
app: etcd
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Pod
|
kind: Pod
|
||||||
metadata:
|
metadata:
|
||||||
@ -48,9 +47,7 @@ spec:
|
|||||||
name: server
|
name: server
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
@ -69,9 +66,7 @@ spec:
|
|||||||
targetPort: 2380
|
targetPort: 2380
|
||||||
selector:
|
selector:
|
||||||
etcd_node: etcd0
|
etcd_node: etcd0
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Pod
|
kind: Pod
|
||||||
metadata:
|
metadata:
|
||||||
@ -107,9 +102,7 @@ spec:
|
|||||||
name: server
|
name: server
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
@ -128,9 +121,7 @@ spec:
|
|||||||
targetPort: 2380
|
targetPort: 2380
|
||||||
selector:
|
selector:
|
||||||
etcd_node: etcd1
|
etcd_node: etcd1
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Pod
|
kind: Pod
|
||||||
metadata:
|
metadata:
|
||||||
@ -166,9 +157,7 @@ spec:
|
|||||||
name: server
|
name: server
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Pod
|
kind: Pod
|
||||||
metadata:
|
metadata:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user