118 lines
3.2 KiB
YAML
118 lines
3.2 KiB
YAML
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: notifier-config
|
|
labels:
|
|
app: notifier
|
|
data:
|
|
config.yaml: |
|
|
server:
|
|
grpc_port: 50051
|
|
rest_port: 8080
|
|
host: "0.0.0.0"
|
|
mode: "both"
|
|
|
|
queue:
|
|
type: "local"
|
|
max_size: 10000
|
|
worker_count: 10
|
|
retry_attempts: 3
|
|
retry_backoff: "exponential"
|
|
local:
|
|
buffer_size: 1000
|
|
persist_to_disk: false
|
|
|
|
notifiers:
|
|
stdout: true
|
|
|
|
# SMTP email configuration (supports multiple accounts)
|
|
smtp:
|
|
personal:
|
|
host: "smtp.gmail.com"
|
|
port: 587
|
|
username: "your-email@gmail.com"
|
|
password: "your-app-password"
|
|
from: "your-email@gmail.com"
|
|
use_tls: true
|
|
default: true
|
|
|
|
# Slack configuration (supports multiple workspaces)
|
|
slack:
|
|
main:
|
|
webhook_url: "https://hooks.slack.com/services/YOUR/WEBHOOK/URL"
|
|
username: "Notifier Bot"
|
|
icon_emoji: ":bell:"
|
|
default: true
|
|
|
|
# Ntfy configuration (supports multiple servers)
|
|
ntfy:
|
|
public:
|
|
server_url: "https://ntfy.sh"
|
|
default: true
|
|
|
|
logging:
|
|
level: "info"
|
|
format: "json"
|
|
output_path: "stdout"
|
|
|
|
metrics:
|
|
enabled: true
|
|
port: 9090
|
|
path: "/metrics"
|
|
prometheus_enabled: true
|
|
|
|
health_check:
|
|
enabled: true
|
|
port: 8081
|
|
path: "/health"
|
|
interval: 30
|
|
|
|
# CORS (Cross-Origin Resource Sharing) configuration
|
|
# Only needed if web browsers will access the REST API
|
|
# For backend-only services using gRPC, CORS is not required
|
|
cors:
|
|
# Whitelist of allowed origins - wildcards (*) are NOT supported
|
|
# Leave empty if you don't have web browser clients
|
|
allowed_origins: []
|
|
|
|
# If you have a web frontend, add its domain(s) here:
|
|
# allowed_origins:
|
|
# - "https://app.example.com"
|
|
# - "https://dashboard.example.com"
|
|
|
|
# For local development:
|
|
# allowed_origins:
|
|
# - "http://localhost:3000"
|
|
# - "http://localhost:8080"
|
|
|
|
allowed_methods:
|
|
- "GET"
|
|
- "POST"
|
|
- "OPTIONS"
|
|
- "DELETE"
|
|
allowed_headers:
|
|
- "Content-Type"
|
|
- "Authorization"
|
|
allow_credentials: false
|
|
max_age: 3600
|
|
|
|
# Authentication and authorization configuration
|
|
# Uncomment and configure to enable API key authentication
|
|
# auth:
|
|
# enabled: true
|
|
# default_rate_limit: 100 # requests per minute
|
|
# bootstrap:
|
|
# enabled: true
|
|
# kubernetes_secret_name: "notifier-admin-key" # Secret name for storing admin key
|
|
# kubernetes_secret_key: "admin-key" # Key within the secret
|
|
# # Optionally save to file as backup
|
|
# admin_key_file: "/tmp/notifier-admin-key"
|
|
# print_to_stdout: false
|
|
|
|
# Notification retention and automatic cleanup configuration
|
|
retention:
|
|
enabled: true # Enable automatic cleanup of old/expired notifications
|
|
ttl: "168h" # Time-to-live: how long to keep notifications (7 days)
|
|
check_frequency: "1h" # How often to run cleanup check
|
|
max_size: 100000 # Maximum number of notifications to store
|