Adding configuration for k8s

This commit is contained in:
Ketan Patel committed 2026-04-16 20:27:35 -04:00
1 parent e30c2d8a93
commit 72493764f1
6 files changed
+34 -34

No files matched your search

+3
View File
@@ -52,6 +52,9 @@ Thumbs.db
*.tmp *.tmp
*.temp *.temp
# Kubernetes secrets (sops-encrypted original stays local)
k8s/secret.yaml
# Melange / apko build artifacts # Melange / apko build artifacts
packages/ packages/
melange.rsa melange.rsa
-17
View File
@@ -1,17 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: apcupsd-client-config
namespace: apcupsd
labels:
app.kubernetes.io/name: apcupsd-client
app.kubernetes.io/part-of: apcupsd-client
data:
REDIS_URL: "redis://redis:6379/0"
LOG_LEVEL: "info"
TZ: "UTC"
ALLOW_PRIVATE_IPS: "true"
TRUST_PROXY: "true"
RATE_LIMIT_ENABLED: "true"
ADMIN_USERNAME: "admin"
SESSION_MAX_AGE_SECONDS: "86400"
-2
View File
@@ -33,8 +33,6 @@ spec:
- containerPort: 8000 - containerPort: 8000
protocol: TCP protocol: TCP
envFrom: envFrom:
- configMapRef:
name: apcupsd-client-config
- secretRef: - secretRef:
name: apcupsd-client-secret name: apcupsd-client-secret
livenessProbe: livenessProbe:
-1
View File
@@ -3,7 +3,6 @@ kind: Kustomization
resources: resources:
- namespace.yaml - namespace.yaml
- configmap.yaml
- secret.yaml - secret.yaml
- redis-statefulset.yaml - redis-statefulset.yaml
- redis-service.yaml - redis-service.yaml
-14
View File
@@ -1,14 +0,0 @@
apiVersion: v1
kind: Secret
metadata:
name: apcupsd-client-secret
namespace: apcupsd
labels:
app.kubernetes.io/name: apcupsd-client
app.kubernetes.io/part-of: apcupsd-client
type: Opaque
stringData:
SESSION_SECRET: "CHANGE_ME_TO_A_RANDOM_SECRET"
# Optional — uncomment and set as needed:
# SMTP_PASSWORD: ""
# ADMIN_PASSWORD_HASH: ""
+31
View File
@@ -0,0 +1,31 @@
apiVersion: v1
kind: Secret
metadata:
name: apcupsd-client-secret
namespace: apcupsd
labels:
app.kubernetes.io/name: apcupsd-client
app.kubernetes.io/part-of: apcupsd-client
type: Opaque
stringData:
# Auth (required in production)
# Generate with: python -c "import secrets; print(secrets.token_urlsafe(32))"
SESSION_SECRET: ""
ADMIN_USERNAME: "admin"
# Generate with: python -c "from passlib.hash import argon2; print(argon2.hash('yourpassword'))"
ADMIN_PASSWORD_HASH: ""
SESSION_MAX_AGE_SECONDS: "1209600"
TRUST_PROXY: "false"
# Redis
REDIS_URL: "redis://redis:6379/0"
# SMTP (optional)
SMTP_PASSWORD: ""
# Network
ALLOW_PRIVATE_IPS: "true"
# Observability
LOG_LEVEL: "INFO"
RATE_LIMIT_ENABLED: "true"
# Locale
TZ: "UTC"
# Legacy migration (unused unless /config is mounted)
UPS_CONFIG_PATH: "/config/ups.yaml"