support global config in k8s. (#295)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
f76343b840
commit
4f2eeac7c3
|
@ -7,8 +7,8 @@ metadata:
|
|||
# Kubernetes Ingress Controller for AWS ALB
|
||||
# https://github.com/coreos/alb-ingress-controller
|
||||
alb.ingress.kubernetes.io/scheme: internet-facing
|
||||
alb.ingress.kubernetes.io/subnets: "subnet-3cd22c75,subnet-4aff342d"
|
||||
alb.ingress.kubernetes.io/security-groups: sg-329c2b54
|
||||
alb.ingress.kubernetes.io/subnets: subnet-aa3dfbe3,subnet-4aff342d
|
||||
alb.ingress.kubernetes.io/security-groups: sg-71069b17
|
||||
spec:
|
||||
rules:
|
||||
- host: gorush.example.com
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: gorush-config
|
||||
namespace: gorush
|
||||
data:
|
||||
# stat
|
||||
stat.engine: redis
|
||||
stat.redis.host: redis:6379
|
|
@ -15,8 +15,6 @@ spec:
|
|||
- image: appleboy/gorush
|
||||
name: gorush
|
||||
imagePullPolicy: Always
|
||||
command: ["/gorush"]
|
||||
args: ["-c", "config.yml", "-e", "redis", "--redis-addr", "redis:6379"]
|
||||
ports:
|
||||
- containerPort: 8088
|
||||
livenessProbe:
|
||||
|
@ -25,3 +23,14 @@ spec:
|
|||
port: 8088
|
||||
initialDelaySeconds: 3
|
||||
periodSeconds: 3
|
||||
env:
|
||||
- name: GORUSH_STAT_ENGINE
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: gorush-config
|
||||
key: stat.engine
|
||||
- name: GORUSH_STAT_REDIS_ADDR
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: gorush-config
|
||||
key: stat.redis.host
|
||||
|
|
Loading…
Reference in New Issue