refer to the session secret using the application name prefix

This commit is contained in:
Ryan Cavicchioni 2025-05-10 18:12:37 -05:00
parent 5097e551e2
commit 10f73b96ec
Signed by: ryanc
SSH Key Fingerprint: SHA256:KbXiwUnZnHFwFtt3Bytd+F3FN9pPHn1Z1cxMIE1TPbg
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ spec:
- name: sinatra-web - name: sinatra-web
containerPort: 4567 containerPort: 4567
env: env:
- name: SESSION_SECRET - name: KUBERNAUT_SESSION_SECRET
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
name: kubernaut name: kubernaut

View File

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