feat: Add Vault integration annotations to Kubernetes secrets and remove hardcoded credentials

- Add vault.hashicorp.com/agent-inject annotations to all Secret resources for Vault integration
- Add vault.hashicorp.com/agent-inject-secret-* annotations with KV paths for database, redis, jwt, encryption, and payment secrets
- Remove all base64-encoded hardcoded credentials from telecom-secrets, postgres-secret, grafana-secret, and influxdb-secret
- Replace secret values with empty strings and comments
This commit is contained in:
nutcas3
2026-04-25 06:55:22 +03:00
parent f6ec659fe9
commit 50e807f2da
+37 -13
View File
@@ -1,45 +1,69 @@
--- ---
# Note: Secrets should be stored in Vault for production use
# This file is for development/testing purposes only
# For production, use the Vault integration in deployments/vault/
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
metadata: metadata:
name: telecom-secrets name: telecom-secrets
namespace: telecom-platform namespace: telecom-platform
annotations:
vault.hashicorp.com/agent-inject: "true"
vault.hashicorp.com/agent-inject-secret-database: "kv/data/telecom-platform/database"
vault.hashicorp.com/agent-inject-secret-redis: "kv/data/telecom-platform/redis"
vault.hashicorp.com/agent-inject-secret-jwt: "kv/data/telecom-platform/jwt"
vault.hashicorp.com/agent-inject-secret-encryption: "kv/data/telecom-platform/encryption"
vault.hashicorp.com/agent-inject-secret-payment: "kv/data/telecom-platform/payment"
type: Opaque type: Opaque
data: data:
DATABASE_PASSWORD: cGFzc3dvcmQxMjM= # password123 # These should be replaced by Vault injection in production
REDIS_PASSWORD: "" DATABASE_PASSWORD: "" # Will be injected from Vault
STRIPE_API_KEY: "" REDIS_PASSWORD: "" # Will be injected from Vault
STRIPE_WEBHOOK_SECRET: "" STRIPE_API_KEY: "" # Will be injected from Vault
ES2_API_KEY: "" STRIPE_WEBHOOK_SECRET: "" # Will be injected from Vault
INFLUXDB_TOKEN: dGVsZWNvbS1zdXBlci1zZWNyZXQtYXV0aC10b2tlbg== # telecom-super-secret-auth-token ES2_API_KEY: "" # Will be injected from Vault
INFLUXDB_TOKEN: "" # Will be injected from Vault
--- ---
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
metadata: metadata:
name: postgres-secret name: postgres-secret
namespace: telecom-platform namespace: telecom-platform
annotations:
vault.hashicorp.com/agent-inject: "true"
vault.hashicorp.com/agent-inject-secret-credentials: "database/creds/telecom-platform"
type: Opaque type: Opaque
data: data:
POSTGRES_PASSWORD: cGFzc3dvcmQxMjM= # password123 # Will be injected from Vault database secrets engine
POSTGRES_PASSWORD: ""
--- ---
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
metadata: metadata:
name: grafana-secret name: grafana-secret
namespace: telecom-monitoring namespace: telecom-monitoring
annotations:
vault.hashicorp.com/agent-inject: "true"
vault.hashicorp.com/agent-inject-secret-admin: "kv/data/telecom-platform/grafana"
type: Opaque type: Opaque
data: data:
GF_SECURITY_ADMIN_PASSWORD: YWRtaW4xMjM= # admin123 # Will be injected from Vault
GF_SECURITY_ADMIN_PASSWORD: ""
--- ---
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
metadata: metadata:
name: influxdb-secret name: influxdb-secret
namespace: telecom-monitoring namespace: telecom-monitoring
annotations:
vault.hashicorp.com/agent-inject: "true"
vault.hashicorp.com/agent-inject-secret-config: "kv/data/telecom-platform/influxdb"
type: Opaque type: Opaque
data: data:
INFLUXDB_ADMIN_USER: YWRtaW4= # admin # Will be injected from Vault
INFLUXDB_ADMIN_PASSWORD: cGFzc3dvcmQxMjM= # password123 INFLUXDB_ADMIN_USER: ""
INFLUXDB_USER: dGVsZWNvbQ== # telecom INFLUXDB_ADMIN_PASSWORD: ""
INFLUXDB_PASSWORD: dGVsZWNvbXBhc3M= # telecompass INFLUXDB_USER: ""
INFLUXDB_ADMIN_TOKEN: dGVsZWNvbS1zdXBlci1zZWNyZXQtYXV0aC10b2tlbg== # telecom-super-secret-auth-token INFLUXDB_PASSWORD: ""
INFLUXDB_ADMIN_TOKEN: ""