Environment Variables¶
Configure the Bindy operator using environment variables.
Operator Environment Variables¶
RUST_LOG¶
Control logging level:
Levels:
- error - Only errors
- warn - Warnings and errors
- info - Informational messages (default)
- debug - Detailed debugging
- trace - Very detailed tracing
RUST_LOG_FORMAT¶
Control logging output format:
Formats:
- text - Human-readable compact text format (default)
- json - Structured JSON format for log aggregation tools
Use JSON format for: - Kubernetes production deployments - Log aggregation systems (Loki, ELK, Splunk) - Centralized logging and monitoring - Automated log parsing and analysis
Example JSON output:
{
"timestamp": "2025-11-30T10:00:00.123456Z",
"level": "INFO",
"message": "Starting BIND9 DNS Operator",
"file": "main.rs",
"line": 80,
"threadName": "bindy-operator"
}
RECONCILE_INTERVAL¶
Set how often to reconcile resources (in seconds):
NAMESPACE¶
Limit operator to specific namespace:
Omit to watch all namespaces (requires ClusterRole).
Example Deployment Configuration¶
apiVersion: apps/v1
kind: Deployment
metadata:
name: bindy
namespace: dns-system
spec:
replicas: 1
selector:
matchLabels:
app: bindy
template:
metadata:
labels:
app: bindy
spec:
serviceAccountName: bindy
containers:
- name: operator
image: ghcr.io/firestoned/bindy:latest
env:
- name: RUST_LOG
value: "info"
- name: RUST_LOG_FORMAT
value: "json"
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
Best Practices¶
- Use info level in production - Balance between visibility and noise
- Enable debug for troubleshooting - Temporarily increase to debug level
- Use JSON format in production - Enable structured logging for better log aggregation
- Use text format for development - More readable for local debugging
- Set reconcile interval appropriately - Don't set too low to avoid API pressure
- Use namespace scoping - Scope to specific namespace if not managing cluster-wide DNS