Compare commits
10 Commits
ac5f98d865
...
3f177cb93e
Author | SHA1 | Date | |
---|---|---|---|
3f177cb93e | |||
e570a2e3c8 | |||
d52786aa44 | |||
467a8a4b15 | |||
cbef23df77 | |||
af77b895e0 | |||
2417429953 | |||
4e567a0041 | |||
9ef84c509d | |||
83a6152472 |
10
app.rb
10
app.rb
@ -206,6 +206,7 @@ before do
|
|||||||
# content_type 'text/plain'
|
# content_type 'text/plain'
|
||||||
sleep(1) while Sleep.instance.asleep? && request.path_info != "/livez/sleep"
|
sleep(1) while Sleep.instance.asleep? && request.path_info != "/livez/sleep"
|
||||||
content_type :text if request.path_info.start_with? "/_cat"
|
content_type :text if request.path_info.start_with? "/_cat"
|
||||||
|
request.session_options[:skip] = !request.path_info.start_with?("/session")
|
||||||
end
|
end
|
||||||
|
|
||||||
get "/" do
|
get "/" do
|
||||||
@ -362,3 +363,12 @@ route :delete, :get, :patch, :post, :put, "/status/:code" do
|
|||||||
code = Integer(params[:code])
|
code = Integer(params[:code])
|
||||||
status code if code.between? 100, 599
|
status code if code.between? 100, 599
|
||||||
end
|
end
|
||||||
|
|
||||||
|
get "/chunked/:delay" do
|
||||||
|
delay = Float(params[:delay])
|
||||||
|
stream do |out|
|
||||||
|
out << "Hello, world!\n"
|
||||||
|
sleep delay
|
||||||
|
out << "Hello, world!\n"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
11
kustomize/app/configmap.yaml
Normal file
11
kustomize/app/configmap.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: kipunji-configmap
|
||||||
|
namespace: kipunji
|
||||||
|
annotations:
|
||||||
|
reloader.stakater.com/match: "true"
|
||||||
|
data:
|
||||||
|
CAT: luna
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: toy-ingress
|
name: kipunji-ingress
|
||||||
spec:
|
spec:
|
||||||
rules:
|
rules:
|
||||||
- http:
|
- http:
|
||||||
@ -11,6 +11,6 @@ spec:
|
|||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
backend:
|
backend:
|
||||||
service:
|
service:
|
||||||
name: toy
|
name: kipunji
|
||||||
port:
|
port:
|
||||||
name: web
|
name: web
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
---
|
---
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
namespace: toy
|
namespace: kipunji
|
||||||
resources:
|
resources:
|
||||||
- secret.yaml
|
- secret.yaml
|
||||||
|
- configmap.yaml
|
||||||
- rollout.yaml
|
- rollout.yaml
|
||||||
- services.yaml
|
- services.yaml
|
||||||
- ingress.yaml
|
- ingress.yaml
|
||||||
|
@ -2,7 +2,9 @@
|
|||||||
apiVersion: argoproj.io/v1alpha1
|
apiVersion: argoproj.io/v1alpha1
|
||||||
kind: Rollout
|
kind: Rollout
|
||||||
metadata:
|
metadata:
|
||||||
name: toy
|
name: kipunji
|
||||||
|
annotations:
|
||||||
|
reloader.stakater.com/auto: "true"
|
||||||
spec:
|
spec:
|
||||||
replicas: 5
|
replicas: 5
|
||||||
strategy:
|
strategy:
|
||||||
@ -19,15 +21,15 @@ spec:
|
|||||||
revisionHistoryLimit: 2
|
revisionHistoryLimit: 2
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: toy
|
app: kipunji
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: toy
|
app: kipunji
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: toy
|
- name: kipunji
|
||||||
image: git.kill0.net/ryanc/toy:latest
|
image: git.kill0.net/ryanc/kipunji:latest
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
ports:
|
ports:
|
||||||
- name: web
|
- name: web
|
||||||
@ -36,9 +38,12 @@ spec:
|
|||||||
- name: SESSION_SECRET
|
- name: SESSION_SECRET
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: toy-session-secret
|
name: kipunji-session-secret
|
||||||
key: session_secret
|
key: session_secret
|
||||||
optional: true
|
optional: true
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: kipunji-configmap
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /livez
|
path: /livez
|
||||||
|
@ -3,13 +3,15 @@ apiVersion: bitnami.com/v1alpha1
|
|||||||
kind: SealedSecret
|
kind: SealedSecret
|
||||||
metadata:
|
metadata:
|
||||||
creationTimestamp: null
|
creationTimestamp: null
|
||||||
name: toy-session-secret
|
name: kipunji-session-secret
|
||||||
namespace: toy
|
namespace: kipunji
|
||||||
|
annotations:
|
||||||
|
reloader.stakater.com/match: "true"
|
||||||
spec:
|
spec:
|
||||||
encryptedData:
|
encryptedData:
|
||||||
session_secret: AgBgJFBDF/C7l95oHkRB6eWKWnbrrTpt+W9gLBnowJqfKj3aX6m7ppqSXt6Yb5zHlmGAehAmAD+dCd5ZDwVoQ1PMG+pfW/42rugdiuzemkpB5NrqEz+BGntx2CdYVu1kD88tur7SxgNUjY1Ypb1iJd7PMuPHUl+RorkA1EFKQ1DCnqJIT6P0P2TXslMSTKwF1LO+lAA4u6gbvbYqBTnePHDYR+OKSed+yNkAtqM9pcqZ+QWOtsiqaffGqHXdSWmeL5ChaCsgMCixegyUxMupqNiFhYKB5t7B8V/m8XJqKMjVWgsT6EkzIopzdic3oh4juAZMBISIMFP1vi+yDdhFn1WNI8YnYpOoJzxjj6b9/1kTUqCw1DG96sigQ44a3G++XAs7thOI6m08HfXCx1jwqsu3uKh617PU8RZkJYokJg39Dy18IQaE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iN1CmUGO8e5FtkQ4eiMe+SIB3oCXNGWErMpMkHIRdt4rdP08rZ2m4GG3MKtQlBKM4MHfcKvke4tkLmeAItMTl2qNd283xaeabO0lG9yh0fuYuaNbqvYNt8TCprLWVb+ynrqbHn4E0SeoRT+vjGSR9K9N+iLkv6GCjDhiw+TrQ4QArYHI3CS2SeY4oIOe2HUP3jyjSh4r6jH1+n3elJG/eb+GQ9nlC4xKqXE+wwx+7s850nMifcDuk=
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
creationTimestamp: null
|
creationTimestamp: null
|
||||||
name: toy-session-secret
|
name: kipunji-session-secret
|
||||||
namespace: toy
|
namespace: kipunji
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: toy
|
name: kipunji
|
||||||
|
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
@ -10,4 +10,4 @@ spec:
|
|||||||
port: 80
|
port: 80
|
||||||
targetPort: web
|
targetPort: web
|
||||||
selector:
|
selector:
|
||||||
app: toy
|
app: kipunji
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
namespace: toy
|
namespace: kipunji
|
||||||
resources:
|
resources:
|
||||||
- namespace.yaml
|
- namespace.yaml
|
||||||
- ./app
|
- ./app
|
||||||
|
@ -2,19 +2,19 @@
|
|||||||
kind: Deployment
|
kind: Deployment
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
metadata:
|
metadata:
|
||||||
name: toy-memcached
|
name: kipunji-memcached
|
||||||
|
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: toy-memcached
|
app: kipunji-memcached
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: toy-memcached
|
app: kipunji-memcached
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: toy-memcached
|
- name: kipunji-memcached
|
||||||
image: memcached:latest
|
image: memcached:latest
|
||||||
ports:
|
ports:
|
||||||
- name: memcached
|
- name: memcached
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
namespace: toy
|
namespace: kipunji
|
||||||
resources:
|
resources:
|
||||||
- deployment.yaml
|
- deployment.yaml
|
||||||
- services.yaml
|
- services.yaml
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: toy-memcached
|
name: kipunji-memcached
|
||||||
|
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
@ -10,4 +10,4 @@ spec:
|
|||||||
port: 11211
|
port: 11211
|
||||||
targetPort: memcached
|
targetPort: memcached
|
||||||
selector:
|
selector:
|
||||||
app: toy-memcached
|
app: kipunji-memcached
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Namespace
|
kind: Namespace
|
||||||
metadata:
|
metadata:
|
||||||
name: toy
|
name: kipunji
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user