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
|
||||
description: Report a bug encountered while operating Etcd
|
||||
labels:
|
||||
|
1
.github/ISSUE_TEMPLATE/config.yml
vendored
1
.github/ISSUE_TEMPLATE/config.yml
vendored
@ -1,3 +1,4 @@
|
||||
---
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- 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
|
||||
description: Provide idea for a new feature
|
||||
labels:
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
name: Membership nomination
|
||||
description: Nominate new etcd members
|
||||
labels:
|
||||
|
1
.github/ISSUE_TEMPLATE/test-flake.yml
vendored
1
.github/ISSUE_TEMPLATE/test-flake.yml
vendored
@ -1,3 +1,4 @@
|
||||
---
|
||||
name: Flaking Test
|
||||
description: Report flaky tests
|
||||
labels:
|
||||
|
1
.github/dependabot.yml
vendored
1
.github/dependabot.yml
vendored
@ -1,3 +1,4 @@
|
||||
---
|
||||
version: 2
|
||||
updates:
|
||||
- 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
|
||||
|
||||
# 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
|
||||
on: [push, pull_request]
|
||||
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
|
||||
# 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
|
||||
on: [push, pull_request]
|
||||
permissions: read-all
|
||||
|
1
.github/workflows/coverage.yaml
vendored
1
.github/workflows/coverage.yaml
vendored
@ -1,3 +1,4 @@
|
||||
---
|
||||
name: Coverage
|
||||
on: [push]
|
||||
permissions: read-all
|
||||
|
1
.github/workflows/e2e-arm64.yaml
vendored
1
.github/workflows/e2e-arm64.yaml
vendored
@ -1,3 +1,4 @@
|
||||
---
|
||||
name: E2E-arm64
|
||||
on:
|
||||
schedule:
|
||||
|
1
.github/workflows/e2e.yaml
vendored
1
.github/workflows/e2e.yaml
vendored
@ -1,3 +1,4 @@
|
||||
---
|
||||
name: E2E
|
||||
on: [push, pull_request]
|
||||
permissions: read-all
|
||||
|
1
.github/workflows/fuzzing.yaml
vendored
1
.github/workflows/fuzzing.yaml
vendored
@ -1,3 +1,4 @@
|
||||
---
|
||||
name: Fuzzing v3rpc
|
||||
on: [push, pull_request]
|
||||
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
|
||||
permissions: read-all
|
||||
|
||||
|
1
.github/workflows/govuln.yaml
vendored
1
.github/workflows/govuln.yaml
vendored
@ -1,3 +1,4 @@
|
||||
---
|
||||
name: Go Vulnerability Checker
|
||||
on: [push, pull_request]
|
||||
permissions: read-all
|
||||
|
1
.github/workflows/grpcproxy.yaml
vendored
1
.github/workflows/grpcproxy.yaml
vendored
@ -1,3 +1,4 @@
|
||||
---
|
||||
name: grpcProxy-tests
|
||||
on: [push, pull_request]
|
||||
permissions: read-all
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
name: Measure Test Flakiness
|
||||
|
||||
on:
|
||||
|
1
.github/workflows/release.yaml
vendored
1
.github/workflows/release.yaml
vendored
@ -1,3 +1,4 @@
|
||||
---
|
||||
name: Release
|
||||
on: [push, pull_request]
|
||||
permissions: read-all
|
||||
|
1
.github/workflows/robustness-nightly.yaml
vendored
1
.github/workflows/robustness-nightly.yaml
vendored
@ -1,3 +1,4 @@
|
||||
---
|
||||
name: Robustness Nightly
|
||||
permissions: read-all
|
||||
on:
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
name: Reusable Robustness Workflow
|
||||
on:
|
||||
workflow_call:
|
||||
@ -69,4 +70,3 @@ jobs:
|
||||
with:
|
||||
name: ${{ inputs.artifactName }}
|
||||
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
|
||||
on:
|
||||
workflow_call:
|
||||
|
1
.github/workflows/robustness.yaml
vendored
1
.github/workflows/robustness.yaml
vendored
@ -1,3 +1,4 @@
|
||||
---
|
||||
name: Robustness
|
||||
on: [push, pull_request]
|
||||
permissions: read-all
|
||||
|
1
.github/workflows/scorecards.yml
vendored
1
.github/workflows/scorecards.yml
vendored
@ -1,3 +1,4 @@
|
||||
---
|
||||
name: Scorecards supply-chain security
|
||||
on:
|
||||
# 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
|
||||
on: [push, pull_request]
|
||||
permissions: read-all
|
||||
|
1
.github/workflows/tests-arm64.yaml
vendored
1
.github/workflows/tests-arm64.yaml
vendored
@ -1,3 +1,4 @@
|
||||
---
|
||||
name: Tests-arm64
|
||||
on:
|
||||
schedule:
|
||||
|
1
.github/workflows/tests.yaml
vendored
1
.github/workflows/tests.yaml
vendored
@ -1,3 +1,4 @@
|
||||
---
|
||||
name: Tests
|
||||
on: [push, pull_request]
|
||||
permissions: read-all
|
||||
|
@ -1,17 +1,14 @@
|
||||
---
|
||||
run:
|
||||
timeout: 30m
|
||||
skip-files:
|
||||
- "^zz_generated.*"
|
||||
|
||||
skip-files: [^zz_generated.*]
|
||||
issues:
|
||||
max-same-issues: 0
|
||||
# Excluding configuration per-path, per-linter, per-text and per-source
|
||||
exclude-rules:
|
||||
# exclude ineffassing linter for generated files for conversion
|
||||
- path: conversion\.go
|
||||
linters:
|
||||
- ineffassign
|
||||
|
||||
linters: [ineffassign]
|
||||
linters:
|
||||
disable-all: true
|
||||
enable: # please keep this alphabetized
|
||||
@ -27,15 +24,14 @@ linters:
|
||||
- stylecheck
|
||||
- unused
|
||||
- unconvert # Remove unnecessary type conversions
|
||||
|
||||
linters-settings: # please keep this alphabetized
|
||||
goimports:
|
||||
local-prefixes: go.etcd.io # Put imports beginning with prefix after 3rd-party packages.
|
||||
staticcheck:
|
||||
checks:
|
||||
- "all"
|
||||
- "-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
|
||||
- all
|
||||
- -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
|
||||
stylecheck:
|
||||
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-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
|
||||
./scripts/fix.sh
|
||||
|
||||
@ -132,6 +132,10 @@ verify-genproto:
|
||||
verify-goimport:
|
||||
PASSES="goimport" ./scripts/test.sh
|
||||
|
||||
.PHONY: verify-yamllint
|
||||
verify-yamllint:
|
||||
yamllint .
|
||||
|
||||
# Cleanup
|
||||
|
||||
clean:
|
||||
|
25
codecov.yml
25
codecov.yml
@ -1,17 +1,16 @@
|
||||
---
|
||||
codecov:
|
||||
token: "6040de41-c073-4d6f-bbf8-d89256ef31e1"
|
||||
token: 6040de41-c073-4d6f-bbf8-d89256ef31e1
|
||||
disable_default_path_fixes: true
|
||||
|
||||
fixes:
|
||||
- "go.etcd.io/etcd/api/v3/::api/"
|
||||
- "go.etcd.io/etcd/client/v3/::client/v3/"
|
||||
- "go.etcd.io/etcd/client/v2/::client/v2/"
|
||||
- "go.etcd.io/etcd/etcdctl/v3/::etcdctl/"
|
||||
- "go.etcd.io/etcd/pkg/v3/::pkg/"
|
||||
- "go.etcd.io/etcd/server/v3/::server/"
|
||||
|
||||
- go.etcd.io/etcd/api/v3/::api/
|
||||
- go.etcd.io/etcd/client/v3/::client/v3/
|
||||
- go.etcd.io/etcd/client/v2/::client/v2/
|
||||
- go.etcd.io/etcd/etcdctl/v3/::etcdctl/
|
||||
- go.etcd.io/etcd/pkg/v3/::pkg/
|
||||
- go.etcd.io/etcd/server/v3/::server/
|
||||
ignore:
|
||||
- "**/*.pb.go"
|
||||
- "**/*.pb.gw.go"
|
||||
- "tests/**/*"
|
||||
- "go.etcd.io/etcd/tests/**/*"
|
||||
- '**/*.pb.go'
|
||||
- '**/*.pb.gw.go'
|
||||
- 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
|
||||
|
||||
tests:
|
||||
- interval: 1m
|
||||
input_series:
|
||||
- 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'
|
||||
- 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'
|
||||
- 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'
|
||||
- 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
|
||||
- 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
|
||||
- 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
|
||||
alert_rule_test:
|
||||
- eval_time: 3m
|
||||
alertname: etcdInsufficientMembers
|
||||
@ -27,7 +25,7 @@ tests:
|
||||
severity: critical
|
||||
exp_annotations:
|
||||
description: 'etcd cluster "etcd": members are down (3).'
|
||||
summary: 'etcd cluster members are down.'
|
||||
summary: etcd cluster members are down.
|
||||
- eval_time: 7m
|
||||
alertname: etcdInsufficientMembers
|
||||
- eval_time: 11m
|
||||
@ -38,7 +36,7 @@ tests:
|
||||
severity: critical
|
||||
exp_annotations:
|
||||
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
|
||||
alertname: etcdInsufficientMembers
|
||||
exp_alerts:
|
||||
@ -47,16 +45,15 @@ tests:
|
||||
severity: critical
|
||||
exp_annotations:
|
||||
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
|
||||
input_series:
|
||||
- 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'
|
||||
- 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'
|
||||
- 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'
|
||||
- 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
|
||||
- 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
|
||||
- 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
|
||||
alert_rule_test:
|
||||
- eval_time: 14m
|
||||
alertname: etcdMembersDown
|
||||
@ -66,16 +63,15 @@ tests:
|
||||
severity: critical
|
||||
exp_annotations:
|
||||
description: 'etcd cluster "etcd": members are down (3).'
|
||||
summary: 'etcd cluster members are down.'
|
||||
|
||||
summary: etcd cluster members are down.
|
||||
- interval: 1m
|
||||
input_series:
|
||||
- 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'
|
||||
- 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'
|
||||
- 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'
|
||||
- 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
|
||||
- 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
|
||||
- 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
|
||||
alert_rule_test:
|
||||
- eval_time: 13m
|
||||
alertname: etcdMembersDown
|
||||
@ -85,16 +81,15 @@ tests:
|
||||
severity: critical
|
||||
exp_annotations:
|
||||
description: 'etcd cluster "etcd": members are down (1).'
|
||||
summary: 'etcd cluster members are down.'
|
||||
|
||||
summary: etcd cluster members are down.
|
||||
- interval: 1m
|
||||
input_series:
|
||||
- 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'
|
||||
- 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'
|
||||
- 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'
|
||||
- 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
|
||||
- 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
|
||||
- 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
|
||||
alert_rule_test:
|
||||
- eval_time: 10m
|
||||
alertname: etcdHighNumberOfLeaderChanges
|
||||
@ -103,62 +98,69 @@ tests:
|
||||
job: etcd
|
||||
severity: warning
|
||||
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.'
|
||||
summary: 'etcd cluster has high number of leader changes.'
|
||||
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.'
|
||||
summary: etcd cluster has high number of leader changes.
|
||||
- interval: 1m
|
||||
input_series:
|
||||
- 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'
|
||||
- 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'
|
||||
- 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'
|
||||
- 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
|
||||
- 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
|
||||
- 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
|
||||
alert_rule_test:
|
||||
- eval_time: 10m
|
||||
alertname: etcdHighNumberOfLeaderChanges
|
||||
exp_alerts:
|
||||
|
||||
- interval: 1m
|
||||
input_series:
|
||||
- series: 'etcd_mvcc_db_total_size_in_bytes{job="etcd",instance="10.10.10.0"}'
|
||||
values: '0+8192x240'
|
||||
- series: 'etcd_server_quota_backend_bytes{job="etcd",instance="10.10.10.0"}'
|
||||
values: '524288+0x240'
|
||||
- series: 'etcd_mvcc_db_total_size_in_bytes{job="etcd",instance="10.10.10.1"}'
|
||||
values: '0+1024x240'
|
||||
- series: 'etcd_server_quota_backend_bytes{job="etcd",instance="10.10.10.1"}'
|
||||
values: '524288+0x240'
|
||||
- series: etcd_mvcc_db_total_size_in_bytes{job="etcd",instance="10.10.10.0"}
|
||||
values: 0+8192x240
|
||||
- series: etcd_server_quota_backend_bytes{job="etcd",instance="10.10.10.0"}
|
||||
values: 524288+0x240
|
||||
- series: etcd_mvcc_db_total_size_in_bytes{job="etcd",instance="10.10.10.1"}
|
||||
values: 0+1024x240
|
||||
- series: etcd_server_quota_backend_bytes{job="etcd",instance="10.10.10.1"}
|
||||
values: 524288+0x240
|
||||
alert_rule_test:
|
||||
- eval_time: 11m
|
||||
alertname: etcdExcessiveDatabaseGrowth
|
||||
exp_alerts:
|
||||
- exp_labels:
|
||||
instance: '10.10.10.0'
|
||||
instance: 10.10.10.0
|
||||
job: etcd
|
||||
severity: warning
|
||||
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.'
|
||||
summary: 'etcd cluster database growing very fast.'
|
||||
|
||||
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.'
|
||||
summary: etcd cluster database growing very fast.
|
||||
- interval: 1m
|
||||
input_series:
|
||||
- series: 'etcd_mvcc_db_total_size_in_use_in_bytes{job="etcd",instance="10.10.10.0"}'
|
||||
values: '300000000+0x10'
|
||||
- series: 'etcd_mvcc_db_total_size_in_bytes{job="etcd",instance="10.10.10.0"}'
|
||||
values: '1000000000+0x10'
|
||||
- series: 'etcd_mvcc_db_total_size_in_use_in_bytes{job="etcd",instance="10.10.10.1"}'
|
||||
values: '700000000+0x10'
|
||||
- series: 'etcd_mvcc_db_total_size_in_bytes{job="etcd",instance="10.10.10.1"}'
|
||||
values: '1000000000+0x10'
|
||||
- series: etcd_mvcc_db_total_size_in_use_in_bytes{job="etcd",instance="10.10.10.0"}
|
||||
values: 300000000+0x10
|
||||
- series: etcd_mvcc_db_total_size_in_bytes{job="etcd",instance="10.10.10.0"}
|
||||
values: 1000000000+0x10
|
||||
- series: etcd_mvcc_db_total_size_in_use_in_bytes{job="etcd",instance="10.10.10.1"}
|
||||
values: 700000000+0x10
|
||||
- series: etcd_mvcc_db_total_size_in_bytes{job="etcd",instance="10.10.10.1"}
|
||||
values: 1000000000+0x10
|
||||
alert_rule_test:
|
||||
- eval_time: 11m
|
||||
alertname: etcdDatabaseHighFragmentationRatio
|
||||
exp_alerts:
|
||||
- exp_labels:
|
||||
instance: '10.10.10.0'
|
||||
instance: 10.10.10.0
|
||||
job: etcd
|
||||
severity: warning
|
||||
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
|
||||
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
|
||||
kind: Service
|
||||
metadata:
|
||||
@ -10,9 +11,7 @@ spec:
|
||||
targetPort: 2379
|
||||
selector:
|
||||
app: etcd
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
@ -48,9 +47,7 @@ spec:
|
||||
name: server
|
||||
protocol: TCP
|
||||
restartPolicy: Always
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
@ -69,9 +66,7 @@ spec:
|
||||
targetPort: 2380
|
||||
selector:
|
||||
etcd_node: etcd0
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
@ -107,9 +102,7 @@ spec:
|
||||
name: server
|
||||
protocol: TCP
|
||||
restartPolicy: Always
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
@ -128,9 +121,7 @@ spec:
|
||||
targetPort: 2380
|
||||
selector:
|
||||
etcd_node: etcd1
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
@ -166,9 +157,7 @@ spec:
|
||||
name: server
|
||||
protocol: TCP
|
||||
restartPolicy: Always
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
|
Loading…
x
Reference in New Issue
Block a user