Compare commits
6 Commits
d593d59bed
...
main
Author | SHA1 | Date | |
---|---|---|---|
40ede07ab0
|
|||
5165759558
|
|||
10f73b96ec
|
|||
5097e551e2
|
|||
820d2d8c51
|
|||
eb5c12ca91
|
4
app.rb
4
app.rb
@ -21,11 +21,9 @@ $LOAD_PATH.unshift File.dirname(__FILE__) + "/lib"
|
||||
|
||||
require "config"
|
||||
|
||||
VERSION = "0.2.1"
|
||||
VERSION = "0.2.2"
|
||||
|
||||
CHUNK_SIZE = 1024**2
|
||||
SESSION_SECRET_HEX_LENGTH = 64
|
||||
JWT_SECRET_HEX_LENGTH = 64
|
||||
DEFAULT_FLAKEY = 50
|
||||
|
||||
NAME = "kubernaut".freeze
|
||||
|
@ -15,10 +15,10 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.2.1
|
||||
version: 0.2.2
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
# It is recommended to use it with quotes.
|
||||
appVersion: "0.2.1"
|
||||
appVersion: "0.2.2"
|
||||
|
@ -16,18 +16,24 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: kubernaut
|
||||
image: git.kill0.net/ryanc/kubernaut:0.2.1
|
||||
image: git.kill0.net/ryanc/kubernaut:0.2.2
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- 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
|
||||
|
@ -3,7 +3,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: kubernaut
|
||||
resources:
|
||||
- secret.yaml
|
||||
- configmap.yaml
|
||||
- deployment.yaml
|
||||
- hpa.yaml
|
||||
|
@ -1,5 +1,8 @@
|
||||
require "sensitive"
|
||||
|
||||
SESSION_SECRET_HEX_LENGTH = 64
|
||||
JWT_SECRET_HEX_LENGTH = 64
|
||||
|
||||
class Config
|
||||
attr_accessor :cat
|
||||
|
||||
@ -9,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
|
||||
|
||||
|
Reference in New Issue
Block a user