39 lines
1.1 KiB
YAML
39 lines
1.1 KiB
YAML
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: urlshortener-secrets
|
|
namespace: urlshortener
|
|
labels:
|
|
app: urlshortener
|
|
type: Opaque
|
|
stringData:
|
|
# Database credentials
|
|
# IMPORTANT: Replace these with actual values or use a secret management system
|
|
database-password: "CHANGE_ME"
|
|
|
|
# JWT secrets for authentication
|
|
jwt.secret: "CHANGE_ME_JWT_SECRET_KEY_MIN_32_CHARS"
|
|
jwt.expiration: "86400000" # 24 hours in milliseconds
|
|
|
|
# API keys (if needed for external services)
|
|
# external-api-key: "CHANGE_ME"
|
|
|
|
# Encryption keys
|
|
# encryption.key: "CHANGE_ME_ENCRYPTION_KEY"
|
|
|
|
---
|
|
# Instructions for creating secrets:
|
|
#
|
|
# Option 1: Using kubectl create secret
|
|
# kubectl create secret generic urlshortener-secrets \
|
|
# --from-literal=database-password='your-password' \
|
|
# --from-literal=jwt.secret='your-jwt-secret' \
|
|
# --namespace=urlshortener
|
|
#
|
|
# Option 2: Using sealed-secrets or external-secrets operator
|
|
# Option 3: Using a secret management system (HashiCorp Vault, AWS Secrets Manager, etc.)
|
|
#
|
|
# Option 4: Base64 encode and use the data field instead of stringData:
|
|
# echo -n 'your-password' | base64
|
|
|