Compare commits
1 Commits
v0.2.2
...
d593d59bed
Author | SHA1 | Date | |
---|---|---|---|
d593d59bed
|
4
app.rb
4
app.rb
@ -21,9 +21,11 @@ $LOAD_PATH.unshift File.dirname(__FILE__) + "/lib"
|
|||||||
|
|
||||||
require "config"
|
require "config"
|
||||||
|
|
||||||
VERSION = "0.2.2"
|
VERSION = "0.2.1"
|
||||||
|
|
||||||
CHUNK_SIZE = 1024**2
|
CHUNK_SIZE = 1024**2
|
||||||
|
SESSION_SECRET_HEX_LENGTH = 64
|
||||||
|
JWT_SECRET_HEX_LENGTH = 64
|
||||||
DEFAULT_FLAKEY = 50
|
DEFAULT_FLAKEY = 50
|
||||||
|
|
||||||
NAME = "kubernaut".freeze
|
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
|
# 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.
|
# to the chart and its templates, including the app version.
|
||||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||||
version: 0.2.2
|
version: 0.2.1
|
||||||
|
|
||||||
# This is the version number of the application being deployed. This version number should be
|
# 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
|
# 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.
|
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||||
# It is recommended to use it with quotes.
|
# It is recommended to use it with quotes.
|
||||||
appVersion: "0.2.2"
|
appVersion: "0.2.1"
|
||||||
|
@ -16,24 +16,18 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: kubernaut
|
- name: kubernaut
|
||||||
image: git.kill0.net/ryanc/kubernaut:0.2.2
|
image: git.kill0.net/ryanc/kubernaut:0.2.1
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
ports:
|
ports:
|
||||||
- name: sinatra-web
|
- name: sinatra-web
|
||||||
containerPort: 4567
|
containerPort: 4567
|
||||||
env:
|
env:
|
||||||
- name: KUBERNAUT_SESSION_SECRET
|
- name: SESSION_SECRET
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: kubernaut
|
name: kubernaut-session-secret
|
||||||
key: session_secret
|
key: session_secret
|
||||||
optional: true
|
optional: true
|
||||||
- name: KUBERNAUT_JWT_SECRET
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: kubernaut
|
|
||||||
key: jwt_secret
|
|
||||||
optional: true
|
|
||||||
envFrom:
|
envFrom:
|
||||||
- configMapRef:
|
- configMapRef:
|
||||||
name: kubernaut-configmap
|
name: kubernaut-configmap
|
||||||
|
@ -3,6 +3,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
|||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
namespace: kubernaut
|
namespace: kubernaut
|
||||||
resources:
|
resources:
|
||||||
|
- secret.yaml
|
||||||
- configmap.yaml
|
- configmap.yaml
|
||||||
- deployment.yaml
|
- deployment.yaml
|
||||||
- hpa.yaml
|
- hpa.yaml
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
require "sensitive"
|
require "sensitive"
|
||||||
|
|
||||||
SESSION_SECRET_HEX_LENGTH = 64
|
|
||||||
JWT_SECRET_HEX_LENGTH = 64
|
|
||||||
|
|
||||||
class Config
|
class Config
|
||||||
attr_accessor :cat
|
attr_accessor :cat
|
||||||
|
|
||||||
@ -12,7 +9,7 @@ class Config
|
|||||||
@prefix = prefix
|
@prefix = prefix
|
||||||
@cat = cat
|
@cat = cat
|
||||||
|
|
||||||
session_secret ||= fetch_env "SESSION_SECRET" do
|
session_secret ||= ENV.fetch "SESSION_SECRET" do
|
||||||
SecureRandom.hex SESSION_SECRET_HEX_LENGTH
|
SecureRandom.hex SESSION_SECRET_HEX_LENGTH
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user