Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
125 lines (97 loc) · 4.47 KB
/
Copy path.env.example
File metadata and controls
125 lines (97 loc) · 4.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# =============================================================================
# PolarDB Storage Resizer - Environment Variables Example
# =============================================================================
# Copy this file to .env and configure the values for your environment:
# cp .env.example .env
#
# Configuration can also be provided via YAML file (see tests/fixtures/sample_config.yaml)
# =============================================================================
# -----------------------------------------------------------------------------
# Required Configuration
# -----------------------------------------------------------------------------
# Run mode: "dry-run" (no actual changes) or "apply" (execute changes)
# WARNING: "apply" mode will modify your PolarDB storage!
RUN_MODE=dry-run
# Target regions (comma-separated)
# Example: cn-hangzhou,cn-beijing,cn-shanghai
REGIONS=cn-hangzhou
# -----------------------------------------------------------------------------
# Optional Configuration (with defaults)
# -----------------------------------------------------------------------------
# Log level: DEBUG, INFO, WARNING, ERROR, CRITICAL
# LOG_LEVEL=INFO
# Storage buffer percentage (must be > 100)
# Target storage = ceil(used_storage * buffer_percent / 100)
# BUFFER_PERCENT=105
# Maximum concurrent API requests
# MAX_PARALLEL_REQUESTS=5
# Maximum API queries per second (rate limiting)
# MAX_QPS=10
# API timeout settings (seconds)
# API_CONNECT_TIMEOUT=5
# API_READ_TIMEOUT=30
# -----------------------------------------------------------------------------
# Safety Thresholds
# -----------------------------------------------------------------------------
# Maximum expansion ratio (target/current)
# MAX_EXPAND_RATIO=2.0
# Minimum shrink ratio (target/current)
# MAX_SHRINK_RATIO=0.5
# Maximum single change in GB
# MAX_SINGLE_CHANGE_GB=1000
# Minimum change threshold in GB (skip changes smaller than this)
# MIN_CHANGE_THRESHOLD_GB=10
# -----------------------------------------------------------------------------
# Retry Configuration
# -----------------------------------------------------------------------------
# Maximum retry attempts for transient errors
# RETRY_MAX_ATTEMPTS=3
# Retry backoff base in seconds (exponential: base * 2^attempt)
# RETRY_BACKOFF_BASE=1.0
# Maximum backoff time in seconds
# RETRY_BACKOFF_MAX=30.0
# -----------------------------------------------------------------------------
# Cluster Filtering
# -----------------------------------------------------------------------------
# Cluster whitelist (comma-separated cluster IDs)
# If set, only these clusters will be processed
# CLUSTER_WHITELIST=pc-xxxxxxxxx,pc-yyyyyyyyy
# Cluster blacklist (comma-separated cluster IDs)
# Takes priority over whitelist
# CLUSTER_BLACKLIST=pc-zzzzzzzzz
# Cluster tag filters (key:value pairs, comma-separated)
# Only clusters with ALL specified tags will be processed
# This filter is applied at API level for better performance
# Example: Environment:production,Team:backend
# CLUSTER_TAG_FILTERS=Environment:production,Team:backend
# -----------------------------------------------------------------------------
# Authentication
# -----------------------------------------------------------------------------
#
# IMPORTANT: Choose ONE authentication method based on your environment:
#
# 1. Kubernetes with RRSA (RECOMMENDED for production)
# - Do NOT set any environment variables below
# - Configure RRSA via ServiceAccount annotation instead:
# pod-identity.alibabacloud.com/role-name: "YourRoleName"
# - See docs/deployment.md for detailed setup
#
# 2. Local development / testing
# - Use AccessKey for simplicity
# - WARNING: Never commit AccessKey to version control!
#
# 3. ECS / ECI without RRSA
# - Use RAM Role ARN (the instance must have the role attached)
# -----------------------------------------------------------------------------
# Option 1: AccessKey (for local testing only - NOT for production!)
# ALIBABA_CLOUD_ACCESS_KEY_ID=your-access-key-id
# ALIBABA_CLOUD_ACCESS_KEY_SECRET=your-access-key-secret
# Option 2: RAM Role ARN (for ECS instances with attached RAM role)
# ALIBABA_CLOUD_ROLE_ARN=acs:ram::1234567890123456:role/YourRoleName
# -----------------------------------------------------------------------------
# Development/Testing
# -----------------------------------------------------------------------------
# Use fake client for testing (no real API calls)
# USE_FAKE_CLIENT=false
# Enable metrics output
# METRICS_ENABLED=true