3 Commits

Author SHA1 Message Date
5165759558 add JWT secret reference
Some checks failed
Ruby Lint / lint (push) Successful in 20s
Ruby Test / test (push) Successful in 24s
Release / docker (push) Has been cancelled
2025-05-10 18:13:02 -05:00
10f73b96ec refer to the session secret using the application name prefix 2025-05-10 18:12:37 -05:00
5097e551e2 just call the Kubernetes secret "kubernaut" 2025-05-10 18:10:50 -05:00
2 changed files with 9 additions and 3 deletions

View File

@ -22,12 +22,18 @@ spec:
- name: sinatra-web
containerPort: 4567
env:
- name: SESSION_SECRET
- name: KUBERNAUT_SESSION_SECRET
valueFrom:
secretKeyRef:
name: kubernaut-session-secret
name: kubernaut
key: session_secret
optional: true
- name: KUBERNAUT_JWT_SECRET
valueFrom:
secretKeyRef:
name: kubernaut
key: jwt_secret
optional: true
envFrom:
- configMapRef:
name: kubernaut-configmap

View File

@ -12,7 +12,7 @@ class Config
@prefix = prefix
@cat = cat
session_secret ||= ENV.fetch "SESSION_SECRET" do
session_secret ||= fetch_env "SESSION_SECRET" do
SecureRandom.hex SESSION_SECRET_HEX_LENGTH
end