style: lint code

This commit is contained in:
Sun-ZhenXing
2026-02-23 17:41:05 +08:00
parent ced072de66
commit 7e14b01b78
240 changed files with 4301 additions and 1539 deletions

View File

@@ -53,11 +53,11 @@ global:
evaluation_interval: 15s
scrape_configs:
- job_name: 'prometheus'
- job_name: prometheus
static_configs:
- targets: ['localhost:9090']
- job_name: 'node_exporter'
- job_name: node_exporter
static_configs:
- targets: ['node_exporter:9100']
```
@@ -101,7 +101,7 @@ services:
cadvisor:
image: gcr.io/cadvisor/cadvisor:latest
ports:
- "8080:8080"
- '8080:8080'
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro

View File

@@ -53,11 +53,11 @@ global:
evaluation_interval: 15s
scrape_configs:
- job_name: 'prometheus'
- job_name: prometheus
static_configs:
- targets: ['localhost:9090']
- job_name: 'node_exporter'
- job_name: node_exporter
static_configs:
- targets: ['node_exporter:9100']
```
@@ -101,7 +101,7 @@ services:
cadvisor:
image: gcr.io/cadvisor/cadvisor:latest
ports:
- "8080:8080"
- '8080:8080'
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro

View File

@@ -4,14 +4,14 @@ x-defaults: &defaults
driver: json-file
options:
max-size: 100m
max-file: "3"
max-file: '3'
services:
prometheus:
<<: *defaults
image: ${GLOBAL_REGISTRY:-}prom/prometheus:${PROMETHEUS_VERSION:-v3.5.1}
ports:
- "${PROMETHEUS_PORT_OVERRIDE:-9090}:9090"
- '${PROMETHEUS_PORT_OVERRIDE:-9090}:9090'
volumes:
- prometheus_data:/prometheus
@@ -19,20 +19,20 @@ services:
# - ./prometheus.yml:/etc/prometheus/prometheus.yml
# - ./rules:/etc/prometheus/rules
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
- "--web.console.libraries=/etc/prometheus/console_libraries"
- "--web.console.templates=/etc/prometheus/consoles"
- "--storage.tsdb.retention.time=${PROMETHEUS_RETENTION_TIME:-15d}"
- "--storage.tsdb.retention.size=${PROMETHEUS_RETENTION_SIZE:-}"
- "--web.enable-lifecycle"
- "--web.enable-admin-api"
- "--web.external-url=${PROMETHEUS_EXTERNAL_URL:-http://localhost:9090}"
- --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.path=/prometheus
- --web.console.libraries=/etc/prometheus/console_libraries
- --web.console.templates=/etc/prometheus/consoles
- '--storage.tsdb.retention.time=${PROMETHEUS_RETENTION_TIME:-15d}'
- '--storage.tsdb.retention.size=${PROMETHEUS_RETENTION_SIZE:-}'
- --web.enable-lifecycle
- --web.enable-admin-api
- '--web.external-url=${PROMETHEUS_EXTERNAL_URL:-http://localhost:9090}'
environment:
- TZ=${TZ:-UTC}
- PROMETHEUS_RETENTION_TIME=${PROMETHEUS_RETENTION_TIME:-15d}
- PROMETHEUS_RETENTION_SIZE=${PROMETHEUS_RETENTION_SIZE:-}
user: "65534:65534" # nobody user
user: '65534:65534' # nobody user
deploy:
resources:
limits:
@@ -43,14 +43,13 @@ services:
memory: ${PROMETHEUS_MEMORY_RESERVATION:-512M}
healthcheck:
test:
[
"CMD",
"wget",
"--no-verbose",
"--tries=1",
"--spider",
"http://localhost:9090/-/healthy",
]
- CMD
- wget
- --no-verbose
- --tries=1
- --spider
- 'http://localhost:9090/-/healthy'
interval: 30s
timeout: 10s
retries: 3